[cairo] Cairo with GTK GUI integration, getting inverse transformation matrix

Lawrence D'Oliveiro ldo at geek-central.gen.nz
Mon Jan 18 15:35:53 PST 2016


On Tue, 19 Jan 2016 00:05:31 +0100, Johannes Bauer wrote:

> I noticed the cairo_ctx matrix is pre-set to accomodate for the window
> (i.e. already has the correct panning displacement accounted for). So
> it's unwise to just overwrite it (messes up the coordinate system).

But you should still be able to make temporary changes to it, bracketed
by cairo_save()/cairo_restore(). Within these, you can use
cairo_translate/scale/rotate/transform
<http://cairographics.org/manual/cairo-Transformations.html> to
concatenate additional transformations onto the existing matrix.


More information about the cairo mailing list