Inheritance diagram for oaPolygon:
Public Methods | |
oaUInt4 | getNumPoints () const |
void | getPoints (oaPointArray &points) const |
oaBoolean | isOrthogonal () const |
void | setPoints (const oaPointArray &points) |
oaRect * | convertToRect () |
Static Public Methods | |
oaPolygon * | create (oaBlock *block, oaLayerNum layerNum, oaPurposeNum purposeNum, const oaPointArray &points) |
1) No duplicate (coincident) points -- duplicate points throw an exception (use oaPointArray::compress to remove coincident points).
2) No collinear edges -- that is, three or more collinear points are illegal and cause an exception to be thrown (use oaPointArray::compress to remove collinear points).
3) Polygon edges should not cross. An exception is NOT thrown if polygon edges cross, but oaPointArray::compress will produce incorrect results if the edges connected by the points in the array cross.
4) oaPolygon functions that throw exceptions for collinear and coincident points, such as oaPolygon::create and oaPolygon::setPoints, assume that the polygon point array is closed--that is, that an edge connects the first and last polygon points specified in the array (since a polygon cannot have coincident points, the first and last polygon points must be different points).
For more information on coincident and collinear points, see oaPointArray::compress()
|
This function converts this polygon into a rectangle. The rectangle is returned as the same pointer. Note: Only a four-point polygon is converted to a rectangle.
|
|
This function creates a polygon with the specified attributes. If the array has collinear or coincident points, or the last and first points of the array are the same, an exception is thrown. If the array has less than three points, an exception also is thrown.
|
|
This function returns the number of points in this polygon. |
|
This function returns the point array of this polygon.
|
|
This function returns a boolean value that indicates the pointArray of this polygon is orthogonal. |
|
This function sets the points of this polygon to the specified pointArray. If the array has collinear or coincident points, or the last and first points are the same, an exception is thrown. If the array has less than three points, an exception also is thrown.
|
Copyright © 2002 - 2010 Cadence Design Systems, Inc.
All Rights Reserved.