[cairo] A hidden offset for the Xlib backend

Owen Taylor otaylor at redhat.com
Sat Mar 12 06:35:30 PST 2005


On Fri, 2005-03-11 at 16:14 -0800, Keith Packard wrote:
> Around 18 o'clock on Mar 11, Owen Taylor wrote:
> 
> > * cairo_xlib_surface_set_device_offset:
> 
> Couldn't this be implemented by modifying the CTM and then fixing the few 
> places where the offset would be exposed back to the user?

If implemented either as part of the gstate, or in the base surface
type, then yes, that implementation would be a lot simpler ... you'd
just need to change cairo_set_matrix(), cairo_default_matrix(),
cairo_identity_matrix(), cairo_get_matrix(), cairo_transform_point(), 
cairo_inverse_transform_point(). (*)

As an Xlib-backend specific thing, I don't see that that is possible.

And I *really* don't want to wrap a subset of Cairo functions in GTK+.

Regards,
						Owen


(*) If implementing cairo_surface_set_device_offset() this way, you'd 
need to document that changing the device offset after creating a
cairo_t for a surface gives surprising results, since we can't
change the CTM for the cairo_t at that point. Not a really a practical
problem, but a little ugly.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050312/7f403def/attachment.pgp


More information about the cairo mailing list