[cairo] A hidden offset for the xlib backend

Carl Worth cworth at redhat.com
Thu Jan 6 08:47:07 PST 2005


On Sun, 05 Sep 2004 19:51:21 -0400, Owen Taylor wrote:
> Though if you really want to kill this slippery slope, of course, you
> could add something like cairo_set_device_matrix() which set a final
> matrix that was prepended to the CTM but hidden from the rest of
> the public API.

I finally took the time to digest this "hidden offset" thread.

The suggestion above seems the best to me.

I know we don't have any use for more than an offset now, but I'm bad
at predicting the future, so I'd rather throw a whole matrix at it.

Also, I don't care about making this feature easy to use. In fact, the
name above is way too simple and might lure people into using it
improperly. I want something more like:

	cairo_set_mysterious_hidden_transform_only_if_you_know_what_you_are_doing

or such.

If someone can suggest a name that accurately captures what this
function does, that would be quite useful. "set_device_matrix" doesn't
do it for me since it's insufficiently distinct from "set_matrix"
which does set the user->device transform.

And, finally, do we want a cairo_function for this, or should we
restrict it to a cairo_surface function, (cairo_xlib_surface ?). That
might also help hide the wart away.

-Carl




More information about the cairo mailing list