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

This interface holds a shape gauging result and is used to access its properties. More...

Inheritance diagram for ILShapeGaugeResult:
ILObject LShapeGaugeResult

Public Member Functions

int CountSampleRegion ()
 
void Draw (HDC hdc, LPVGaugeDrawFlags drawFlags, double zoomX, double zoomY, double panX, double panY)
 
void DrawScoreChart (HDC hdc, int index, LPVChartDrawFlags drawFlags, int xGridStep, int yGridStep)
 
ILPointItemSamplePoint (int index)
 
ILPointsItemSamplePoints (int index)
 
ILRotRectRegionItemSampleRegion (int index)
 
- Public Member Functions inherited from ILObject
ILObjectCopy ()
 
LPVErrorCode Load (LString filename)
 
void Reset ()
 
LPVErrorCode Save (LString filename)
 
BOOL Valid ()
 

Properties

ILObject Result [get]
 The result shape object. For different gauge tools, the result type varies as: More...
 
ILPoints SamplePoints [get]
 All the valid sample points found in sample regions.
 
double Score [get]
 The score of the result, the average score of all sample points.
 

Detailed Description

This interface holds a shape gauging result and is used to access its properties.

Usually you get the LShapeGaugeResult object from the shape gauge tools like LLineGauge for line shape inspection. You can then use this interface to access to the shape result and the details such as sample points, and draw the result on graphics windows.

Example Code

Member Function Documentation

◆ CountSampleRegion()

int CountSampleRegion ( )

Get count of the sample region.

◆ Draw()

void Draw ( HDC  hdc,
LPVGaugeDrawFlags  drawFlags,
double  zoomX,
double  zoomY,
double  panX,
double  panY 
)

Draw the result onto provide device context.

Parameters
[in]drawFlagsControl the drawing behavior, see LPVGaugeDrawFlags
See also
Use Draw Functions
Remarks
This function is currently not available on Linux / MacOS platform.

◆ DrawScoreChart()

void DrawScoreChart ( HDC  hdc,
int  index,
LPVChartDrawFlags  drawFlags,
int  xGridStep,
int  yGridStep 
)

Draw a score chart onto provide device context. It represents the score(y axis) distributions along the sample region's direction(x axis). It's useful for determining a proper acceptable score.

Parameters
[in]indexInput index, it should be a 0-based number smaller than total count of sample regions.
[in]hdcHandle to the device context of the destination window or bitmap.
[in]drawFlagsFlags to control which part of a data chart should be drawn, see LPVChartDrawFlags for usage.
[in]xGridStepSpecify the step of label on x axis, 0 means we'll determine it on the fly according to the score data.
[in]yGridStepSpecify the step of label on y axis, 0 means we'll determine it on the fly according to the score data. This function is currently not available on Linux / MacOS platform.

◆ ItemSamplePoint()

ILPoint* ItemSamplePoint ( int  index)

Fetch the first valid sample point out of the sample region with the given index.

Parameters
[in]indexInput index, it should be a 0-based number smaller than total count of sample regions.
Return values
resultReturn the first valid sample point. It may be null if there is no valid point found in that region.
See also
CountSampleRegion(), ItemSampleRegion(), ItemSamplePoints()

◆ ItemSamplePoints()

ILPoints* ItemSamplePoints ( int  index)

Fetch the valid sample points out of the sample region with the given index.

Parameters
[in]indexInput index, it should be a 0-based number smaller than total count of sample regions.
Return values
resultReturn the valid sample points. It may be empty if there is no valid point found in that region.
See also
CountSampleRegion(), ItemSampleRegion(), ItemSamplePoint()

◆ ItemSampleRegion()

ILRotRectRegion* ItemSampleRegion ( int  index)

Fetch the sample region with the given index.

Parameters
[in]indexInput index, it should be a 0-based number smaller than total count of sample regions.
Return values
resultReturn the result sample region, it's a rotated rectangle region LRotRectRegion.
See also
CountSampleRegion(), ItemSamplePoint()

Property Documentation

◆ Result

ILObject Result
get

The result shape object. For different gauge tools, the result type varies as:

LLineGaugeLLine
LCircleGaugeLCircle
LArcGaugeLArc
LEllipseGaugeLEllipse
LPolyGaugeLPolygon