I narrowed a problem mgs is having down to a subtle bug in the rendering of rectangles in svg. The top line can narrow, widen, or rise as it goes right. I have seen errors up to several pixels, or in excess of 100% of the width of the line.
Windows 7
Version: ImageMagick 6.8.5-6 2013-05-10 Q16
Features: DPC OpenMP
Delegates: bzlib fontconfig freetype jng jp2 jpeg lcms lzma pango png ps tiff x xml zlib
svg rect
- GreenKoopa
- Posts: 457
- Joined: 2010-11-04T17:24:08-07:00
- Authentication code: 8675308
Re: svg rect
This reproduces the problem. Viewed at 100% the error is very visible at the top-right corner of each rectangle.
Code: Select all
convert -background white -density 720 a.svg a.png
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 1000 100" enable-background="new 0 0 1000 100" xml:space="preserve">
<line fill="none" stroke="#ff0000" x1="0" y1="1" x2="1000" y2="1"/>
<line fill="none" stroke="#ff0000" x1="0" y1="20" x2="1000" y2="20"/>
<line fill="none" stroke="#ff0000" x1="0" y1="40" x2="1000" y2="40"/>
<line fill="none" stroke="#ff0000" x1="0" y1="8" x2="1000" y2="8"/>
<line fill="none" stroke="#ff0000" x1="0" y1="12" x2="1000" y2="12"/>
<rect fill="none" stroke="#00ff00" x="10" y="1" width="980" height="98"/>
<rect fill="none" stroke="#00ff00" x="25" y="20" width="950" height="60"/>
<rect fill="none" stroke="#00ff00" x="75" y="40" width="850" height="20"/>
<rect fill="none" stroke="#0000ff" x="2" y="8" width="996" height="80"/>
<rect fill="none" stroke="#0000ff" x="2" y="12" width="996" height="80"/>
</svg>