shader.py has an OffscreenBuffer. Instead of drawing directly to the
canvas, you could draw into a buffer. This is handled by the render()
command. For example:
from nodebox.graphics import *
ellipse(x=1024, y=1024, width=1200, height=1200)
img = render(draw, width=2048, height=2048)
Note: there are drawbacks when drawing into a buffer. Lines (i.e.
line(), BezierPath(), ...) will appear more jagged. The colors may be
off when you render an image with a transparent background.
Hope that helps,