[cairo] Inverting the Y-axis

Owen Taylor otaylor at redhat.com
Wed Aug 10 10:03:19 PDT 2005


On Thu, 2005-08-11 at 02:12 +0930, Adrian Johnson wrote:
> Is there an easy way to invert the Y axis?
> 
> I've tried
> 
>     cairo_matrix_init(&m, 1, 0, 0, -1, 0, Y_MAX);
>     cairo_transform(cr, &m);
> 
> however this causes text to be displayed upside down.

You can call cairo_set_font_matrix() if you are using the
toy API. No way to invert the axes if you are using Pango,
I'm afraid... the Pango rendering code all assumes that
text lines are ordered in order of increasing Y.

Regards,
					Owen

-------------- 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/20050810/a0df96ac/attachment.pgp


More information about the cairo mailing list