W3C home > Mailing lists > Public > www-svg@w3.org > April 2009

[IC/SVG] Proposed test for markers: offset viewBox

From: Jorge Stolfi <stolfi@ic.unicamp.br>
Date: Wed, 8 Apr 2009 00:42:37 -0300
Message-Id: <200904080342.n383gbBL019866@manaus.ic.unicamp.br>
To: www-svg@w3.org


I just ran into an SVG rendering bug that manifests itself in Firefox
and ImageMagick (and in the Wiki Commons), and is apparently located
in the Linux RSVG library (2.22.2, perhaps also 2.22.3). 

I am reporting the bug to the maintainers of that library.  However,
it appears that your test suite 

does not test for that particular bug.

The bug in in the maker painting function. As far as I can tell, the
function works correctly only if the low corner of the "viewBox"
attribute is 0,0. Otherwise the marker gets displaced (by the
coordinates of that low corner, negated). See


So perhaps you may want to modify some of the files in your suite
so that some markers withh have
"viewBox"es with nonzero low corner.  E.g., in painting-marker-01-f.svg,
modify the first two markers as follows

  <marker id="marker1" viewBox="20 20 10 10" markerWidth="2" markerHeight="2" refX="25" refY="25" markerUnits="strokeWidth">
    <rect x="20" y="20" width="10" height="10" fill="red" stroke="none"/>
  <marker id="marker2" viewBox="-5 -5 10 10" markerWidth="2" markerHeight="2" markerUnits="strokeWidth" orient="auto">
    <path d="M 0 -5 L 5 5 L -5 5 Z" fill="blue" stroke="none"/>

Note that "refX" and "refX" are omitted in "marker2".  My understanding
is that they should default to 0,0.  See the last SVG file 
"painting-marker-01-f-js.svg" on that page.

Hope it helps.  All the best,

Received on Wednesday, 8 April 2009 07:37:33 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:17 UTC