Resource Base
Table of contents

DSLongLinesUnit

The DSLongLinesUnit class represents an intermediate result unit whose type is long lines. Line segments that are located in the same line are extended and merged to form a long line.

Definition

Assembly: DynamsoftDocumentNormalizer.xcframework

  • Objective-C
  • Swift
  1. @interface DSLongLinesUnit: DSIntermediateResultUnit
    
  2. class LongLinesUnit: IntermediateResultUnit
    

Methods

Methods Description
getLongLines Get an array of DSLineSegment as the long lines.
getCount Get the number of long lines.
getLongLine Get a long line.
removeAllLongLines Remove all long lines.
removeLongLine Remove a long line.
addLongLine Add a long line.
setLongLine Set a long line.

getLongLines

Get an array of DSLineSegment as the long lines.

  • Objective-C
  • Swift
  1. -(nullable NSArray<DSLineSegment*>*)getLongLines;
    
  2. func getLongLines() -> [LineSegment]?
    

Return Value

The array of DSLineSegment as the long lines.

getCount

Get the number of long lines.

  • Objective-C
  • Swift
  1. -(NSInteger)getCount;
    
  2. func getCount() -> Int
    

Return Value

The number of long lines.

getLongLine

Get the long line at the specified index.

  • Objective-C
  • Swift
  1. -(nullable DSLineSegment*)getLongLine:(NSInteger)index;
    
  2. func getLongLine(_ index: Int) -> LineSegment?
    

Parameters

[in] index: The index of the long line.

Return Value

A DSLineSegment object as the long line at the specified index.

removeAllLongLines

Remove all long lines.

  • Objective-C
  • Swift
  1. -(void)removeAllLongLines;
    
  2. func removeAllLongLines()
    

removeLongLine

Remove the long line at the specified index.

  • Objective-C
  • Swift
  1. -(NSInteger)removeLongLine:(NSInteger)index;
    
  2. func removeLongLine(_ index: Int) -> Int
    

Parameters

The index of the long line to be removed.

Return Value

Returns the ErrorCode if failed. Otherwise, returns 0.

addLongLine

Add a long line.

  • Objective-C
  • Swift
  1. -(NSInteger)addLongLine:(DSLineSegment*)line
      matrixToOriginalImage:(CGAffineTransform)matrixToOriginalImage;
    
  2. func addLongLine(_ line: LineSegment, matrixToOriginalImage: CGAffineTransform) -> Int
    

Parameters

[in] line: The long line to be added.

[in] matrixToOriginalImage: The transformation matrix of the original image.

Return Value

Returns the ErrorCode if failed. Otherwise, returns 0.

setLongLine

Set the long line at the specified index.

  • Objective-C
  • Swift
  1. -(NSInteger)setLongLine:(NSInteger)index
                   line:(DSLineSegment*)line
      matrixToOriginalImage:(CGAffineTransform)matrixToOriginalImage;
    
  2. func setLongLine(_ index: Int, line: LineSegment, matrixToOriginalImage: CGAffineTransform) -> Int
    

Parameters

[in] index: The index of the long line.

[in] line: The long line to be set.

[in] matrixToOriginalImage: The transformation matrix of the original image.

Return Value

Returns the ErrorCode if failed. Otherwise, returns 0.

This page is compatible for:

Version 1.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest version
    • Version 2.x
      • Version 2.2.10
      • Version 2.0.20
      • Version 2.0.10
      • Version 2.0.10
    • Version 1.x
      • Version 1.0.30
      • Version 1.0.21
      • Version 1.0.20
      • Version 1.0.12
      • Version 1.0.11
      • Version 1.0.10
      • Version 1.0.0
      • Version 1.0.30
      • Version 1.0.21
      • Version 1.0.20
      • Version 1.0.12
      • Version 1.0.11
      • Version 1.0.10
      • Version 1.0.0
      • Version 1.0.5
      • Version 1.0.4
      • Version 1.0.3
      • Version 1.0.2
      • Version 1.0.1
      • Version 1.0.0
    Change +
    © 2003–2024 Dynamsoft. All rights reserved.
    Privacy Statement / Site Map / Home / Purchase / Support