I create a lot of pdf's, only it can take really long (like 5 hours) cause everything is also rendered on the screen.
if i have this, the script runs fine
size(1600, 674);
if i do this:
size(1600, 674, PDF, "wtf.pdf")
then i get:
IndexOutOfBoundsException: Index: 2, Size: 2
on this line:
NamePart nPart = name.nameParts.get(index2);
in this script:
- void loadNames(){
- String[] lines = loadStrings("savedNames.txt");
- for(int i = 0; i < lines.length; i++){
- String[] tokens = splitTokens(lines[i], "\t");
- int index = int(tokens[0]);
- //int id = int(tokens[1]);
- int align = int(tokens[1]);
- float easing = float(tokens[2]);
- float maxSpeed = float(tokens[3]);
- Name name = names.get(index);
- //name.id = id;
- name.align = align;
- name.easing = easing;
- name.maxSpeed = maxSpeed;
- for(int j = 4; j < tokens.length; j++){
- String[] tokens2 = splitTokens(tokens[j], ";");
- int index2 = int(tokens2[0]);
- float x = float(tokens2[1]);
- float y = float(tokens2[2]);
- float targetX = float(tokens2[3]);
- float targetY = float(tokens2[4]);
- float destX = float(tokens2[5]);
- float destY = float(tokens2[6]);
- println(index2 + " " + name.nameParts.size());
- NamePart nPart = name.nameParts.get(index2);
- nPart.x = x;
- nPart.y = y;
- nPart.targetX = x;
- nPart.targetY = y;
- nPart.destX = destX;
- nPart.destY = destY;
- }
- }
- println("loaded name positions");
- };
This doesn't make any sense to me, i tested more then once, also in the new unreleased processing.
Does anyone have a clue?
Or another way then size(1600, 674, PDF, "wtf.pdf") to don't render on screen?
1