Save and Restore

Learn of the save and restore methods in Pycairo.

In one of the previous lessons, we learned to apply several transforms. But how do we remove the transforms, after we are done using them?

Reverse a transformation

It is possible to reverse a transform, by applying the inverse transform. For example, if we apply a translation (a, b), we can reverse it by applying a second translation (-a, -b), which puts us back where we started. We can reverse a scaling factor s, by applying a second scaling factor of ...