class Shape { int x; int y; int w; int h; float s = 1; boolean resize = false; PImage p = new PImage(width,height); color curr_color; public Shape(int x,int y,int w,int h){ this.x = x; this.y = y; this.w = w; this.h = h; updateP(); } private void updateP(){ p.loadPixels(); for(int i=0; ix&&mouseYy; } public boolean isOverR(){ return mouseX>=x+w*s+4&&mouseX<=x+w*s+16&&mouseY>=y+h*s+4&&mouseY<=y+h*s+16; } }