Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exported .svg file is not editable #3

Open
goszlanyi opened this issue Jun 30, 2020 · 3 comments
Open

exported .svg file is not editable #3

goszlanyi opened this issue Jun 30, 2020 · 3 comments

Comments

@goszlanyi
Copy link

goszlanyi commented Jun 30, 2020

@jkrumbiegel
First of all, thank you very much for making this package available.
Maybe it is too early to report any issues or ask any questions, but here is one.

I have exported some examples (with or without multiple layers) in .svg format,
imported them into Inkscape, did the ungrouping step, but unfortunately
I could not edit the components, except from removing the background.

Maybe Inkscape is not good at ungrouping, but what could be done about it?
I am asking this, because postprocessing a figure is often very useful or even inevitable.

@jkrumbiegel
Copy link
Owner

Hi, glad that you're interested in the package. I've just started noticing things like this as well, when opening images in illustrator. I don't have my own svg engine here, it's just Cairo.jl in the background that is doing all drawing. I think that drawing operators other than :over are not supported in svg so the image gets flattened to a bitmap before those layers are added. That could be the case for you. The other thing is that Cairo's layer functionality (push and pop group) creates a much "messier" svg structure than illustrator does. I think the only remedy would be to take control of the svg export, but that could get very complex.. Maybe I could use Compose.jl but I'm not sure if they support all the features regarding clipping etc

@goszlanyi
Copy link
Author

goszlanyi commented Jul 1, 2020

Thank you for your prompt answer.
I did not know that exporting .svg files is so complex.
But today I also noticed that importing the same .svg files also differ,
e.g. Vectr online can separate the components that Inkscape could not.

@jkrumbiegel
Copy link
Owner

Maybe it's not so complicated after all to write my own little svg output engine, at least the output I get from illustrator doesn't appear to be so complex. That would be highly beneficial to not rely on Cairo and I could probably do optimizations as well with markers and glyphs etc that Cairo doesn't do. I'll see if I have time at some point

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants