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

Hello,

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 

  http://www.w3.org/Graphics/SVG/Test/20061213/htmlObjectHarness/full-index.html
  
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

  http://www.ic.unicamp.br/~stolfi/misc/2009-04-07-svg-marker-bug/buggy-markers.html

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>
  <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"/>
  </marker>
  
See   

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,

--stolfi

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