xxxxxxxxxx
25
function setup() {
createCanvas(windowWidth, windowHeight);
background(255,255,255);
frameRate(20);
} // end of the setup() function
function draw() {
}
function mouseDragged() {
stroke(0, 0, 100, 60);
strokeWeight(2);
line(mouseX, mouseY -10, mouseX, mouseY + 10)
}
function keyPressed() {
noStroke();
fill(mouseX,0,0, mouseY);
ellipse(mouseX, mouseY, 60, 20);
}
function doubleClicked() {
save('my_drawing.png');
}