Leaper Vision Toolkit
中文 / English 2.x
Public Member Functions | Properties
ILCircle Interface Reference

This interface represents a single circle(LCircle object). More...

Inheritance diagram for ILCircle:
ILGeomObject ILObject LCircle

Public Member Functions

double Concentric (ILCircle *circle)
 
void Draw (BOOL bFill, HDC hdc, double zoomX, double zoomY, double panX, double panY)
 
void FromAnnulusRegion (ILAnnulusRegion *val)
 
void FromCircleRegion (ILCircleRegion *val)
 
ILArcGetArc (double aStart, double aEnd)
 
double GetArea ()
 
ILPointGetCenter ()
 
double GetPerimeter ()
 
LPVIntersectType IntersectLine (ILLine *line, ILPoints **intersectPoints)
 
LPVPointTestResult PointTest (ILPoint *point)
 
ILPolygonResample (int num)
 
void Set (double x, double y, double r)
 
ILAnnulusRegionToAnnulusRegion (int inExp, int outExp)
 
ILCircleRegionToCircleRegion ()
 
ILCircleTransform (ILTransform *tf)
 
ILCircleTranslate (double offsetX, double offsetY)
 
- Public Member Functions inherited from ILGeomObject
void Drag (LPVGeomHandle geomHandle, int posX, int posY, double zoomX, double zoomY, double panX, double panY)
 
void EnableHandle (LPVGeomHandle geomHandle, BOOL enabled)
 
LPVGeomHandle HitTest (int posX, int posY, double zoomX, double zoomY, double panX, double panY)
 
void ScaleTo (double factorX, double factorY)
 
void TransformTo (ILTransform *tf)
 
void TranslateTo (double offsetX, double offsetY)
 
- Public Member Functions inherited from ILObject
ILObjectCopy ()
 
LPVErrorCode Load (LString filename)
 
void Reset ()
 
LPVErrorCode Save (LString filename)
 
BOOL Valid ()
 

Properties

double Radius [get, set]
 The radius of the circle.
 
double X [get, set]
 The x-coordinate of the circle's center point.
 
double Y [get, set]
 The y-coordinate of the circle's center point.
 
- Properties inherited from ILObject
LString Name [get, set]
 Name of the object. By default, the object has no name.
In most cases, LPV classes don't make use of the names.
The name is drawn on canvas around the object if ILDrawable::SetDrawName() is enabled. More...
 

Detailed Description

This interface represents a single circle(LCircle object).

Member Function Documentation

◆ Concentric()

double Concentric ( ILCircle circle)

Evaluate whether this and the input circle are concentric

Parameters
[in]circleThe input circle
Return values
resultReturn the evaluation result, it's a value in (0, 1). For two perfect concentric circles, it's 1.

◆ Draw()

void Draw ( BOOL  bFill,
HDC  hdc,
double  zoomX,
double  zoomY,
double  panX,
double  panY 
)

Draw the circle on HDC.

Parameters
[in]bFillWhether to fill the circle using current brush.
See also
Use Draw Functions
Remarks
This function is currently not available on Linux / MacOS platform.

◆ FromAnnulusRegion()

void FromAnnulusRegion ( ILAnnulusRegion val)

Set placement of the circle from the input annulus region, the radii is set to the averaging of the inner and outer circle of the annulus region.

◆ FromCircleRegion()

void FromCircleRegion ( ILCircleRegion val)

Set placement of the circle from the input circle region.

◆ GetArc()

ILArc* GetArc ( double  aStart,
double  aEnd 
)

Create an arc starts clockwise from the aStart and ends to aEnd.

Parameters
[in]aStartThe start angle in degrees
[in]aEndThe end angle in degrees
Return values
Returnthe arc object

◆ GetArea()

double GetArea ( )

Get the area of the circle

Return values
valReturn the area value

◆ GetCenter()

ILPoint* GetCenter ( )

Get the center point of the circle

◆ GetPerimeter()

double GetPerimeter ( )

Get the perimeter of the circle

Return values
valReturn the perimeter value

◆ IntersectLine()

LPVIntersectType IntersectLine ( ILLine line,
ILPoints **  intersectPoints 
)

Determines whether this circle intersects with the given line. Return the intersection points if they are intersected.

Parameters
[in]lineThe input line
[out]intersectPointsOutput the intersection points, it should be an empty set for not-intersected case, or 1 point for tangent case, or 2 points for intersected case.
Return values
typeReturn the intersection type depends on the count of intersection points which is on the line segment, Bounded (2), Partial (1) or Unbounded (0).
See also
ILLine::IntersectCircle().

◆ PointTest()

LPVPointTestResult PointTest ( ILPoint point)

Determines whether the point is inside this circle, outside, or lies on the edge

Parameters
[in]pointThe input point
Return values
valReturn the test result

◆ Resample()

ILPolygon* Resample ( int  num)

Resample the circle object into a closed polygon of the specified vertex count

Parameters
[in]numThe count of the resampled vertexes, at least 3
Return values
resultReturn the resampling result polygon

◆ Set()

void Set ( double  x,
double  y,
double  r 
)

Set placement of the circle

Parameters
[in]xThe x-coordinate of the circle's center point
[in]yThe y-coordinate of the circle's center point
[in]rThe radius of the circle

◆ ToAnnulusRegion()

ILAnnulusRegion* ToAnnulusRegion ( int  inExp,
int  outExp 
)

Generate an annulus region use the circle object with the given inside and outside expansion

Parameters
[in]inExpThe expansion pixels from the circle's placement that generate the inner circle of the annulus region
[in]outExpThe expansion pixels from the circle's placement that generate the outer circle of the annulus region
Return values
valReturn the circle region

◆ ToCircleRegion()

ILCircleRegion* ToCircleRegion ( )

Generate a circle region use the circle object

◆ Transform()

ILCircle* Transform ( ILTransform tf)

Transform the circle via the given transformation and return a new circle. Note that for an affine or perspective transformation, the result circle is the bounding circle of the mapping result which may be an ellipse.

Parameters
[in]tfThe transformation.
Return values
Returnthe new circle

◆ Translate()

ILCircle* Translate ( double  offsetX,
double  offsetY 
)

Translate the circle by the given offset and return a new circle

Parameters
[in]offsetXThe x-coordinate of the offset
[in]offsetYThe y-coordinate of the offset
Return values
resultReturn the new circle