You are on page 1of 2

Processing on desktop vs Processing for Android

It's the same code run Processing on desktop and Android, with Android Mode.

Run on Nexus One:


Run on desktop:



The example code:
void setup(){
size(400, 300);
background(0);
stroke(255);
}

void draw() {

noFill();

if(mousePressed){
background(0);
point(mouseX, mouseY);
line(80, 50, mouseX, mouseY);
line(50, 200, 350, 250);
curve(80, 50, mouseX, mouseY, 50, 200, 350, 250);

}

}

You might also like