Hi all,
I am having a problem with
text becoming filled in rectangles whenever the window is resized. Other graphics are ok. I am using processing 1.0.5.
I have tried multiple computers and multiple code. I found another post with a different issue, and tried their example code below and it does the same thing. Anyone else have the same problem? Is there a workaround or am I doing something wrong?
Thanks
Code:import javax.media.opengl.*;
import processing.opengl.*;
void setup() {
size(310,310,OPENGL);
PFont myFont = createFont("Sans", 16);
textFont(myFont);
frame.setResizable(true);
}
void draw() {
background(10);
stroke(153);
noFill();
rect(1,1,width-3,height-3);
fill(150);
for (int i=0;i<width;i+=10) {
int h;
if (i % 100 == 0) h = 20;
else if (i % 50 == 0) h = 10;
else h = 5;
line(i,10,i,h+10);
}
for (int i=0;i<width;i+=100) {
if (i==0) textAlign(LEFT);
else textAlign(CENTER);
text(""+i,i,30);
}
textAlign(RIGHT);
text("Current Size = "+width+"x"+height,width-15,height-20);
}