PSPDFPolygonAnnotation

Objective-C


@interface PSPDFPolygonAnnotation
    : PSPDFAbstractLineAnnotation <PSPDFOverridable>

Swift

class PolygonAnnotation : AbstractLineAnnotation, Overridable

Polygon annotations (PDF 1.5) display closed polygons on the page. Such polygons may have any number of vertices connected by straight lines. Polyline annotations (PDF 1.5) are similar to polygons, except that the first and last vertex are not implicitly connected.

Note

See PSPDFAbstractLineAnnotation for details how to use and initialize.
  • Designated initializer.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithPoints:(nonnull NSArray<NSValue *> *)points
                                intentType:(PSPDFPolygonAnnotationIntent)intentType;
  • Defines the annotation intent. (Optional; PDF 1.6). Defaults to PSPDFPolygonAnnotationIntentNone.

    Declaration

    Objective-C

    @property PSPDFPolygonAnnotationIntent intentType;

    Swift

    var intent: PolygonAnnotation.Intent { get set }
  • Initializer

    • points: Polygon points.
    • intent: Annotation intent.

    Declaration

    Swift

    public convenience init(points: [CGPoint], intent: Intent = .none)