DSLocalizedTextLinesUnit
The DSLocalizedTextLinesUnit class represents a unit that contains localized text lines. It inherits from the DSIntermediateResultUnit class.
Definition
Assembly: DynamsoftCaptureVisionBundle.xcframework
- Objective-C
- Swift
@interface DSLocalizedTextLinesUnit: DSIntermediateResultUnitclass LocalizedTextLinesUnit: IntermediateResultUnit
Inheritance: DSIntermediateResultUnit -> DSLocalizedTextLinesUnit
Methods
| Method | Description |
|---|---|
getLocalizedTextLines |
Get all the text lines in an array of DSLocalizedTextLineElement, which is the basic unit of the localized text line result. |
getCount |
Get the number of text lines in this unit. |
getLocalizedTextLine |
Get the localized text line at the specified index in a LocalizedTextLineElement object. |
removeAllLocalizedTextLines |
Remove all the text lines from this unit. |
removeLocalizedTextLine |
Remove the localized text line at the specified index from this unit. |
addLocalizedTextLine |
Add a localized text line to this unit. |
setLocalizedTextLine |
Set the localized text line at the specified index in a LocalizedTextLineElement object. |
getAuxiliaryRegionElements |
Get all the auxiliary region elements in an array of AuxiliaryRegionElement. |
getAuxiliaryRegionElementsCount |
Get the number of auxiliary region elements in this unit. |
getAuxiliaryRegionElement |
Get the auxiliary region element at the specified index. |
setAuxiliaryRegionElement |
Set or replace the auxiliary region element at the specified index. |
addAuxiliaryRegionElement |
Add a new auxiliary region element to this unit. |
removeAuxiliaryRegionElement |
Remove the auxiliary region element at the specified index. |
removeAllAuxiliaryRegionElements |
Remove all the auxiliary region elements from this unit. |
getLocalizedTextLines
Get all the text lines in an array of DSLocalizedTextLineElement, which is the basic unit of the localized text line result.
- Objective-C
- Swift
-(nullable NSArray<DSLocalizedTextLineElement*>*)getLocalizedTextLines;func getLocalizedTextLines() -> [DSLocalizedTextLineElement]?
Return value
All the text lines in an array of DSLocalizedTextLineElement, which is the basic unit of the localized text line result.
getCount
Get the number of text lines in this unit.
- Objective-C
- Swift
-(NSInteger)getCount;func getCount() -> Int
Return value
The number of text lines in this unit.
getLocalizedTextLine
Get the localized text line at the specified index in a LocalizedTextLineElement object.
- Objective-C
- Swift
-(nullable DSLocalizedTextLineElement*)getLocalizedTextLine:(NSInteger)index;func getLocalizedTextLine(_ index: Int) -> DSLocalizedTextLineElement?
Parameters
index: The index of the localized text line to be retrieved.
Return value
The localized text line at the specified index in a LocalizedTextLineElement object.
removeAllLocalizedTextLines
Remove all the localized text lines from the unit.
- Objective-C
- Swift
-(void)removeAllLocalizedTextLines;func removeAllLocalizedTextLines()
removeLocalizedTextLine
Remove a localized text line from the unit.
- Objective-C
- Swift
-(NSInteger)removeLocalizedTextLine:(NSInteger)index;func removeLocalizedTextLine(_ index: Int) -> Int
Parameters
index: The index of the localized text line to be removed.
Return value
Returns the ErrorCode if failed. Otherwise, returns 0.
addLocalizedTextLine
Add a localized text line to the unit.
- Objective-C
- Swift
-(NSInteger)addLocalizedTextLine:(DSLocalizedTextLineElement*)element matrixToOriginalImage:(CGAffineTransform)matrixToOriginalImage;func addLocalizedTextLine(_ element: DSLocalizedTextLineElement, matrixToOriginalImage: CGAffineTransform) -> Int
Parameters
element: A LocalizedTextLineElement object as the localized text line to be added to the unit.
matrixToOriginalImage: The matrix to the original image.
Return value
Returns the ErrorCode if failed. Otherwise, returns 0.
setLocalizedTextLine
Set a localized text line in the unit.
- Objective-C
- Swift
-(NSInteger)setLocalizedTextLine:(NSInteger)index element:(DSLocalizedTextLineElement*)element matrixToOriginalImage:(CGAffineTransform)matrixToOriginalImage;func setLocalizedTextLine(_ index: Int, element: DSLocalizedTextLineElement, matrixToOriginalImage: CGAffineTransform) -> Int
Parameters
index: The index of the localized text line to be set.
element: A LocalizedTextLineElement object as the localized text line to be set.
matrixToOriginalImage: The matrix to the original image.
Return value
Returns the ErrorCode if failed. Otherwise, returns 0.
getAuxiliaryRegionElements
Get all the auxiliary region elements in an array of AuxiliaryRegionElement.
- Objective-C
- Swift
-(nullable NSArray<DSAuxiliaryRegionElement*>*)getAuxiliaryRegionElements;func getAuxiliaryRegionElements() -> [DSAuxiliaryRegionElement]?
Return value
All the auxiliary region elements in an array of AuxiliaryRegionElement.
getAuxiliaryRegionElementsCount
Get the number of auxiliary region elements in this unit.
- Objective-C
- Swift
-(NSInteger)getAuxiliaryRegionElementsCount;func getAuxiliaryRegionElementsCount() -> Int
Return value
The number of auxiliary region elements.
getAuxiliaryRegionElement
Get the auxiliary region element at the specified index.
- Objective-C
- Swift
-(nullable DSAuxiliaryRegionElement*)getAuxiliaryRegionElement:(NSInteger)index;func getAuxiliaryRegionElement(_ index: Int) -> DSAuxiliaryRegionElement?
Parameters
index: The zero-based index of the auxiliary region element to retrieve.
Return value
The auxiliary region element at the specified index, or nil if the index is out of range.
setAuxiliaryRegionElement
Set or replace the auxiliary region element at the specified index.
- Objective-C
- Swift
-(NSInteger)setAuxiliaryRegionElement:(NSInteger)index element:(DSAuxiliaryRegionElement*)element matrixToOriginalImage:(CGAffineTransform)matrixToOriginalImage;func setAuxiliaryRegionElement(_ index: Int, element: DSAuxiliaryRegionElement, matrixToOriginalImage: CGAffineTransform) -> Int
Parameters
index: The zero-based index where the element should be set.
element: The auxiliary region element to set.
matrixToOriginalImage: The transformation matrix from the current image to the original image.
Return value
Returns the ErrorCode if failed. Otherwise, returns 0.
addAuxiliaryRegionElement
Add a new auxiliary region element to this unit.
- Objective-C
- Swift
-(NSInteger)addAuxiliaryRegionElement:(DSAuxiliaryRegionElement*)element matrixToOriginalImage:(CGAffineTransform)matrixToOriginalImage;func addAuxiliaryRegionElement(_ element: DSAuxiliaryRegionElement, matrixToOriginalImage: CGAffineTransform) -> Int
Parameters
element: The auxiliary region element to add.
matrixToOriginalImage: The transformation matrix from the current image to the original image.
Return value
Returns the ErrorCode if failed. Otherwise, returns 0.
removeAuxiliaryRegionElement
Remove the auxiliary region element at the specified index.
- Objective-C
- Swift
-(NSInteger)removeAuxiliaryRegionElement:(NSInteger)index;func removeAuxiliaryRegionElement(_ index: Int) -> Int
Parameters
index: The zero-based index of the auxiliary region element to remove.
Return value
Returns the ErrorCode if failed. Otherwise, returns 0.
removeAllAuxiliaryRegionElements
Remove all the auxiliary region elements from this unit.
- Objective-C
- Swift
-(void)removeAllAuxiliaryRegionElements;func removeAllAuxiliaryRegionElements()