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<__kindof NSValue *> *)points
                                intentType:(PSPDFPolygonAnnotationIntent)intentType;

    Swift

    init(__points points: [NSValue], intentType: PolygonAnnotation.Intent)
  • Defines the annotation intent. (Optional; PDF 1.6). Defaults to PSPDFPolygonAnnotationIntentNone.

    Declaration

    Objective-C

    @property (atomic, assign, unsafe_unretained, readwrite)
        PSPDFPolygonAnnotationIntent intentType;

    Swift

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

    Declaration

    Swift

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

    Parameters

    points

    Polygon points.

    intent

    Annotation intent.