We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › WHY WON'T MY TEXT SHOW!!
Page Index Toggle Pages: 1
WHY WON'T MY TEXT SHOW!?!? (Read 655 times)
WHY WON'T MY TEXT SHOW!?!?
Apr 21st, 2010, 1:13pm
 

void setup(){
size(700,400);
smooth();
background(255);
 strokeWeight(5);
 PFont font;
font = loadFont ("Arial-Black-12.vlw");
textFont(font);
fill (0);
text("AFTER Processing entered my life...", 10,370);
text("... BEFORE Processing entered my life", 450,370);



}
void draw(){
background(255); //white background
fill(255,230,0); //yellow face colour
ellipse (350,150,200,200); // face
fill (0);
ellipse (320, 120, 15, 30); //left eye
ellipse (380, 120, 15, 30); //right eye
noFill(); // Smile
beginShape();
vertex(300, 190);
bezierVertex(310, mouseX/2-100, 390, mouseX/2-100, 400, 190);
endShape();
float angle = map(mouseX-100, 0, width, 0, PI/5);// Brow
translate(370, 90);
rotate(angle);
line(0, 0, 30, 0);
}





Re: WHY WON'T MY TEXT SHOW!?!?
Reply #1 - Apr 21st, 2010, 6:01pm
 
because the draw method paints something different. 30 times in a second. its immdiatly gone.

Code:

void setup(){
size(700,400);
smooth();
background(255);
strokeWeight(5);
PFont font;
font = loadFont ("Arial-Black-12.vlw");
textFont(font);
fill (0);
text("AFTER Processing entered my life...", 10,370);
text("... BEFORE Processing entered my life", 450,370);
}

boolean smile;

void mousePressed() {
smile=true;
}

void draw(){
if(smile)
drawStuff();
}

void drawStuff() {
background(255); //white background
fill(255,230,0); //yellow face colour
ellipse (350,150,200,200); // face
fill (0);
ellipse (320, 120, 15, 30); //left eye
ellipse (380, 120, 15, 30); //right eye
noFill(); // Smile
beginShape();
vertex(300, 190);
bezierVertex(310, mouseX/2-100, 390, mouseX/2-100, 400, 190);
endShape();
float angle = map(mouseX-100, 0, width, 0, PI/5);// Brow
translate(370, 90);
rotate(angle);
line(0, 0, 30, 0);
}
Re: WHY WON'T MY TEXT SHOW!?!?
Reply #2 - Apr 22nd, 2010, 12:58am
 
Please, avoid all caps subject lines, whatever the urgency/importance of the topic. Thanks.
Page Index Toggle Pages: 1