-
-
Notifications
You must be signed in to change notification settings - Fork 200
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
Import SVG #266
Comments
What kind of a string does the parser need to emit? |
Standard SVG path data like |
GSVG makes you parse your SVG files to a GObject based model easy! https://gitlab.com/pwmc/gsvg Seeking on valadoc.org see Goo namespace have a 1 to 1 relation to SVG shapes, so this could be the way:
Keep librsvg out here. It is a raster library to produce images from SVG and there is no API to create the shapes. GSvg has been created with the W3C recomendation's API in mind https://www.w3.org/TR/SVG11/ |
@esodan we already play with it in akiraux/libgtkcanvas#27, so I think we can do the mapping now we have our own derived Akira Objects from goocanvas. @Alecaddd time to import our motorcycle! |
Expected Behavior
When importing an SVG file, the software should automatically convert the image into an SVG string and create a new
Goo.CanvasPath
in order to keep that element editable and scalable.Current Behavior
SVGs are getting imported as regular raster images.
Possible Solution
Goo.CanvasPath
andGoo.CanvasPathModel
allow loading SVG data as string, so we need a parser to convert an imported SVG into a string, and generate a path we can edit.Most likely this will happen once we can handle groups, as most SVGs come with multiple shapes inside, so for each shape a Path should be created, and the entire SVG should be converted into a folder group.
Do we need to use any particular library like
librsvg
,gsvg
, or similar?The text was updated successfully, but these errors were encountered: