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
DrawBot can also be installed as a Python module, the app is not required.
download: https://github.com/typemytype/drawbot/archive/master.zip
run cd <path/where/you/have/downloaded/and/unzipped/drawBot>
run python setupAsModule.py install
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.
Required packages:
- vanilla
- defcon
- defconAppKit
robofab(not used anymore)- fontTools
- pygments
- jedi
- booleanOperations
- mutatorMath
- woffTools
- compositor
- feaTools2
- ufo2svg
- fontTools
Compile:
DrawBot is compiled with py2app into an application package.
cd path/To/drawBot
python setup.py py2app
This module only works on OSx as it requires AppKit
, CoreText
and Quartz
.
Required packages:
Compile:
cd path/To/drawBot
python setupAsModule.py install