Personal computing discussed

Moderators: renee, SecretSquirrel, just brew it!

 
Crayon Shin Chan
Minister of Gerbil Affairs
Topic Author
Posts: 2313
Joined: Fri Sep 06, 2002 11:14 am
Location: Malaysia
Contact:

Getting path/SVG support in a VS Project

Sun Dec 19, 2010 8:37 am

So here's the idea - I take the single line from a SVG file that describes the curve, paste it into a textfield in my program, and then the program draws the path on the screen and controls a human to move his hand along the path.

Problem is, I don't want to rewrite the code to parse the SVG line. First, I'm duplicating work that's been done already, and second, I could introduce bugs. So what do I do? I think including librsvg is good, but librsvg is... well, it depends on so many other libraries it's not even funny. The program that I'm working on has enough dependencies to begin with, AND it's a Visual Studio 2003 Project, so I'm not even sure about how to include those libraries(see my other thread on the issue, I gave up because I was toying with the idea of creating an intermediate fileformat). Is there like a librsvg lite? I just need it to parse a line like

d="M -5.7142857,-4.7806745 200,152.36218 c 0,0 260,-237.142855 191.42857,102.85715"
Mothership: FX-8350, 12GB DDR3, M5A99X EVO, MSI GTX 1070 Sea Hawk, Crucial MX500 500GB
Supply ship: [email protected], 12GB DDR3, M4A88TD-V EVO/USB3
Corsair: Thinkpad X230
 
Flying Fox
Gerbil God
Posts: 25690
Joined: Mon May 24, 2004 2:19 am
Contact:

Re: Getting path/SVG support in a VS Project

Sun Dec 19, 2010 1:39 pm

According to the site you should just need libxml and libart, shouldn't be that bad? Also, are you doing the rendering yourself? The librsvg seems to do rendering as well? A quick search also seems to suggest some other libraries may exist.
The Model M is not for the faint of heart. You either like them or hate them.

Gerbils unite! Fold for UnitedGerbilNation, team 2630.
 
Crayon Shin Chan
Minister of Gerbil Affairs
Topic Author
Posts: 2313
Joined: Fri Sep 06, 2002 11:14 am
Location: Malaysia
Contact:

Re: Getting path/SVG support in a VS Project

Sun Dec 19, 2010 1:56 pm

Look at the libraries at this site:
http://ftp.gnome.org/pub/gnome/binaries ... rsvg/2.22/

They're precompiled for Windows. Look at librsvg-dev_2.22.3-1_win32. They require gdk-pixbuf, which isn't in any of the other zip files that the link provides. GDK imples... it wants GTK too or something, I don't know, but the whole program is already built around Qt 3.3.3! So I really don't want a program that uses GTK and Qt libraries... on Windows.
Mothership: FX-8350, 12GB DDR3, M5A99X EVO, MSI GTX 1070 Sea Hawk, Crucial MX500 500GB
Supply ship: [email protected], 12GB DDR3, M4A88TD-V EVO/USB3
Corsair: Thinkpad X230

Who is online

Users browsing this forum: No registered users and 13 guests
GZIP: On