[cairo] documentation suggestion

M.R. makrober at gmail.com
Sun Aug 22 08:05:42 PDT 2010


Please forgive and ignore this if I simply failed to notice an
appropriate item in the documentation, or if this is not an
appropriate venue for such suggestions:

In cairo_scale() the following could be added:
...
If the sign of sx or sy (but not both) is set to a negative
value, the transformation between the application and the
device will change the handedness of the coordinate system.
Such change will not be detrimental to the system.

(or something similar). Most application/world systems are,
unlike most graphical device systems, right-handed, and it
is nice to be told explicitly that none of cairo's coordinate
manipulations will fail if the CTM changes the handedness
of the coordinate system in world to device transformation.

I am always reluctant to suggest adding to the list of functions,
but a large number of applications (and programmers not familiar
with planar algebra) would benefit by addition of the function
to directly set an orthogonal transformation from a right-handed
world system into the device, given world's system coordinate
extents in X and Y:

void cairo_orthogonal_matrix(cairo_t cr,
                              double minWorldX, double maxWorldX,
                              double minWorldY, double maxWorldY);

(I'd consider it a functioonal sibling of cairo_identity matrix()?)

Marko R.


More information about the cairo mailing list