[cairo] [Patch] Adjustments to XTransform in the xlib backend
sandmann at daimi.au.dk
Wed Sep 17 09:51:48 PDT 2008
The xlib test suite fails in some variants of the
rotate-image-surface-paint test. This is due to the lack of an
adjustment of the transformation matrix that is done in the image
backend, but not in the xlib backend. The adjustment in question is
documented by this comment:
/* The conversion above breaks cairo's translation invariance:
* a translation of (a, b) in device space translates to
* a translation of (xx * a + xy * b, yx * a + yy * b)
* for cairo, while pixman uses rounded versions of xx ... yy.
* This error increases as a and b get larger.
* To compensate for this, we fix the point (0, 0) in pattern
* space and adjust pixman's transform to agree with cairo's
* that point. */
in cairo-matrix.c. I don't fully understand what the adjustment is
trying to accomplish, but if it is necessary for the image backend, it
is probably also necessary for the RENDER one since they have the same
The attached patch fixes, but someone who understands why the
adjustment is done should probably look it over.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1930 bytes
Desc: The patch
Url : http://lists.cairographics.org/archives/cairo/attachments/20080917/ceebb7cd/attachment.bin
More information about the cairo