[cairo] mixed path/stroke ctm bug
damaxwell at alaska.edu
Thu Oct 20 13:43:19 PDT 2011
The snippet of python code included at the end of this email results in two very different outcomes depending on the value of 'h'. If h is nonzero and small, but not too small, then the rendered image is nearly a square. If h=0.0, then the coordinates of the square seem to have collapsed unexpectedly and the rendered image is a line. Changing the amount of rotation in 'angle' results in different garbling of the coordinates of the corners, but only if 'h' is very close to zero.
The code is trying to express the coordinates of the path in one coordinate system, and then just prior to stroking change coordinate systems so as to allow for a different pen shape, for example.
Is this a bug? I'm using cairo 1.8.10 on OS X built using macports.
angle = circle*1./8
surface = cairo.PDFSurface ("ASquare.pdf", 3*L,3*L)
ctx = cairo.Context(surface)
penMatrix = cairo.Matrix()
More information about the cairo