NegativeArraySizeException in shape()
in
Programming Questions
•
2 years ago
I am having an issue with the following code:
- // GLOBALS
- PShape[] spzlSet;
- String baseURL = "";
- String[] spzlURLs = {
- "spazzl1.svg",
- "spazzl2.svg",
- "spazzl3.svg"
- };
- // SETUP
- void setup(){
- // use full screen
- size(screen.width, screen.height);
- background(255);
- smooth();
- // load shapes
- spzlSet = new PShape[spzlURLs.length];
- String s;
- for (int i=0; i<spzlURLs.length; i++){
- s = baseURL+spzlURLs[i];
- println(s);
- spzlSet[i] = loadShape(s);
- }
- println("size: "+spzlSet.length);
- shapeMode(CORNER);
- noLoop();
- }
- // DRAW
- void draw(){
- background(255);
- for (int i=0; i<spzlSet.length; i++){
- shape(spzlSet[i], 30+130*i, 30, 100, 111);
- }
- }
Any ideas?
Jon
1