Translation
Learn about the translation method in Pycairo.
We'll cover the following...
Translation
Translation shifts the entire coordinate system. It is useful if we want to draw a shape in a different position, but without changing the drawing code.
We use the translate
method of the Context
to perform a translation:
ctx.translate(200, 300)
This moves the entire user space 200 units to the right, and 300 units down, relative to device space. This means ...