_cairo_surface_wrapper_get_target_extents() too small

Simon Sapin <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
Hi,

When rendering to PDF with WeasyPrint a document containing a SVG image, 
SVG elements in the right and bottom of the image are not shown in some 
cases.

git bisect indicates that the bug appeared in this cairo commit:

http://cgit.freedesktop.org/cairo/commit/?id=09b42c748e9dbcc923560c7d8bf5298fbffe95ef

Reverting it on top of today’s master fixes the bug.


WeasyPrint has CairoSVG render the image to an intermediate cairo SVG 
surface, which is then used in surface pattern as a source to paint in 
the final PDF surface. The bug appears when the target context has a 
scale to make the image smaller than its "intrinsic" size. Making the 
SVG surface smaller (with its content scaled accordingly) and 
compensating with a scale on the target surface works around the problem.

Apparently, the rectangle returned by 
_cairo_surface_wrapper_get_target_extents() is smaller than it should 
be. Something is transformed wrong, but I’m not sure what coordinate 
system each rectangle is supposed to be in.

Cheers,
-- 
Simon Sapin
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.