tite fractale

hello.pde

télécharger

// Tweaked from:
// http://en.wikipedia.org/wiki/Processing_(programming_language)#Hello_World

void setup() {
    // define the window size & enable anti-aliasing
    size(200, 200);
    smooth();
    // define FPS
    frameRate(2);
    // set up the font (system default sans serif)
    textFont(createFont("SansSerif",18));
    textAlign(CENTER);
}

void draw() {
    // Reset background.
    background(127);
    // Random integers for a random color.
    int R = int(random(256));
    int G = int(random(256));
    int B = int(random(256));
    // Set "ink" color for rendering text.
    fill(R,G,B);
    // Draw text to screen using the previously set font, ink...
    text("Hello World!", width/2, height/2);
}









Page générée le 27/05/2021, 09h53'27" (page virtuelle).
historique global