We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello All,
I have a program that was originally written for processing 2, and I'm trying to move it over to processing 3. None of the GUI will show up, though. I can change the background color of the window, but I can't make text or any tracings appear. I'm running Windows 10, but this is also the case on Mac OS. For the sake of experiment, I tried starting from scratch and adding element by element back in. I can't even make text show up in the new program. What am I missing here?
From Scratch Program:
PFont font;
void setup () {
// set the window size
surface.setSize(2000, 500);
// set initial background to white
background(255, 255, 255);
textAlign(CENTER,TOP);
textSize(32);
text("word", 10, 30);
fill(0, 102, 153);
}
Answers
Replace this surface.setSize(2000, 500);
with size(1200,500);
Fill must be before text
the code in the reference works:
also, back to your code, if you change the background to mid grey you can see your text flash up in white (and massively oversize).
change the surface.setSize()(????) to just size() and it'll stay but is white on white. your fill is after the text so it's not having any effect.
Thank you for the input. I got the text to display, but it broke again after I added "println(Serial.list());"
PFont font; Serial myPort; void setup () { // set the window size size(2000, 500);
fill(255,0,0); textAlign(CENTER);
}
edit post, highlight code, press ctrl-o to format