Table of contents

DSLineSegment

The DSLineSegment class represents a line segment defined by two Points.

Definition

Assembly: DynamsoftCaptureVisionBundle.xcframework

  • Objective-C
  • Swift
  1. @interface DSLineSegment : NSObject
    
  2. class LineSegment : NSObject
    

Attributes & Methods

Attributes Type Description
startPoint CGPoint The starting point of the line segment.
endPoint CGPoint The ending point of the line segment.
id int The ID of the line segment.
Methods Description
initWithStartPoint The constructor. Creates an instance from start point, end point and line ID.

startPoint

The starting point of the line segment.

  • Objective-C
  • Swift
  1. @property (nonatomic, assign) CGPoint startPoint;
    
  2. var startPoint: CGPoint { get set }
    

endPoint

The ending point of the line segment.

  • Objective-C
  • Swift
  1. @property (nonatomic, assign) CGPoint endPoint;
    
  2. var endPoint: CGPoint { get set }
    

id

The ID of the line segment.

  • Objective-C
  • Swift
  1. @property (nonatomic, assign) NSInteger lineId;
    
  2. var lineId: Int { get set }
    

initWithStartPoint

The constructor. Creates an instance from start point, end point and line ID.

  • Objective-C
  • Swift
  1. - (instancetype)initWithStartPoint:(CGPoint)startPoint
                          endPoint:(CGPoint)endPoint
                            lineId:(NSInteger)lineId;
    
  2. init(startPoint: CGPoint, endPoint: CGPoint, lineId: Int)
    

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article: