Skip to content
Permalink
911cc8d56f
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
24 lines (22 sloc) 352 Bytes
class BoundingBox {
float x1, x2, y1, y2;
color _c;
public BoundingBox(float _x1, float _x2, float _y1, float _y2)
{
x1 = _x1;
x2 = _x2;
y1 = _y1;
y2 = _y2;
}
void setColor (color c) {
_c = c;
}
void draw()
{
pushStyle();
stroke(0);
fill(_c);
rect(x1, y1, x2 - x1,y2 - y1);
popStyle();
}
}