JHT83
YaBB Newbies
Offline
Posts: 49
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