Changes

Jump to: navigation, search

FSOSS 2010/processing.js/example6

16 bytes added, 15:05, 25 October 2010
no edit summary
/*
FSOSS 2010
Example of line, ArrayList, mousePressed, mouseReleased
*/
boolean drawingLine = false;
float lineX1lineX;float lineY1; float lineX2;float lineY2lineY;
ArrayList lineCoords;
}
//
if(drawingLine){
line(lineX1lineX, lineY1lineY, mouseX, mouseY);
}
}
void mousePressed(){
drawingLine = true;
lineX1 lineX = (float) mouseX; lineY1 lineY = (float) mouseY;
}
drawingLine = false;
lineCoords.add(lineX1lineX); lineCoords.add(lineY1lineY);
lineCoords.add((float) mouseX);
lineCoords.add((float) mouseY);
1
edit

Navigation menu