First, see the wikipedia page on transformation matrices. That should help with the terminology. Next, understand that there are two matrices involved at any given time.
- The "prime" matrix
- The "item" matrix
The prime matrix usually starts out as a bunch of zeros and a one:
[0 0 0]
[0 0 0]
[0 0 1]
This means do nothing. Next the item's matrix is determined. Once it's time to start laying things onto the device, then these two matrices are combined with an affine transformation.
This transformation gives you a point off of the starting position to draw your item, with any appropriate scaling or rotation.
Since the prime matrix is used across all of the items, we can adjust it to have some universal effect. Say we want to shift everything "left" 50 points. You're lucky in that you wouldn't have to manually set your matrix to do this, just call
cairo_translate(cr, -50, 0) or something similar.
Now every new item rendered will be modified.