iDRS™ SDK 16
Loading...
Searching...
No Matches
CPolygon_interface.h File Reference

Interface for CPolygon wrapper. More...

Go to the source code of this file.

Functions

CPolygon CPolygon_Create (const IDRS_RECT *stBoundingRect, idrs_exception *pargException)
 Creates a new polygon defined by the provided bounding box.
 
CPolygon CPolygon_Create2 (const PointArray xPoints, idrs_exception *pargException)
 Creates a new polygon defined by the provided polyline.
 
IDRS_RECT CPolygon_GetBoundingBox (const CPolygon argCPolygon, idrs_exception *pargException)
 
PointArray CPolygon_GetPoints (const CPolygon argCPolygon, idrs_exception *pargException)
 Retrieves the polyline defining the polygon.
 
void CPolygon_SetPoints (CPolygon argCPolygon, const PointArray xPoints, idrs_exception *pargException)
 Sets the polyline defining the polygon.
 
void CPolygon_Destroy (CPolygon argCPolygon, idrs_exception *pargException)
 Destroys a CPolygon handle.
 
CPolygonArray ArrayInterface_Create_CPolygonArray (idrs_exception *pargException)
 Creates a new CPolygonArray object.
 

Detailed Description

Interface for CPolygon wrapper.

Function Documentation

◆ ArrayInterface_Create_CPolygonArray()

CPolygonArray ArrayInterface_Create_CPolygonArray ( idrs_exception *  pargException)

Creates a new CPolygonArray object.

Parameters
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
The newly created CPolygonArray

◆ CPolygon_Create()

CPolygon CPolygon_Create ( const IDRS_RECT stBoundingRect,
idrs_exception *  pargException 
)

Creates a new polygon defined by the provided bounding box.

Parameters
stBoundingRectThe polygon's bounding rectangle (smallest rectangular area around the polygon).
pargExceptionPointer to exception structure that will be filled if an exception occurs
Remarks
The bounding rectangle is defined with borders top and left inclusive (i.e. they are part of the defined zone), and borders bottom and right exclusive (i.e. they are not part of the defined zone).
areas of one pixel width or height are forbidden.
Returns
The newly created polygon.

◆ CPolygon_Create2()

CPolygon CPolygon_Create2 ( const PointArray  xPoints,
idrs_exception *  pargException 
)

Creates a new polygon defined by the provided polyline.

Parameters
xPointsThe polyline defining the polygon's boundaries.
pargExceptionPointer to exception structure that will be filled if an exception occurs
Remarks
The polyline's points are all considered included in the defined zone.
The provided points array must conform to the following specifications:
  • First point must be the top-most (and from the top-most points, the left-most one) of the defined zone
  • Only horizontal and vertical segments are allowed, alternating each other (this limitation will be removed in a future release)
  • The shape must be drawn counter-clockwise (therefore the second point must be below the first one)
  • The polyline must not be explicitely closed (i.e. the last point must not be the same than the first)
areas of one pixel width or height are forbidden.
Returns
The newly created polygon.

◆ CPolygon_Destroy()

void CPolygon_Destroy ( CPolygon  argCPolygon,
idrs_exception *  pargException 
)

Destroys a CPolygon handle.

Parameters
argCPolygonCPolygon handle to destroy
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CPolygon_GetBoundingBox()

IDRS_RECT CPolygon_GetBoundingBox ( const CPolygon  argCPolygon,
idrs_exception *  pargException 
)
Returns
The bounding rectangle of the polygon.
Parameters
argCPolygonCPolygon handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CPolygon_GetPoints()

PointArray CPolygon_GetPoints ( const CPolygon  argCPolygon,
idrs_exception *  pargException 
)

Retrieves the polyline defining the polygon.

Returns
The polyline defining the polygon.
Parameters
argCPolygonCPolygon handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CPolygon_SetPoints()

void CPolygon_SetPoints ( CPolygon  argCPolygon,
const PointArray  xPoints,
idrs_exception *  pargException 
)

Sets the polyline defining the polygon.

Parameters
argCPolygonCPolygon handle
xPointsThe polyline defining the polygon.
pargExceptionPointer to exception structure that will be filled if an exception occurs