DSRawTextLinesUnit
The DSRawTextLinesUnit
class represents a unit which holds the raw text lines.
Definition
Assembly: DynamsoftLabelRecognizer.xcframework
- Objective-C
- Swift
@interface DSLocalizedTextLinesUnit: DSIntermediateResultUnit
class LocalizedTextLinesUnit: IntermediateResultUnit
Inheritance: DSIntermediateResultUnit -> DSLocalizedTextLinesUnit
Methods
Method | Description |
---|---|
getCount |
Gets the number of raw text lines in the unit. |
getRawTextLine |
Gets a raw text line at the specified index. |
getRawTextLines |
Gets all raw text lines of the unit. |
removeAllRawTextLines |
Removes all raw text lines. |
removeRawTextLine |
Removes the raw text line at the specified index. |
addRawTextLine |
Adds a raw text line. |
setRawTextLine |
Sets the raw text line at the specified index. |
getCount
Returns the number of raw text lines in the unit.
- Objective-C
- Swift
-(NSInteger)getCount;
func getCount() -> Int
Return value
Returns the number of raw text lines in the unit.
getRawTextLine
Gets a raw text line at the specified index.
- Objective-C
- Swift
-(nullable DSRawTextLine)getRawTextLine:(NSInteger)index;
func getRawTextLine(_ index: Int) -> DSRawTextLine?
Parameters
index
: The index of the raw text line.
Return value
Returns a pointer to the RawTextLine
object at the specified index.
getRawTextLines
Gets all raw text lines of the unit.
- Objective-C
- Swift
-(nullable NSArray<DSRawTextLine *> *)getRawTextLines;
func getRawTextLines() -> [DSRawTextLine]?
Return value
Returns all the RawTextLine
objects of the unit in an array.
removeAllRawTextLines
Removes all raw text lines.
- Objective-C
- Swift
-(void)removeAllRawTextLines;
func removeAllRawTextLines()
removeRawTextLine
Removes the raw text line at the specified index.
- Objective-C
- Swift
-(NSInteger)removeRawTextLine:(NSInteger)index;
func removeRawTextLine(_ index: Int) -> Int
Parameters
index
: The index of the raw text line to be removed.
Return value
Returns the ErrorCode
if failed. Otherwise, returns 0.
addRawTextLine
Adds a raw text line to the unit.
- Objective-C
- Swift
-(NSInteger)addRawTextLine:(DSRawTextLine *)textline matrixToOriginalImage:(CGAffineTransform)matrixToOriginalImage;
func addRawTextLine(_ textline: DSRawTextLine, matrixToOriginalImage: CGAffineTransform) -> Int
Parameters
textline
: A RawTextLine
object as the raw 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.
setRawTextLine
Sets the raw text line at the specified index.
- Objective-C
- Swift
-(NSInteger)setRawTextLine:(NSInteger)index element:(DSRawTextLine *)textline matrixToOriginalImage:(CGAffineTransform)matrixToOriginalImage;
func setRawTextLine(_ index: Int, textline: DSRawTextLine, matrixToOriginalImage: CGAffineTransform) -> Int
Parameters
index
: The index of the raw text line to be set.
textline
: A RawTextLine
object as the raw text line to be set.
matrixToOriginalImage
: The matrix to the original image.
Return value
Returns the ErrorCode
if failed. Otherwise, returns 0.