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. |
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.