Skip to content

achandru/drawbot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DrawBot

DrawBot is a powerful, free application for MacOSX that invites you to write simple Python scripts to generate two-dimensional graphics. The built-in graphics primitives support rectangles, ovals, (bezier) paths, polygons, text objects and transparency.

To download the latest version of the app, go to
http://www.drawbot.com/content/download.html


Using DrawBot as a Python module

DrawBot can also be installed as a Python module, the app is not required.

Install

download: https://github.com/typemytype/drawbot/archive/master.zip

run cd <path/where/you/have/downloaded/and/unzipped/drawBot> run python setupAsModule.py install

Usage

    import drawBot

    drawBot.newDrawing()
    drawBot.newPage(1000, 1000)
    drawBot.rect(10, 10, 100, 100)
    drawBot.saveImage("~/Desktop/aRect.png")
    drawBot.endDrawing()

It is adviced to start with newDrawing() and end with endDrawing(), to clear the instruction stack and remove installed fonts.


Compile DrawBot from source

compile drawBot.app (with UI)

Required packages:

Compile:

DrawBot is compiled with py2app into an application package.

cd path/To/drawBot
python setup.py py2app

compile drawBot Python module only

This module only works on OSx as it requires AppKit, CoreText and Quartz.

Required packages:

Compile:

cd path/To/drawBot
python setupAsModule.py install

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%