Skip to content

Instantly share code, notes, and snippets.

View codingisacopingstrategy's full-sized avatar

Eric Schrijver codingisacopingstrategy

View GitHub Profile
@codingisacopingstrategy
codingisacopingstrategy / test1.py
Created October 28, 2011 16:36 — forked from tian2992/test1.py
Drawing With Shoebot as a Module
import shoebot
from shoebot.core import CairoCanvas, CairoImageSink, NodeBot
outputfile = 'output.svg'
sink = CairoImageSink(outputfile, "svg", multifile = False)
canvas = CairoCanvas(sink, enable_cairo_queue=True)
bot = shoebot.core.NodeBot(canvas)
bot.size(150,150)
bot.fill(1,0,0)
bot.rect(10,10,100,100)
bot._canvas.flush(frame=0)