bug in SVG renderer

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
jms_nh
Posts: 1
Joined: 2012-09-12T10:53:51-07:00
Authentication code: 67789

bug in SVG renderer

Post 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>
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: bug in SVG renderer

Post 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.
Post Reply