PSPDFAbstractLineAnnotation

Objective-C


@interface PSPDFAbstractLineAnnotation
    : PSPDFAbstractShapeAnnotation <PSPDFMeasurementAnnotation>

Swift

class AbstractLineAnnotation : AbstractShapeAnnotation, MeasurementAnnotation

Base class for Line, Polygon and PolyLine annotations.

  • Designated initializer. Requires an array with at least two points.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithPoints:(nonnull NSArray<NSValue *> *)points;
  • Starting line end type.

    Declaration

    Objective-C

    @property PSPDFLineEndType lineEnd1;

    Swift

    var lineEnd1: AbstractLineAnnotation.EndType { get set }
  • Ending line end type.

    Declaration

    Objective-C

    @property PSPDFLineEndType lineEnd2;

    Swift

    var lineEnd2: AbstractLineAnnotation.EndType { get set }
  • The path of the line.

    Might return nil if there are not sufficient points defined in the annotation. If you override this property, take care to create the path with the annotation’s lineDashStyle

    Declaration

    Objective-C

    @property (copy, readonly, nullable) UIBezierPath *bezierPath;

    Swift

    @NSCopying var bezierPath: UIBezierPath? { get }
  • By default, setting the boundingBox will transform the annotation. Use this setter to manually change the boundingBox without changing the points.

    Declaration

    Objective-C

    - (void)setBoundingBox:(CGRect)boundingBox
           transformPoints:(BOOL)transformPoints;

    Swift

    func setBoundingBox(_ boundingBox: CGRect, transformPoints: Bool)
  • Call after points have been changed to update the bounding box.

    Declaration

    Objective-C

    - (void)recalculateBoundingBox;

    Swift

    func recalculateBoundingBox()
  • Undocumented

    Declaration

    Swift

    public convenience init(points: [CGPoint])