Page 1 of 1

bug in SVG renderer

Posted: 2012-09-12T11:00:41-07:00
by jms_nh
OS = Windows 7

Version: ImageMagick 6.7.9-4 2012-09-08 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP

iconvert -size 400x400 s3.svg s3.png looks like this, but it should be a rotated square touching the circle at 4 points

Image

s3.svg:

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg">
  <g id="layer1">
	<circle cx="200" cy="200" r="200" stroke="black"
		stroke-width="0.5" fill="none"/>
	<g transform="rotate(48 200 200)">
      <path id="path00" style="fill:#dca08c;stroke:#000000;stroke-width:1"
   	     d="M 200,0 L 400,200 L 200,400 L 0,200 z"/>
    </g>
  </g>
</svg>

Re: bug in SVG renderer

Posted: 2012-09-12T12:36:45-07:00
by magick
We can reproduce the problem you posted. Currently we do not have an ETA on a fix. If you want to take a look yourself, see coders/svg.c, method SVGStartElement(). Inside this method is a case for "rotate". It looks like the tx and ty members of the affine structure is not set properly.