Jump to content
You must now use your email address to sign in [click for more info] ×

SVG rounded rectangle issue


Volker F

Recommended Posts

Hello,

I think I encountered a rendering bug for SVG files that use rounded rectangles. I only came across the issue in the latest version (1.8.5.703) of Designer (and Photo) and can't verify if it is present in previous versions. As I have just noticed this, I was not able to inspect a lot of different input files and can only provide one specific example.

Steps to reproduce:

  • An example SVG is available from the Papirus icon collection on github, specifically the builder.svg icon.
  • Loading or placing the file in Designer (or Photo) incorrectly renders the rounded rectangles (see left part of attached image).

designer_render.png.b1b2721e0b426f70cf4e9847c4939a3f.png

Expected results:

  • The expected result is shown on the right of the attached image.
  • Opening the SVG image in major browser brands renders it correctly, the same is true for several online SVG editors, Inkscape, Illustrator, etc.

Issue details:

  • While trying to understand what was going wrong, I found that the original SVG uses only 'ry=...' to define the roundness of the rectangle edges.
  • Replacing all 'ry=...' with 'rx=...' in the original SVG file allows Designer (and Photo) to correctly render the rounded rectangles (as shown in the right part of the attached image).

At a first glance it would seem that Designer (wrongly) ignores the "roundness" parameter when specified only via 'ry=...'.

And also: thank you for the great work you are doing with these very nice tools 😃

Kind regards,

Volker

Link to comment
Share on other sites

I ran into the same issue. My observation is that when there are different values specified for rx and ry in the SVG file, the rx-value "wins" and is used for both in Affinity Designer.

As far as I understand, Designer cannot apply different values for rx and ry. In this case the rounded rectangle should be converted into a curve on import.

The same issue can be observed in Publisher when embedding or linking SVG files.

I attached a simple test file. On the screenshot you can see the different appearance in Inkscape and Affinity Designer1784005452_roundedrectanglescreenshot.thumb.png.b9417462d2df7a08a7815ea8bba592b6.png

rounded rectangle.svg

Link to comment
Share on other sites

  • Staff
11 hours ago, max1josef said:

As far as I understand, Designer cannot apply different values for rx and ry. In this case the rounded rectangle should be converted into a curve on import.

Thanks for the file - I've passed that suggestion on to development in those situations! :)

Link to comment
Share on other sites

  • 4 months later...

This is an issue which i experience very often. I used to use Inkscape and want to migrate my SVG files to Affinity Designer.

My experience is that AD completley ignores the ry property of rounded rectancles.

I attached a sample svg files which includes two rectangles. One where only rx is set and one where only ry is set. Affinity Designer does not import this correctly.

image.thumb.png.2a22bba03c7a1bff6d28c93e7bed5afe.png

 

I hope a fix will be included in the next release as this bug is preventing me from a complete migration to Affinity Designer.
 

Edit: This post describes the same issue as the original one, sorry for the duplicate comment.

rounded_rectangle.svg

Edited by Bennik2000
Link to comment
Share on other sites

It is a little weird that RY is not supported in Affinity:

https://www.w3.org/TR/SVG11/shapes.html#RectElementRYAttribute

RX and RY are simply just standard attributes of the RECT element in SVG 1.1.

It is obvious that it will lead to incompatibility and loss of interoperability with browsers and other drawing programs. 

  • "The user interface is supposed to work for me - I am not supposed to work for the user interface."
  • Computer-, operating system- and software agnostic; I am a result oriented professional. Look for a fanboy somewhere else.
  • “When a wise man points at the moon the imbecile examines the finger.” ― Confucius
  • Not an Affinity user og forum user anymore. The software continued to disappoint and not deliver.
Link to comment
Share on other sites

  • 7 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • 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.