After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 361923 - rsvg_cairo_clip_render_path() ignores cairo_scale()
rsvg_cairo_clip_render_path() ignores cairo_scale()
Status: RESOLVED FIXED
Product: librsvg
Classification: Core
Component: general
2.16.x
Other All
: Normal normal
: ---
Assigned To: librsvg maintainers
librsvg maintainers
Depends on:
Blocks:
 
 
Reported: 2006-10-13 12:17 UTC by Kouhei Sutou
Modified: 2006-10-13 12:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fixes this bug. (1.35 KB, patch)
2006-10-13 12:18 UTC, Kouhei Sutou
none Details | Review

Description Kouhei Sutou 2006-10-13 12:17:16 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:
Comment 1 Kouhei Sutou 2006-10-13 12:18:12 UTC
Created attachment 74629 [details] [review]
fixes this bug.
Comment 2 Dominic Lachowicz 2006-10-13 12:21:28 UTC
Thanks. I had already committed your patch.