Open Gulvan0 opened 2 years ago
After some trial and error, I concluded that the cause of this bug is a faulty relative path commands processing. Still unsure whether this is due to the accumulated floating-point error or some specific commands lead to the wrong results.
After seeing your issue I got a bit worried about this SVG library, so I used Adobe Animate CC instead to convert a SVG into a SWF movie...
After seeing your issue I got a bit worried about this SVG library, so I used Adobe Animate CC instead to convert a SVG into a SWF movie...
It's usable, but you need to manually convert every path in those of your svgs that are rendered wrong to all-absolute. This is a good tool for that purpose: https://yqnn.github.io/svg-path-editor/
Describe the bug The contours of a simplistic black-and-white SVG get heavily distorted on rendering, though the general shape is still somewhat recognizable. As if some of the key points of the Bezier curves are misplaced (and some aren't). Favicon is also affected by this bug.
To Reproduce Just launch the app
Expected behavior Shape rendered by openfl and shape rendered by browser when the SVG file itself is opened should look the same
Screenshots Original image (tested in latest Chrome & Maxthon):![image](https://user-images.githubusercontent.com/16256911/159960045-f05e5fbd-30a3-4651-a37c-952edf568999.png)
Result in OpenFL:
![image](https://user-images.githubusercontent.com/16256911/159958699-db9cfe8b-1321-49c1-8ba5-cd0cb687905e.png)
Environment Target: html5 Haxe version: 4.2.4 Libraries:
Additional details
<icon>
tag can be removed from project.xml, it doesn't affect anything. It is there just to demonstrate that this effect is present even for the favicon. This bug forced me to try unchecking "Make Adaptive" and choosing "Presentation Attributes" style preference in the Adobe Illustrator SVG export options. The attached archive is the final version of the repro. Still, the bug is there for the default export settings too.Testing.zip