• fullscreen
  • les4.pde
  • void setup ()
    {
      size (400,420);
    }
    
    void draw ()
    { background (0);
    
      if (mouseX< width/2 && mouseY<210)
      { fill (220,0,0);
        rect(0,0,200,200);
      }
      
      if(mouseX > width/2 && mouseY<height/2)
      {
        fill (0,220,0);
        rect(200,0,200,200);
      }
      if (mouseX < width/2 && mouseY >height/2)
     { fill (0,0,200);
      rect(0,200,200,200);
    }
    if (mouseX> width/2 && mouseY > height/2)
    { fill(20,150,70);
    rect(200,200,200,200);
    }
    ;
    for (int i=0; i<20; i++)
    { int kleur = 255 - (i * (255/20));
    fill (255, kleur, kleur);
    rect (i*20, 400, 20, 20);
     
    }
    }
      
    

    code

    tweaks (0)

    about this sketch

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

    license

    advertisement

    marina nienhaus

    huiswerk 4

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

    Floris Ver.
    6 Nov 2009
    ik wou dat ik dit als huiswerk had zou een stuk leuker zijn
    You need to login/register to comment.