Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
dmrieder
dmrieder's Profile
1
Posts
1
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Problem with text rotation
[2 Replies]
06-Jul-2011 01:01 PM
Forum:
Programming Questions
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;
}
}
«Prev
Next »
Moderate user : dmrieder
Forum