[cairo] Scrolling/Copying

Bill Spitzak spitzak at d2.com
Fri Jun 24 10:19:22 PDT 2005



Carl Worth wrote:

> So, I think I just talked myself into the fact that Owen had the right
> idea all along that cairo_set_source should lock the pattern matrix to
> refer to the user space at the time of cairo_set_source, (rather than
> the user space in effect at the time of subsequent drawing
> operations).
> 
> This will allow usage like the following to directly copy from a
> source surface:
> 
> 	cairo_identity_matrix (cr);
> 	cairo_set_source_surface (cr, surface, x, y);
> 	cairo_scale (cr, sx, sy);
> 	cairo_rectangle (cr, dx, dy, width, height);

I agree this will do what is wanted. Also it will allow the pattern to 
align in multiple fills even if you change the transformation between 
the fills.

So I guess this means that copying areas should be detected. I don't 
think there is any need to work correctly unless opaque copy is being 
done, ie any compositing operation other than src, and any repeating or 
alpha, will produce undefined results.



More information about the cairo mailing list