Class Box- Box.h, Box.cc
Definition:
A Box is a rectangular area. A box is specified by its upper left
point, its width and height.
Typedefs:
None
Included:
#include "Point.h"
int width
The width of this box.
int height
The height of this box.
Point
upper_left
The upper left position of this box.
Box()
Default constructor.
Box(Point
* init_point, int w, int h)
Sets the variable upper_left to 'init_point',
width
to 'w' and height to 'h'.
Box(int x, int
y, int w, int h)
Sets the variable upper_left to (x,y), width
to 'w' and height to 'h'.
int getWidth()
Returns the variable width.
int getHeight()
Returns the variable height.
Point
* getUpperLeft()
Returns the variable upper_left.
int getUpperLeftX()
Returns the x value of upper_left.
int getUpperLeftY()
Returns the y value of upper_left.
int getPerimeter()
Returns the value of the perimeter of this box i.e. the bounding box length.
int getHalfPerimeter()
Returns the value of half of the perimeter for this box. Useful when
determining the length of an "L-type" routing.