Welcome Guest! You need to login or register to make posts.



Go to last post Go to first unread
Chris Jones  
#1 Posted : Friday, June 22, 2018 4:50:44 AM(UTC)
Chris Jones

Rank: Advanced Member

Groups: Member
Joined: 6/9/2016(UTC)
Posts: 34

Thanks: 22 times
In our software, we have the ability to have premade vector icons/images that users can put onto our designer.

Currently i have a simple tool to take an svg file, extract its path data, pull it into our own format so that during rendering we can generate GraphicsMill Path's and use user selected fill colours (e.g. user can change the background or foreground colours).

Our tool for importing this and generating these Path objects is quite limited, mainly to match the functions available on the GraphicsMill Path class, so purely absolute coordinate commands like lines and bezier curves. We don't support arcs or relative coordinates etc.

As you have code to load in full SVG files for rendering, could you help/provide me with any of the following:

  • Existing GraphicsMill classes/methods i can call to generate Path's from SVG path data (we store the path data in our database, not a full SVG file itself)

  • Sample/example code on how to parse SVG path data (arcs, relative coordinates for path commands) and turn them into GraphicsMill Path objects

  • Good links/tutorials on how to do it if you can't share any code?

  • Any advice at all :)

Hope that makes sense, thanks

Eugene Kosmin  
#2 Posted : Sunday, June 24, 2018 4:57:50 PM(UTC)
Eugene Kosmin

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 9/19/2006(UTC)
Posts: 481

Was thanked: 30 time(s) in 30 post(s)
Hi Chris,

Please have a look at this sample on our GitHub. I believe you can use the same approach for parsing SVG files.

Don't hesitate to ask if anything goes wrong.

Best regards,

Eugene Kosmin

The Aurigma Development Team

Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.