Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 27th, 2012  |  syntax: None  |  size: 0.34 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. import shoebot
  2. from shoebot.core import CairoCanvas, CairoImageSink, NodeBot
  3. outputfile = 'output.svg'
  4. iterations = 1
  5. sink = CairoImageSink(outputfile, "svg", multifile = false)
  6. canvas = CairoCanvas(sink, enable_cairo_queue=True)
  7. bot = shoebot.core.NodeBot(canvas)
  8. bot.size(150,150)
  9. bot.fill(1,0,0)
  10. bot.rect(10,10,100,100)
  11. bot._canvas.flush(frame=0)