Problem with text rotation
in
Programming Questions
•
2 years ago
I can't understand why the text won't rotate in the following sketch. I could really use some help! Thank you.
PFont font;
float angle;
int counter;
int xyspacing;
Boolean finished;
int row;
int column;
int end;
int x;
int y;
String s;
void setup() {
size(800,650, P3D);
font = loadFont("AgencyFB-Reg-48.vlw");
textFont(font);
counter = 1;
finished = false;
xyspacing = 18;
frameRate(15);
row = 1;
column = 1;
end = 6;
x = 50;
y = 50;
angle = 0.0;
fill(0);
textAlign(LEFT, CENTER);
textMode(SCREEN);
}
void draw() {
if((column <= row) && !finished) {
s = str(column * row);
pushMatrix();
translate(50,50);
rotate(PI/3.0);
text(s, x * column, y * row);
popMatrix();
column++;
}
else if(row <= end) {
column = 1;
row++;
}
else {
finished = true;
}
}
1