PSPDFAbstractLineAnnotation
Objective-C
@interface PSPDFAbstractLineAnnotation : PSPDFAbstractShapeAnnotation
Swift
class AbstractLineAnnotation : AbstractShapeAnnotation
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<__kindof 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) NSBezierPath *bezierPath;
Swift
@NSCopying var bezierPath: NSBezierPath? { 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.
-
Undocumented
Declaration
Swift
public convenience init(points: [CGPoint])