• fullscreen
  • sketch20314.pde
  • int xwidth=960;
    int ylength=540;
    
    void setup(){
    size(xwidth,ylength);
    background(223,213,197);
    smooth();
    }
    
    void draw (){
      fill(255);
      rectMode(CENTER);
      if (mousePressed && (mouseButton== LEFT)){
      noFill();
      stroke(142,14,14);
      strokeWeight(1.5);
       rect(mouseX,mouseY,45,45);
         }
       else if(mousePressed && (mouseButton == RIGHT)){
         noStroke();
         fill(223,213,197,50);
         //strokeJoin(ROUND);
         rect(mouseX,mouseY,45,45);
         }
    }
    
    void keyPressedd(){
    if (key=='s'){
      saveFrame();
    }
    }               

    code

    tweaks (1)

    license

    advertisement

    ana carolina villa

    RED SQUARES

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

    mouse pressed / left click = red square stroke
    mouse pressed / right click = red square fill

    press 's' to save your frame

    You need to login/register to comment.