PTLineAnnot

@interface PTLineAnnot : PTMarkup

A line annotation (PDF 1.3) is used to display a single straight line on the page. When opened, it should display a pop-up window containing the text of the associated note.

  • Creates a new LineAnnot annotation in the specified document.

    Declaration

    Objective-C

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

    Swift

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

    Parameters

    doc

    A document to which the annotation is added.

    pos

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

    Return Value

    A newly created blank LineAnnot annotation.

  • Undocumented

    Declaration

    Objective-C

    + (PTLineAnnot*)CreateAnnot: (PTSDFDoc*)doc pos:  (PTPDFRect*)pos;

    Swift

    class func createAnnot(_ doc: PTSDFDoc!, pos: PTPDFRect!) -> PTLineAnnot!
  • Returns the coordinates of the start of a line.

    Declaration

    Objective-C

    - (PTPDFPoint *)GetStartPoint;

    Swift

    func getStartPoint() -> PTPDFPoint!

    Return Value

    A point specifying the coordinates of the start of the line.

  • Sets the coordinates of the start of a line.

    Declaration

    Objective-C

    - (void)SetStartPoint:(PTPDFPoint *)sp;

    Swift

    func setStart(_ sp: PTPDFPoint!)

    Parameters

    sp

    A point specifying the coordinates of the end of the line.

  • Returns the coordinates of the end of a line.

    Declaration

    Objective-C

    - (PTPDFPoint *)GetEndPoint;

    Swift

    func getEndPoint() -> PTPDFPoint!

    Return Value

    A point specifying the coordinates of the end of the line.

  • Sets the coordinates of the end of a line.

    Declaration

    Objective-C

    - (void)SetEndPoint:(PTPDFPoint *)ep;

    Swift

    func setEnd(_ ep: PTPDFPoint!)

    Parameters

    ep

    - A point specifying the coordinates of the end of the line.

  • Returns the ending style that applies to the first point of the line.

    Note

    Default value: e_None.

    Declaration

    Objective-C

    - (PTEndingStyle)GetStartStyle;

    Swift

    func getStartStyle() -> PTEndingStyle

    Return Value

    A enum value from the “EndingStyle”.

  • Sets the ending style that applies to the first point of the line. (Optional; PDF 1.4.)

    Note

    Default value: e_None.

    Declaration

    Objective-C

    - (void)SetStartStyle:(PTEndingStyle)sst;

    Swift

    func setStart(_ sst: PTEndingStyle)

    Parameters

    sst

    A enum value from the “EndingStyle”.

  • Returns the ending style that applies to the second point of the line.

    Note

    Default value: e_None.

    Declaration

    Objective-C

    - (PTEndingStyle)GetEndStyle;

    Swift

    func getEndStyle() -> PTEndingStyle

    Return Value

    A enum value from the “EndingStyle”.

  • Sets the ending style that applies to the second point of the line. (Optional; PDF 1.4)

    Note

    Default value: e_None.

    Declaration

    Objective-C

    - (void)SetEndStyle:(PTEndingStyle)est;

    Swift

    func setEnd(_ est: PTEndingStyle)

    Parameters

    est

    A enum value from the “EndingStyle”.

  • Returns the leader line length of a line.

    Note

    Usually if this entry is specified, the line is intended to be a dimension line (see “IT” entry of the annotation dictionary).

    Note

    Leader length is length of leader lines in default user space that extend from each endpoint of the line perpendicular to the line itself. A positive value shall mean that the leader lines appear in the direction that is clockwise when traversing the line from its starting point to its ending point (as specified by L); a negative value shall indicate the opposite direction. Default value: 0 (no leader lines)

    Declaration

    Objective-C

    - (double)GetLeaderLineLength;

    Swift

    func getLeaderLineLength() -> Double

    Return Value

    A number denoting the length of the leader line in default user space units.

  • Sets the leader line length of a line. (PDF 1.6)

    Note

    Usually if this entry is specified, the line is intended to be a dimension line (see “IT” entry of the annotation dictionary).

    Note

    Leader length is length of leader lines in default user space that extend from each endpoint of the line perpendicular to the line itself. A positive value shall mean that the leader lines appear in the direction that is clockwise when traversing the line from its starting point to its ending point (as specified by L); a negative value shall indicate the opposite direction. Default value: 0 (no leader lines)

    Declaration

    Objective-C

    - (void)SetLeaderLineLength:(double)length;

    Swift

    func setLeaderLineLength(_ length: Double)

    Parameters

    length

    A number denoting the length of the leader line in default user space units.

  • Returns the leader line extension length of a line.

    Note

    The leader line extension length is a non-negative number that shall represents the length of leader line extensions that extend from the line proper 180 degrees from the leader lines. Default value: 0 (no leader line extensions)

    Declaration

    Objective-C

    - (double)GetLeaderLineExtensionLength;

    Swift

    func getLeaderLineExtensionLength() -> Double

    Return Value

    A number denoting the length of the leader line extension in default user space units.

  • Sets the leader line extension length of a line. (PDF 1.6)

    Note

    The leader line extension length is a non-negative number that shall represents the length of leader line extensions that extend from the line proper 180 degrees from the leader lines. Default value: 0 (no leader line extensions)

    Declaration

    Objective-C

    - (void)SetLeaderLineExtensionLength:(double)length;

    Swift

    func setLeaderLineExtensionLength(_ length: Double)

    Parameters

    length

    A number denoting the length of the leader line extension in default user space units.

  • Returns true if caption is to be shown, otherwise false.

    Note

    If true, the text specified by the Contents or RCentries shall be replicated as a caption in the appearance of the line. The text shall be rendered in a manner appropriate to the content, taking into account factors such as writing direction. Default value: false.

    Declaration

    Objective-C

    - (BOOL)GetShowCaption;

    Swift

    func getShowCaption() -> Bool

    Return Value

    A boolean value indicating whether the caption will be shown.

  • Sets the option of whether to show caption.

    Note

    If true, the text specified by the Contents or RC entries shall be replicated as a caption in the appearance of the line. The text shall be rendered in a manner appropriate to the content, taking into account factors such as writing direction. Default value: false.

    Declaration

    Objective-C

    - (void)SetShowCaption:(BOOL)showCaption;

    Swift

    func setShowCaption(_ showCaption: Bool)

    Parameters

    showCaption

    A boolean value indicating whether the caption will be shown.

  • Returns the intent type of the line.

    Note

    Intent type describes the intent of the line annotation. Valid values shall be “e_LineArrow”, which means that the annotation is intended to function as an arrow, and “e_LineDimension”, which means that the annotation is intended to function as a dimension line.

    Declaration

    Objective-C

    - (PTLineIntentType)GetIntentType;

    Swift

    func getIntentType() -> PTLineIntentType

    Return Value

    An intent type value from the “IntentType” enum.

  • Sets the intent type of the line. (For PDF 1.6)

    Note

    Intent type describes the intent of the line annotation. Valid values shall be “e_LineArrow”, which means that the annotation is intended to function as an arrow, and “e_LineDimension”, which means that the annotation is intended to function as a dimension line.

    Declaration

    Objective-C

    - (void)SetIntentType:(PTLineIntentType)it;

    Swift

    func setIntentType(_ it: PTLineIntentType)

    Parameters

    it

    An intent type value from the “IntentType” enum.

  • Returns the leader line offset length of a line.

    Note

    Leader line offset number is a non-negative number that shall represent the length of the leader line offset, which is the amount of empty space between the endpoints of the annotation and the beginning of the leader lines.

    Declaration

    Objective-C

    - (double)GetLeaderLineOffset;

    Swift

    func getLeaderLineOffset() -> Double

    Return Value

    A number denoting the length of the leader line offset in default user space units.

  • Sets the leader line offset length of a line. (PDF 1.7)

    Note

    Leader line offset number is a non-negative number that shall represent the length of the leader line offset, which is the amount of empty space between the endpoints of the annotation and the beginning of the leader lines.

    Declaration

    Objective-C

    - (void)SetLeaderLineOffset:(double)length;

    Swift

    func setLeaderLineOffset(_ length: Double)

    Parameters

    length

    A number denoting the length of the leader line offset in default user space units.

  • Returns the caption position of a line.

    Note

    Caption position describes the annotation’s caption positioning. Default value: Inline

    See

    CapPos

    Declaration

    Objective-C

    - (PTCapPos)GetCaptionPosition;

    Swift

    func getCaptionPosition() -> PTCapPos

    Return Value

    A cap position value from the “CapPos” enum.

  • Sets the caption position of a line. (Optional, PDF 1.7)

    Note

    Caption position describes the annotation’s caption positioning. Default value: Inline

    See

    CapPos

    Declaration

    Objective-C

    - (void)SetCaptionPosition:(PTCapPos)style;

    Swift

    func setCaptionPosition(_ style: PTCapPos)

    Parameters

    style

    A caption position value from the “CapPos” enum.

  • Returns the horizontal offset of the caption.

    Note

    The horizontal offset specifies the offset of the caption text from the line’s midpoint, with a positive value indicating offset to the right and a negative value indicating offset to the left. Default value: 0 (no offset from normal horizontal positioning).

    Declaration

    Objective-C

    - (double)GetTextHOffset;

    Swift

    func getTextHOffset() -> Double

    Return Value

    A number denoting the horizontal offset of the caption in default user space units.

  • Sets the horizontal offset of the caption. (For PDF 1.7 )

    Note

    The horizontal offset specifies the offset of the caption text from the line’s midpoint, with a positive value indicating offset to the right and a negative value indicating offset to the left. Default value: 0 (no offset from normal horizontal positioning).

    Declaration

    Objective-C

    - (void)SetTextHOffset:(double)offset;

    Swift

    func setTextHOffset(_ offset: Double)

    Parameters

    offset

    A number denoting the horizontal offset of the caption in default user space units.

  • Returns the vertical offset of the caption.

    Note

    The vertical offset specifies the offset of the caption text perpendicular to the annotation line, with a positive value indicating a shift up and a negative value indicating a shift down. Default value: 0 (no offset from normal vertical positioning).

    Declaration

    Objective-C

    - (double)GetTextVOffset;

    Swift

    func getTextVOffset() -> Double

    Return Value

    A number denoting the vertical offset of the caption in default user space units.

  • Sets the vertical offset of the caption. (For PDF 1.7 )

    Note

    The vertical offset specifies the offset of the caption text perpendicular to the annotation line, with a positive value indicating a shift up and a negative value indicating a shift down. Default value: 0 (no offset from normal vertical positioning).

    Declaration

    Objective-C

    - (void)SetTextVOffset:(double)offset;

    Swift

    func setTextVOffset(_ offset: Double)

    Parameters

    offset

    A number denoting the vertical offset of the caption in default user space units.

  • Undocumented

    Declaration

    Objective-C

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

    Swift

    init!(d: PTObj!)
  • Undocumented

    Declaration

    Objective-C

    - (instancetype)init;

    Swift

    init!()
  • Undocumented

    Declaration

    Objective-C

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

    Swift

    init!(ann: PTAnnot!)