[cairo] possible bug with cairo_scale & librsvg

Matthew Bernstein mwb at globalmaritime.com
Fri Oct 13 00:45:45 PDT 2006

Carl Worth wrote:
> On Wed, 11 Oct 2006 13:51:56 +0100, Matthew Bernstein wrote:
>> I'm trying to track down a bug rendering SVG files with librsvg if
>> cairo_scale is used with a factor other than 1.0.
> An SVG that reproduces the problem would be necessary to start
> tracking down the problem. And preferably something that was trimmed
> down to the minimum that still reproduces the problem.

Okay, that wasn't quite as painful as I was expecting... The problem was
related to the use of clipPath (the use appears correct, looking at the
spec) and can be demonstrated with the simplified example below.  Do you
know if the clipping takes place in Cairo or Librsvg?

I've put the results for scaling factors of 0.5, 1.0, 1.5 from both
Cairo and Batik up here:


<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
<svg width="400" height="400" viewBox="0 0 400 400"
    version="1.1" id="svg1">
	<clipPath id="1001">
		<rect x="100" y="100" width="200" height="200"/>
<g id="showclip">
	<rect style="stroke: #000000; fill:none;" x="100" y="100" width="200"
<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


More information about the cairo mailing list