We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello everyone,
I'm running Processing 2.2.1 and I'm getting in trouble when trying to see if a point is inside or outside a PShape object created by loading an SVG file with the .loadShape("filename.svg") function.
The code is the following:
PShape s;
void setup() { size(1920, 1200); s = loadShape("Organo1.svg"); }
void draw() { background(0); stroke(0, 0, 0, 0); shape(s); s.contains(10, 10); }
The error which I obtain is the following:
"The contains() method is only implemented for paths."
How can I fix it?
Thanks in advance, FD
Answers
The best solution might be to edit the svg file in a program like inkscape and see if you can save the information in the svg file as a path.