PTPolyLine

@interface PTPolyLine : PTLineAnnot

This header defines classes for the Polygon and PolyLine annotations. 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.

  • Creates a PolyLine annotation and initializes it using given Cos/SDF object.

    Note

    The constructor does not copy any data, but is instead the logical equivalent of a type cast.

    Declaration

    Objective-C

    - (instancetype)initWithD:(PTObj *)d;

    Swift

    init!(d: PTObj!)

    Parameters

    d

    The Cos/SDF object to initialze the annotation with.

  • Undocumented

    Declaration

    Objective-C

    - (instancetype)init;

    Swift

    init!()
  • Undocumented

    Declaration

    Objective-C

    - (instancetype)initWithAnn: (PTAnnot*)ann;

    Swift

    init!(ann: PTAnnot!)
  • Creates a new PolyLine annotation in the specified document.

    Declaration

    Objective-C

    + (PTPolyLine *)Create:(PTSDFDoc *)doc pos:(PTPDFRect *)pos;

    Swift

    class func create(_ doc: PTSDFDoc!, pos: PTPDFRect!) -> PTPolyLine!

    Parameters

    doc

    A document to which the PolyLine annotation is added.

    pos

    A rectangle specifying the PolyLine annotation’s bounds in default user space units.

    Return Value

    A newly created blank PolyLine annotation.

  • Returns the number of vertices in the Vertices array.

    Note

    The Vertices are the points between which the lines are drawn. The viewer can draw either the straight lines or the smoothly connecting ones.

    Declaration

    Objective-C

    - (int)GetVertexCount;

    Swift

    func getVertexCount() -> Int32

    Return Value

    the number of vertices.

  • Returns the vertex(as a Point object) corresponding to the index within the Vertices array.

    Note

    The Vertices are the points between which the lines are drawn. The viewer can draw either the straight lines or the smoothly connecting ones.

    Declaration

    Objective-C

    - (PTPDFPoint *)GetVertex:(int)idx;

    Swift

    func getVertex(_ idx: Int32) -> PTPDFPoint!

    Parameters

    idx

    The index of the vertex, should be less than the value returned by GetVertexCount().

    Return Value

    A Point object corresponding to the vertex in the specified index position.

  • Sets the vertex(in Point object form) corresponding to the index within the Vertices array.

    Note

    The Vertices are the points between which the lines are drawn. The viewer can draw either the straight lines or the smoothly connecting ones.

    Declaration

    Objective-C

    - (void)SetVertex:(int)idx pt:(PTPDFPoint *)pt;

    Swift

    func setVertex(_ idx: Int32, pt: PTPDFPoint!)

    Parameters

    idx

    The index of the vertex.

    pt

    A Point object corresponding to the vertex to be added to the array.

  • Returns the intent name as a value of the IntentName enumeration type.

    See

    IntentType

    Declaration

    Objective-C

    - (PTPolyLineIntentType)GetIntentName;

    Swift

    func getIntentName() -> PTPolyLineIntentType

    Return Value

    The intent type of the annotation.

  • Sets the Intent name as a value of the IntentName enumeration type. (Optional; PDF 1.6 )

    See

    IntentType

    Declaration

    Objective-C

    - (void)SetIntentName:(PTPolyLineIntentType)mode;

    Swift

    func setIntentName(_ mode: PTPolyLineIntentType)

    Parameters

    mode

    The intent name of the annotation.