pdftron::PDF::Annots::TextMarkup Class Reference

A TextMarkup is a base class for highlight, underline, strikeout, and squiggly annotations. More...

#include <TextMarkup.h>

Inheritance diagram for pdftron::PDF::Annots::TextMarkup:

Inheritance graph
[legend]
Collaboration diagram for pdftron::PDF::Annots::TextMarkup:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 TextMarkup (SDF::Obj d)
 Creates a TextMarkup annotation and initializes it using given Cos/SDF object.
 TextMarkup (const Annot &ann)
 Creates a TextMarkup annotation and initializes it using given annotation object.
int GetQuadPointCount ()
 Returns the number of QuadPoints in the QuadPoints array of the TextMarkup annotation (PDF 1.6).
QuadPoint GetQuadPoint (int idx) const
 Returns the QuadPoint located at a certain index of the QuadPoint array.
void SetQuadPoint (int idx, const QuadPoint &qp)
 Sets the QuadPoint to be located at a certain index of the QuadPoint array.


Detailed Description

A TextMarkup is a base class for highlight, underline, strikeout, and squiggly annotations.

Constructor & Destructor Documentation

pdftron::PDF::Annots::TextMarkup::TextMarkup ( SDF::Obj  d  ) 

Creates a TextMarkup 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.

pdftron::PDF::Annots::TextMarkup::TextMarkup ( const Annot ann  )  [inline]

Creates a TextMarkup annotation and initializes it using given annotation object.

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


Member Function Documentation

int pdftron::PDF::Annots::TextMarkup::GetQuadPointCount (  ) 

Returns the number of QuadPoints in the QuadPoints array of the TextMarkup annotation (PDF 1.6).

Returns:
The number of QuadPoints.
Note:
QuadPoints specify the coordinates of quadrilaterals in default user space. Each quadrilateral encompasses a word or group of contiguous words in the text underlying the annotation. The four points(p1, p2, p3, p4) of a QuadPoint specify the quadrilateral’s four vertices in counterclockwise order. The text needs to be oriented with respect to the edge connecting points (p1) and (p2). The annotation dictionary’s Appearance entry, if present, takes precedence over QuadPoints.

QuadPoint pdftron::PDF::Annots::TextMarkup::GetQuadPoint ( int  idx  )  const

Returns the QuadPoint located at a certain index of the QuadPoint array.

(PDF 1.6)

Parameters:
idx The index where the QuadPoint is located. The index starts at zero and must be less than return value of GetQuadPointCount().
Returns:
The QuadPoint located at a certain index of the QuadPoint array of the TextMarkup annotation.
Note:
QuadPoints specify the coordinates of quadrilaterals in default user space. Each quadrilateral encompasses a word or group of contiguous words in the text underlying the annotation. The four points(p1, p2, p3, p4) of a QuadPoint specify the quadrilateral’s four vertices in counterclockwise order. The text needs to be oriented with respect to the edge connecting points (p1) and (p2). The annotation dictionary’s Appearance entry, if present, takes precedence over QuadPoints.

void pdftron::PDF::Annots::TextMarkup::SetQuadPoint ( int  idx,
const QuadPoint qp 
)

Sets the QuadPoint to be located at a certain index of the QuadPoint array.

(Optional; PDF 1.6 )

Parameters:
idx The index where the QuadPoint is to be located (the index is counted from 0).
qp The QuadPoint to be located at a certain index of the QuadPoint array of the TextMarkup annotation.
Note:
An array of n QuadPoints specifying the coordinates of n quadrilaterals in default user space. Each quadrilateral shall encompasses a word or group of contiguous words in the text underlying the annotation. The coordinates for each quadrilateral shall be given in the order p1, p2, p3, p4 specifying the quadrilateral’s four vertices in counterclockwise order. The text shall be oriented with respect to the edge connecting points (p1) and (p2). The annotation dictionary’s Appearance(AP) entry, if present, shall take precedence over QuadPoints.


© 2002-2010 PDFTron Systems Inc.