getVertexCount() etc.
in
Programming Questions
•
2 years ago
I use this svg:
why can't i get the vertexes?
Also i would like to check if the mouse goes over a shape, anyone ideas?
- size(800, 600);
- PShape seats;
- PShape[] seat = new PShape[150];
- seats = loadShape("kamer_plekken02.svg");
- for(int i = 0; i < 150; i++){
- seat[i] = seats.getChild(i);
- }
- smooth();
- noStroke();
- for(int i = 0; i < 150; i++){
- seat[i].disableStyle();
- fill(random(255), random(255), random(255));
- shape(seat[i], 0, 0);
- println(seat[i].getVertexCount()); // all 0
- println(seat[i].getVertexCodeCount()); // all 0
- PShape test = seat[i].getParent();
- println(test.getVertexCount()); // all 0
- }
1