[cairo] PDF device origin?
Behdad Esfahbod
behdad at behdad.org
Tue Aug 12 13:58:03 PDT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ian Britten wrote:
> Hi all,
> Is the device origin of the PdfSurface in the lower-left corner, or
> in the upper-left?
> For some reason, my data is coming out upside-down :( I've been
> assuming it was lower-left, but now I'm beginning to have doubts...
>
> [ I'm pretty sure the user origin is always lower-left, independent
> of the Surface type being used, eh? ]
You're wrong. It's always upper-left.
> On a related note, is there anything I can do with a
> cairo_matrix_t to flip my data (Top-to-bottom, not left-to-right)
> I didn't see any 'flip' type of functions available...
cairo_scale (cr, 1, -1);
You prolly also need a translate to the new origin before that.
> Thanks for any info!
> Ian
Have fun!
behdad
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iEYEARECAAYFAkih+VoACgkQn+4E5dNTERXVNQCgol6IDVWeHPMFfmQ6WzODR1cZ
/hgAnR3E0Gtba1FlIbINj8+nXU8REfHj
=GWYw
-----END PGP SIGNATURE-----
More information about the cairo
mailing list