[cairo] Can't draw more

Donn donn.ingle at gmail.com
Fri Nov 23 19:57:18 PST 2007


>When I execute the context.stroke() statement
> following the button click, I get the following error.
> cairo.Error: the target surface has been finished
In Cairo a stroke() or fill() consumes the path like a hungry Python :)
You have to build your drawings in steps.
1. Get a context
2. Move to a point
3. Draw stuff - usually a single shape
4. stroke() or fill () or stroke_preserve() then fill()
5. goto 2

Go find the Python cairo tutorial page 
at :http://www.tortall.net/mu/wiki/CairoTutorial and read it carefull. Make 
notes because it's not quite as obvious as it seems.

hth
\d


More information about the cairo mailing list