LogicLinesUnit
The LogicLinesUnit class represents an intermediate result unit containing logic lines. It inherits from the IntermediateResultUnit class.
Definition
Assembly: DynamsoftCaptureVisionBundle.xcframework
- Objective-C
- Swift
@interface DSLogicLinesUnit: DSIntermediateResultUnitclass LogicLinesUnit: IntermediateResultUnit
Methods
| Methods | Description |
|---|---|
getLogicLines |
Get an array of LineSegment as the logic lines. |
getCount |
Get the number of logic lines. |
getLogicLine |
Get a logic line. |
removeAllLogicLines |
Remove all logic lines. |
removeLogicLine |
Remove a logic line. |
addLogicLine |
Add a logic line. |
setLogicLine |
Set a logic line. |
getLogicLines
Get an array of LineSegment as the logic lines.
- Objective-C
- Swift
-(nullable NSArray<DSLineSegment*>*)getLogicLines;func getLogicLines() -> [LineSegment]?
Return Value
Returns an array of LineSegment as the logic lines.
getCount
Gets the number of logic lines in the unit.
- Objective-C
- Swift
-(NSInteger)getCount;func getCount() -> Int
Return Value
Returns the number of logic lines in the unit.
getLogicLine
Gets a logic line at the specified index.
- Objective-C
- Swift
-(nullable DSLineSegment*)getLogicLine:(NSInteger)index;func getLogicLine(_ index: Int) -> LineSegment?
Parameters
index The index of the logic line.
Return Value
Returns a reference to the LineSegment object at the specified index.
removeAllLogicLines
Removes all logic lines.
- Objective-C
- Swift
-(void)removeAllLogicLines;func removeAllLogicLines()
removeLogicLine
Removes the logic line at the specified index.
- Objective-C
- Swift
-(NSInteger)removeLogicLine:(NSInteger)index;func removeLogicLine(_ index: Int) -> Int
Parameters
index The index of the logic line to remove.
Return Value
Returns 0 if successful, otherwise returns a negative value.
addLogicLine
Adds a logic line.
- Objective-C
- Swift
-(NSInteger)addLogicLine:(DSLineSegment*)line matrixToOriginalImage:(CGAffineTransform)matrixToOriginalImage;func addLogicLine(_ line: LineSegment, matrixToOriginalImage: CGAffineTransform) -> Int
Parameters
logicLine The logic line to add.
matrixToOriginalImage The matrix to the original image (3x3 matrix).
Return Value Returns 0 if successful, otherwise returns a negative value.
setLogicLine
Sets the logic line at the specified index.
- Objective-C
- Swift
-(NSInteger)setLogicLine:(NSInteger)index line:(DSLineSegment*)line matrixToOriginalImage:(CGAffineTransform)matrixToOriginalImage;func setLogicLine(_ index: Int, line: LineSegment, matrixToOriginalImage: CGAffineTransform) -> Int
Parameters
index The index of the logic line to set.
logicLine The logic line to set.
matrixToOriginalImage The matrix to the original image (3x3 matrix).
Return Value
Returns 0 if successful, otherwise returns a negative value.