Bug 433220 - Krita doesn't export vector layers as SVG properly
Summary: Krita doesn't export vector layers as SVG properly
Status: CONFIRMED
Alias: None
Product: krita
Classification: Applications
Component: Layers/Vector (show other bugs)
Version: 4.4.1
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-19 04:56 UTC by Daniel Petrov
Modified: 2024-08-22 16:39 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Petrov 2021-02-19 04:56:55 UTC
SUMMARY
When resizing the image (not resizing the canvas), the SVG coordinates are not updated to scale with the new image size, leaving the vector either cut out or too small in the exported vector layer. When changing the border of a rectangle, changes can be rendered improperly by other SVG editors but renders fine when reopened in Krita. Also renders imroperly in Firefox so if Krita renders it fine then maybe the SVG version is too new?

STEPS TO REPRODUCE
1. Create a new vector layer
2. Make a square
3. Convert the square to a path object
4. Select the path in editor mode (arrow with line and 3 dots)
5. Change the border to square/square (top right and bottom left buttons)
6. Change the border radius to 1px
7. Export as SVG (Layer > Import/Export > Export vector layer as SVG)
8. Resize image to be smaller
9. Export as SVG again, as a different file
10. Open both SVGs in Gwenview

OBSERVED RESULT
1. Border radius/type is clearly different. Try a different brush size if you can't replicate.
2. SVG is not scaled with the new image size
   - Looking in Kate reveals that the SVG coordinates are out of the image bounds, which did change when exporting

EXPECTED RESULT
1. Border radius/type is applied properly
2. SVG scales with image size

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 20.10
(available in About System)
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.74.0
Qt Version: 5.14.2

ADDITIONAL INFORMATION

My SVG as shown in Krita: https://media.discordapp.net/attachments/804125400758091816/812176116651130981/unknown.png
My SVG as shown in Gwenview: https://media.discordapp.net/attachments/804125400758091816/812176367613509663/unknown.png
Comment 1 Dmitry Kazakov 2024-08-22 16:39:19 UTC
Remove triaged keyword from CONFIRMED bugs