Leaper Vision Toolkit
中文 / English 2.x
Public Member Functions
ILPolyRegion Interface Reference

This interface expose APIs to create/modify a polygon region object. More...

Inheritance diagram for ILPolyRegion:
ILRegion ILObject LPolyRegion

Public Member Functions

void AddCtrl (double x, double y, int ctrlIndex)
 
int CtrlCount ()
 
void GetCtrl (int ctrlIndex, double *x, double *y)
 
void RemoveCtrl (int ctrlIndex)
 
void SetCtrl (double x, double y, int ctrlIndex)
 
void SetPlacement (LArray< double > xs, LArray< double > ys)
 
- Public Member Functions inherited from ILRegion
ILCompoundRegionAdd (ILRegion *other)
 
void Drag (LPVRoiHandle roiHandle, int x, int y, double zoomX, double zoomY, double panX, double panY)
 
void Draw (HDC hdc, BOOL drawHandles, double zoomX, double zoomY, double panX, double panY)
 
void EnableHandle (LPVRoiHandle roiHandle, BOOL enabled)
 
LPVRoiHandle HitTest (int x, int y, double zoomX, double zoomY, double panX, double panY)
 
ILCompoundRegionIntersect (ILRegion *other)
 
ILCompoundRegionInvert ()
 
void MapFromImage (double imagePointX, double imagePointY, double *regionPointX, double *regionPointY)
 
ILObjectMapObjectFromImage (ILObject *imageObject)
 
ILObjectMapObjectToImage (ILObject *regionObject)
 
void MapToImage (double regionPointX, double regionPointY, double *imagePointX, double *imagePointY)
 
void ReduceImage (ILImage *image, ILImage **newImage, ILImage **newMask)
 
ILRegionRotate (double da)
 
ILRegionRotateAndTranslate (double x, double y, double newX, double newY, double da)
 
ILRegionScale (double factorX, double factorY)
 
ILCompoundRegionSubtract (ILRegion *other)
 
ILImageToMask (int w, int h)
 
ILRegionTranslate (double offsetX, double offsetY)
 
ILCompoundRegionUnion (ILRegion *other)
 
ILCompoundRegionXOR (ILRegion *other)
 
- Public Member Functions inherited from ILObject
ILObjectCopy ()
 
LPVErrorCode Load (LString filename)
 
void Reset ()
 
LPVErrorCode Save (LString filename)
 
BOOL Valid ()
 

Additional Inherited Members

- Properties inherited from ILRegion
LPVInterpolationMethod InterpolationMethod [get, set]
 The interpolation method used in image reduction.
 
double ReduceAngle [get, set]
 The angle of the reduced result.
By default, it's 0. A non-zero value means we'll rotated the reduced result image by the angle clockwise. More...
 
double ReduceScale [get, set]
 The scale of the reduced result.
By default, it's 1. Change this value to scale the reduced result image. More...
 

Detailed Description

This interface expose APIs to create/modify a polygon region object.

To use this interface, you should create a LPolyRegion object.

Example Code

Member Function Documentation

◆ AddCtrl()

void AddCtrl ( double  x,
double  y,
int  ctrlIndex 
)

Add a control vertexes to the polygon region at provided position

Parameters
[in]xThe x-coordinate of the new control vertex
[in]yThe y-coordinate of the new control vertex
[in]ctrlIndexThe index of the new control vertex, default to -1 means add at the end.

◆ CtrlCount()

int CtrlCount ( )

Get the count of control vertexes of the polygon region

◆ GetCtrl()

void GetCtrl ( int  ctrlIndex,
double *  x,
double *  y 
)

Get position of the polygon region's control vertexes with given index

Parameters
[in]ctrlIndexThe index of the control vertex
[out]xReturn the x-coordinate of the control vertex
[out]yReturn the y-coordinate of the control vertex

◆ RemoveCtrl()

void RemoveCtrl ( int  ctrlIndex)

Remove one of the polygon region's control vertexes with given index

Parameters
[in]ctrlIndexThe index of the control vertex

◆ SetCtrl()

void SetCtrl ( double  x,
double  y,
int  ctrlIndex 
)

Modify a control vertexes of the polygon region to provided position

Parameters
[in]xThe x-coordinate of the new position
[in]yThe y-coordinate of the new position
[in]ctrlIndexThe index of the new control vertex, default to -1 means add at the end.

◆ SetPlacement()

void SetPlacement ( LArray< double >  xs,
LArray< double >  ys 
)

Modify the polygon region's placement by given vertexes.

Parameters
[in]xsThe collection of x-coordinate of the vertexes.
[in]ysThe collection of y-coordinate of the vertexes.