• fullscreen
  • signatureMousedown.pde
  • boolean isDrawing = false;
    
    void setup(){
      size(400,200);
      background(100);
    }
    
    void mousePressed() {
      isDrawing=true;
    }
    
    void mouseReleased() {
      isDrawing=false;
    }
    
    void draw() {
      fill(0);
      if(isDrawing) {
        //point(mouseX, mouseY);
        line(mouseX,mouseY,pmouseX,pmouseY);
      }
    }
    
    
    

    code

    tweaks (0)

    about this sketch

    This sketch is running as Java applet, exported from Processing.

    license

    advertisement

    Cameron Cundiff

    Sign Here

    Add to Faves Me Likey@!
    You must login/register to add this sketch to your favorites.

    Draw inside the window with your mouse.

    You need to login/register to comment.