[cairo] documentation suggestion

Matthias Hilbig mhilbig at gmail.com
Thu Aug 26 02:22:07 PDT 2010


I found changing the handedness of the coordinate system problematic, 
because it also flips the text. And text positioning gets quite messy if 
you flip the text back via the font matrix.

If you do not use text it can be handy, but you can easily write that 
function for yourself.

Regards
	Matthias

On 08/22/2010 05:05 PM, M.R. wrote:
> 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.
> --
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo



More information about the cairo mailing list