Jump to content
THESE FORUMS ARE READ-ONLY: Please Read Me ×

Recommended Posts

Posted

Summary: An SVG file containing a group element with a simple "scale" transform causes a shape to be incorrectly placed.  The bug may be related to incorrectly using a coordinate system based on the viewBox.  

Application:  Affinity Designer 2.1.1

OS: MacOS 13.5

Reproducible: Yes.

Detail:

The attached SVG file describes two concentric circles, centered at (0,0), one red and the other blue.  

The file renders correctly in Inkscape, Safari, Chrome, and Intellij, thus:

image.thumb.png.0a16ff2259b42783addfe8bf53f62b62.png

But when opened in Affinity Designer, the blue circle is centered at (500,500) while the red circle is centered at (25000, 25000):

image.thumb.png.44de2a8048685919239b4e2372257a39.png

If the viewBox is deleted from the SVG file, the result is then correct. I suspect that the "transform" is being applied relative to the corner of the viewBox; but that is incorrect. Transforms apply in the "user coordinate system", not the viewBox coordinate system.

Here's a wild guess:  perhaps, in an effort to avoid showing unsightly negative coordinates in the UI, AD incorrectly handles the case of the viewBox having negative coordinates: it simply added a "translate(+500,+500)", and the scale() transform got applied after that.  But as you can see, that would be incorrect behavior.

bug-6.svg

  • Staff
Posted

Hi Purple,

I have logged this with our developers to be fixed in a future update :)

Thanks
C

Please tag me using @ in your reply so I can be sure to respond ASAP.

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.