PTPolylineEditTool


@interface PTPolylineEditTool : PTAnnotEditTool

The PTPolylineEditTool is used to edit polyline, polygon, and cloudy annotations.

  • Draw the measurement label for an existing perimeter/area annotation.

    Declaration

    Objective-C

    + (void)addMeasurementLabelForAnnotation:(nullable PTAnnot *)annotation
                               onPdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl;

    Swift

    class func addMeasurementLabel(forAnnotation annotation: PTAnnot?, on pdfViewCtrl: PTPDFViewCtrl)
  • Draw the measurement label for a perimeter/area annotation.

    Declaration

    Objective-C

    + (void)addMeasurementLabelForAnnotation:(nullable PTAnnot *)annotation
                               onPdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
                                    newAnnot:(BOOL)newAnnot;

    Swift

    class func addMeasurementLabel(forAnnotation annotation: PTAnnot?, on pdfViewCtrl: PTPDFViewCtrl, newAnnot: Bool)

    Parameters

    newAnnot

    Whether the annotation is newly created or existing.

  • The vertices of the annotation, expressed in page space.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSArray<PTPDFPoint *> *vertices;

    Swift

    var vertices: [PTPDFPoint]? { get set }
  • The index of the selected vertex in vertices. When no vertex is selected, the value of this property is NSNotFound.

    Declaration

    Objective-C

    @property (nonatomic) NSUInteger selectedVertexIndex;

    Swift

    var selectedVertexIndex: UInt { get set }
  • The starting location of the touch on the annotation, in screen space.

    Declaration

    Objective-C

    @property (nonatomic) CGPoint touchStartPoint;

    Swift

    var touchStartPoint: CGPoint { get set }
  • The ending location of the touch on the annotation, in screen space.

    Declaration

    Objective-C

    @property (nonatomic) CGPoint touchEndPoint;

    Swift

    var touchEndPoint: CGPoint { get set }
  • The magnifier loupe view shown for measurement annotations.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nullable) PTMagnifierView *loupe;

    Swift

    var loupe: PTMagnifierView? { get }