GNOME Bugzilla – Bug 361923
rsvg_cairo_clip_render_path() ignores cairo_scale()
Last modified: 2006-10-13 12:21:28 UTC
Please describe the problem: Rendering a SVG that includes <clipPath> with rsvg_handle_render_cairo() and cairo_scale() causes incorrect result. This bug was reported on cairo ML: http://lists.freedesktop.org/archives/cairo/2006-October/008150.html http://lists.freedesktop.org/archives/cairo/2006-October/008162.html Steps to reproduce: 1. Sample code: cairo_scale(ctx, 0.5, 0.5); h = rsvg_handle_new_from_file("test.svg", &error); rsvg_handle_render_cairo(h, ctx); 2. Sample SVG: <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg width="400" height="400" viewBox="0 0 400 400" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="svg1"> <defs> <clipPath id="1001"> <rect x="100" y="100" width="200" height="200"/> </clipPath> </defs> <g id="showclip"> <rect style="stroke: #000000; fill:none;" x="100" y="100" width="200" height="200"/> </g> <g id="lines"> <path style="stroke: #000000;" d="M 150,50 L 150,350"/> <path style="stroke: #000000; clip-path:url(#1001);" d="M 250,50 L 250,350"/> </g> </svg> Actual results: A right line is rendered incorrect position. http://downloads.globalmaritime.com/ts/cairo/ Expected results: A right line is rendered in a rectangle. Does this happen every time? Only scale isn't 1.0. Other information:
Created attachment 74629 [details] [review] fixes this bug.
Thanks. I had already committed your patch.