void setup() { size(200, 200); background(255); } void draw() { background(255); fill(mouseX*255/width); quad(50, 50, 150, 50, 150, 150, 50, 150); }