Files
processing4/java/examples/Topics/Create Shapes/SVGPShape/SVGPShape.pde
2012-07-17 19:08:14 +00:00

25 lines
330 B
Plaintext

/**
* SVGPShape
*
* How to load an SVG into a PShape
*/
// PShape 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);
}