Svg export problem

Hello. I try to export vector layer as svg, but Krita export the whole scale of my project, not just vector shape.


Is there any way to export only the vector shape without empty space around it?
I tried to create new file with the same height and width as the shape and copy/paste it, but after export i have blank svg file. Its because vector shape is saving with the same positions parameters as it has in original file.

I don’t know of any way to do this because the .svg code specifies the position of the shape as part of the entire image.
There is a way around it and that is to edit the .svg code in an exported .svg file to remove any transform statements.

What a pity. I think it’s for the next updates. If only I could code.

I’m a bit interested in this problem, so I’ll going to check improve ways it…

3 Likes

would be great.

1 Like

I hope this helps.
I was able to create it in a short amount of time because I had the basic scripts and information about Krita’s SVG processing that I had created and researched over the past few months. :slightly_smiling_face:

https://krita-artists.org/t/export-shapes-as-svgs-plug-in/92243

This resets the matrix translate component and translate parameter of the transform attribute of the exported SVG data, and sets the viewport centered on shape.
Only Text shape could not get transform atrtibute with toSVG(), so I workaround got it from matrix.

3 Likes

Amazing! Thank you very much for your work)))

1 Like

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.