rec = new Rectangle(minx, miny, maxx - minx, maxy - miny); //Cbox