We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOther Libraries › SVG import Library query
Page Index Toggle Pages: 1
SVG import Library query (Read 353 times)
SVG import Library query
Dec 18th, 2008, 4:54pm
 
Hi,

I am a beginner and so I apologise about the low level nature of my question. I can't wait to get illustrator vectors into my sketches. But I am using processing 0125 and have downloaded the SVG import library from this link:

http://www.ghost-hack.com/p5/svgimport/
 
However, when I try and run the example that comes with the download, it says that regarding this line:
 mysvg.draw(LINE_STRIP,35,120);

"No accessible field names LINE_STRIP was found in temporary..."

I'm sure it's me doing something wrong as I noticed that the library was for processing 0097. Does this make a difference.  

Here is the code for the example for reference:

import svgimport.*;

//SVG Path importer by Michael "Flux" Chang
//Version 1.0 ...
//All questions about this software,
//the library, and examples can be directed at mflux@ucla.edu

//This example shows you the basics of how to load an SVG, and how to display it to screen



//Make a new variable of type svgpath
svgpath mysvg;

void setup()
{
 size(350,350);  
 
 //initialize the svg here, with a reference pointer to the app using "this"
 //copy your svg into the datafolder, then use a string to define the filename, here "svgcat.svg"
 mysvg=new svgpath("svgcat.svg",this);  

 smooth();
}
void draw()
{
 background(255);
 
 //use the variable method draw() to show to screen
 //the first variable is your style of drawing. These can be found in reference, such as LINE_STRIP, LINE_LOOP, POLYGON, etc
 //the second and third variable define where it will be draw on the screen, using 0,0 of the svg as the beginning
 mysvg.draw(LINE_STRIP,35,120);
}



Thankyou,
JHT83
Re: SVG import Library query
Reply #1 - Dec 18th, 2008, 8:35pm
 
Uh? Any reason why you use such old version of Processing? The latest versions has SVG support built in.
Page Index Toggle Pages: 1