|
Adaptagrams
|
A common interface used by the Polygon classes. More...
#include <geomtypes.h>


Public Member Functions | |
| PolygonInterface () | |
| Constructor. | |
| virtual | ~PolygonInterface () |
| Destructor. | |
| virtual void | clear (void)=0 |
| Resets this to the empty polygon. | |
| virtual bool | empty (void) const =0 |
| Returns true if this polygon is empty. | |
| virtual size_t | size (void) const =0 |
| Returns the number of points in this polygon. | |
| virtual int | id (void) const =0 |
| Returns the ID value associated with this polygon. | |
| virtual const Point & | at (size_t index) const =0 |
| Returns a specific point in the polygon. More... | |
| Polygon | boundingRectPolygon (void) const |
| Returns the bounding rectangle for this polygon. More... | |
| Box | offsetBoundingBox (double offset) const |
| Returns the bounding rectangle that contains this polygon with optionally some buffer space around it for routing. More... | |
A common interface used by the Polygon classes.
|
pure virtual |
Returns a specific point in the polygon.
| [in] | index | The array index of the point to be returned. |
Implemented in Avoid::ReferencingPolygon, and Avoid::Polygon.
Referenced by offsetBoundingBox(), and Avoid::Polygon::Polygon().

| Polygon Avoid::PolygonInterface::boundingRectPolygon | ( | void | ) | const |
Returns the bounding rectangle for this polygon.
References Avoid::Box::max, Avoid::Box::min, and offsetBoundingBox().
Referenced by Avoid::ClusterRef::setNewPoly().


| Box Avoid::PolygonInterface::offsetBoundingBox | ( | double | offset | ) | const |
Returns the bounding rectangle that contains this polygon with optionally some buffer space around it for routing.
If a buffer distance of zero is given, then this method returns the bounding rectangle for the shape's polygon.
| offset | Extra distance to pad each side of the rect. |
References at(), Avoid::Box::max, Avoid::Box::min, size(), Avoid::Point::x, and Avoid::Point::y.
Referenced by boundingRectPolygon(), Avoid::ShapeConnectionPin::position(), and Avoid::ShapeRef::transformConnectionPinPositions().


1.8.14