[cairo] how to copy a rect area from one surface to another

Kelvin Cheng KCheng at extracomm.com
Tue Dec 16 22:22:01 PST 2008


Hello,

I am new to the Cairo.
I am looking for a way to copy a portion of a surface to another surface. 
How should I do this ?

Currently, this is what I am attempting to do:

1) Draw something on a surface
2) determine the bounding rectangle for the "things" on surface in 1)
3) Create another surface. Copy the contents within the bounding rectangle 
in 2) to the newly created surface.

It seems that the cairo_paint() etc, functions copy the source surface 
from (0, 0). 

Please help. Thanks.

Regards,
Kelvin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20081217/cb070447/attachment.html 


More information about the cairo mailing list