[cairo] Rotation around a point

Donn donn.ingle at gmail.com
Sat Nov 24 09:04:56 PST 2007

Hello again,
 I've been looking around and I can't find much on this. How can I go about 
setting an x,y within a shape so that it can be rotated (via matrixes) around 
that point?

For some background:
Each of the things I draw gets this before it:
ThingMatrix = cairo.Matrix ( prop.sx, 0, 0, prop.sy, prop.x, prop.y )
cairo.Matrix.rotate( ThingMatrix, prop.rot )
self.context.transform ( ThingMatrix )

So, if there are a few children in a thing then they are buried under several 
matrix transforms, which I have saved and then restore in the right order.


More information about the cairo mailing list