Antialiasing and adjacent shapes

Hello,

is there any part of the SVG specification that governs how things like

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100">
   <g fill="#000" stroke="none">
       <rect x="10" y="10" width="10" height="10"/>
       <rect x="20" y="10" width="10" height="10"/>
       <rect x="10" y="20" width="10" height="10"/>
       <rect x="20" y="20" width="10" height="10"/>

       <rect x="70" y="70" width="20" height="20"/>
   </g>       </svg>

should be rendered? I. e. where shapes are exactly adjacent to each other.

Intuitively I'd say both visible squares (of 20 px edge length) should 
look exactly the same, but in fact seemingly due to antialiasing 
(shape-rendering='crispEdges' seems to help in FF and WebKit, though not 
in Inkscape) there are lines introduced within the shape. Collapsing 
adjacent shapes into a single path would work as well but this is 
sometimes cumbersome for automatically generating SVG files.

See http://hypftier.de/temp/svg_adjacent_shapes.png for an image example.

I see this phenomenon as an unwanted side-effect and setting 
shape-rendering to crispEdges only helps with shapes that only have 
horizontal or vertical edges.

Or is there another method to suppress this I haven't found yet?

Regards,
Johannes Rössel

Received on Friday, 26 December 2008 14:05:38 UTC