This interface represent a sortable LPV class.
More...
This interface represent a sortable LPV class.
You could sort the collections of sortable classes using LSorter. The result index of sorting is set via Index.
The following lists some sortable LPV classes:
LPVCoreLib | LRectRegion, LRotRectRegion, LCircleRegion, LPolyRegion, LMaskRegion, LAnnulusRegion, LEllipseRegion, LAnnulusSectorRegion LCompoundRegion |
LPVGeomLib | LPoint, LPoints, LCircle, LLine, LPolygon, LRect, LEllipse, LArc |
LPVPatLib | LMatchResult, LMatchResults |
LPVBlobLib | LBlob, LBlobResults |
LPVLocateLib | LLineResult, LCircleResult |
LPVLocateXLib | LPathResult, LContourResult |
LPVGaugeLib | LShapeGaugeResult |
LPVMathLib | LDataList |
LPVBarcodeLib | LBarcodeResult |
LPVOCRLib | LOCRChar, LOCRLine, LOCRResult |
Example Code
C++
std::vector<ILSortable*> regionsSortables;
for (ILRegionPtr& region : regions) {
regionsSortables.push_back(ILSortable::Cast(region));
}
ILSorterPtr sorter = LSorter::Create();
sorter->RowSpace = 170;
sorter->ColumnSpace = 150;
sorter->ToleranceFactor = 1;
sorter->PositionMode = LPVPositionMode::LPVPosModeCenter;
ILSortedArrayPtr sortedArray;
LPVErrorCode err = sorter->SortToArray2(regionsSortables, &sortedArray);
LPVErrorCode
This enumeration represents the type of a LPV function error.
Definition: LPVCore.idl:530
C#
List<ILRegion> regions = new List<ILRegion>();
LSorter sorter = new LSorter();
sorter.RowSpace = 170;
sorter.ColumnSpace = 150;
sorter.ToleranceFactor = 1;
LSortedArray sortedArray;
LPVErrorCode err = sorter.SortToArray2(regions.ToArray(), out sortedArray);
LPVPositionMode
This enumeration represents which point is used as a object's position, used in sorting.
Definition: LPVCore.idl:1259
COM
CComSafeArray<IDispatch*> regions;
ILSorterPtr sorter = LSorter::Create();
sorter->RowSpace = 170;
sorter->ColumnSpace = 150;
sorter->ToleranceFactor = 1;
sorter->PositionMode = LPVPositionMode::LPVPosModeCenter;
ILSortedArrayPtr sortedArray;
LPVErrorCode err = sorter->SortToArray2(regions, &sortedArray);
◆ GetPosX()
The x-coordinate of the object's position, used for x-related sorting like LPVSortByX, LPVSortByColumn, etc.
- Parameters
-
[in] | posMode | Specify the position mode, by default, it's using the center point. |
◆ GetPosY()
The y-coordinate of the object's position, used for y-related sorting like LPVSortByY, LPVSortByColumn, etc.
- Parameters
-
[in] | posMode | Specify the position mode, by default, it's using the center point. |
◆ GetScore()
The score of the object, used for score sorting, aka. LPVSortByScore
◆ Index