Vector Drawing Library question

Just starting out? Need help? Post your questions and find answers here.
User avatar
MCP
New User
New User
Posts: 6
Joined: Fri Aug 13, 2010 8:16 pm

Vector Drawing Library question

Post by MCP »

Hi all,
I really like the vector drawing functions but I'm wondering how I can load/save my vector drawings as presumably an .svg file? There doesn't seem to be an obvious way to do this in the command set given. Any help on this would be appreciated. Thanks.

PS: Sorry if this question has been asked before. I couldn't find anything on the forum search.
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3942
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: Vector Drawing Library question

Post by wilbert »

For Linux, there's SvgVectorOutput(Filename$, Width.d, Height.d [, Unit])
Unfortunately this isn't available for Windows and OSX.
Windows (x64)
Raspberry Pi OS (Arm64)
User avatar
MCP
New User
New User
Posts: 6
Joined: Fri Aug 13, 2010 8:16 pm

Re: Vector Drawing Library question

Post by MCP »

Yes I'm using Windows. Sorry I forgot to mention that. Looks like I'm stuck then. Thanks for you reply.
infratec
Always Here
Always Here
Posts: 7593
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Vector Drawing Library question

Post by infratec »

Not a full stuck :mrgreen:

http://www.purebasic.fr/english/viewtop ... 12&t=40540

But I don't know how easy it is to redraw everything.

Bernd
User avatar
MCP
New User
New User
Posts: 6
Joined: Fri Aug 13, 2010 8:16 pm

Re: Vector Drawing Library question

Post by MCP »

Thanks, I'll have a look at that!
Hadrianus
User
User
Posts: 34
Joined: Wed Mar 27, 2013 11:31 pm

Re: Vector Drawing Library question

Post by Hadrianus »

I just store every line, piece of text, etc in a linked list (position, line thickness, color, etc). And I save all the elements in this linked list in a common file. When I want to continue my drawing I simply open the file and let the computer redraw first. I think Autocad works also the same like this.
User avatar
MCP
New User
New User
Posts: 6
Joined: Fri Aug 13, 2010 8:16 pm

Re: Vector Drawing Library question

Post by MCP »

Hadrianus wrote:I just store every line, piece of text, etc in a linked list (position, line thickness, color, etc). And I save all the elements in this linked list in a common file. When I want to continue my drawing I simply open the file and let the computer redraw first. I think Autocad works also the same like this.
I was thinking along the same lines. Just store everything in a list making sure to preserve hierarchy and save it to a file. It might be possible to import/export simple svg files looking at the code infratec provided a link for. Thanks for all your help. I've at least got something I can work with :D
Seymour Clufley
Addict
Addict
Posts: 1265
Joined: Wed Feb 28, 2007 9:13 am
Location: London

Re: Vector Drawing Library question

Post by Seymour Clufley »

Sorry to do this, but PureSVG can help.
JACK WEBB: "Coding in C is like sculpting a statue using only sandpaper. You can do it, but the result wouldn't be any better. So why bother? Just use the right tools and get the job done."
Post Reply