[cairo] Recursive painting when using context's surface as source
Zan Dobersek
zandobersek at gmail.com
Thu Feb 10 13:32:21 PST 2011
Hi,
I've created an example where a new cairo context is created for a surface.
I then draw with that context, creating a small rectangle in the top left
corner. What I do next causes the problems - I set the very same surface
that I used for creating the context to be the source for drawing. I also
translate by 20 pixels in both directions (right and downwards). This
results in multiple rectangles to be drawn in a diagonal line from the top
left to the bottom right corner.
The desired result, however, would be only one extra rectangle to be drawn
in the space below and to the right of the original rectangle.
I can understand why this occurs, but I wonder if it is avoidable by setting
e.g. a different operator? Or is this the wrong approach to what I am trying
to achieve?
Regards,
Zan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20110210/9c483346/attachment.html>
More information about the cairo
mailing list