Files
processing4/java/examples/Topics/Create Shapes/SVGPShape/SVGPShape.pde
2012-05-30 18:34:24 +00:00

25 lines
331 B
Plaintext

/**
* SVGPShape
*
* How to load an SVG into a PShape
*/
// PShapoe object
PShape svg;
void setup() {
size(640, 360, P2D);
smooth();
// Load the SVG
svg = loadShape("star.svg");
}
void draw() {
background(255);
// Draw PShape at mouse location
translate(mouseX, mouseY);
shapeMode(CENTER);
shape(svg);
}