pdftron::PDF::Annots::PolyLine Class Reference

This header defines classes for the Polygon and PolyLine annotations. More...

#include <PolyLine.h>

Inheritance diagram for pdftron::PDF::Annots::PolyLine:

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

Collaboration graph
[legend]

List of all members.

Public Types

enum  IntentType { e_PolygonCloud, e_PolyLineDimension, e_PolygonDimension, e_Unknown }
 This enum specifies the intention of the PolyLine annotation, it used for the purposes of generating the appearance of the annotation. More...

Public Member Functions

 PolyLine (SDF::Obj d=0)
 Creates a PolyLine annotation and initializes it using given Cos/SDF object.
 PolyLine (const Annot &ann)
 Creates a PolyLine annotation and initializes it using given annotation object.
int GetVertexCount () const
 Returns the number of vertices in the Vertices array.
Point GetVertex (int idx) const
 Returns the vertex(as a Point object) corresponding to the index within the Vertices array.
void SetVertex (int idx, const Point &pt)
 Sets the vertex(in Point object form) corresponding to the index within the Vertices array.
IntentType GetIntentName () const
 Returns the intent name as a value of the "IntentName" enumeration type.
void SetIntentName (IntentType mode)
 Sets the Intent name as a value of the "IntentName" enumeration type.

Static Public Member Functions

static PolyLine Create (SDF::SDFDoc &doc, const Rect &pos)
 Creates a new PolyLine annotation in the specified document.


Detailed Description

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.


Member Enumeration Documentation

This enum specifies the intention of the PolyLine annotation, it used for the purposes of generating the appearance of the annotation.

Enumerator:
e_PolygonCloud  The annotation is intended to function as a cloud object.
e_PolyLineDimension  The polyline annotation is intended to function as a dimension. (PDF 1.7).
e_PolygonDimension  The polygon annotation is intended to function as a dimension. (PDF 1.7).
e_Unknown  Non-standard intent type.

Reimplemented from pdftron::PDF::Annots::Line.


Constructor & Destructor Documentation

pdftron::PDF::Annots::PolyLine::PolyLine ( SDF::Obj  d = 0  ) 

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.

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

Creates a PolyLine 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

static PolyLine pdftron::PDF::Annots::PolyLine::Create ( SDF::SDFDoc doc,
const Rect pos 
) [static]

Creates a new PolyLine annotation in the specified document.

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.
Returns:
A newly created blank PolyLine annotation.

Reimplemented from pdftron::PDF::Annots::Line.

Reimplemented in pdftron::PDF::Annots::Polygon.

int pdftron::PDF::Annots::PolyLine::GetVertexCount (  )  const

Returns the number of vertices in the Vertices array.

Returns:
the number of vertices.
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.

Point pdftron::PDF::Annots::PolyLine::GetVertex ( int  idx  )  const

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

Parameters:
idx The index of the vertex, should be less than the value returned by GetVertexCount().
Returns:
A Point object corresponding to the vertex in the specified index position.
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.

void pdftron::PDF::Annots::PolyLine::SetVertex ( int  idx,
const Point pt 
)

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

Parameters:
idx The index of the vertex.
pt A Point object corresponding to the vertex to be added to the 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.

IntentType pdftron::PDF::Annots::PolyLine::GetIntentName (  )  const

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

Returns:
The intent type of the annotation.
See also:
IntentType

void pdftron::PDF::Annots::PolyLine::SetIntentName ( IntentType  mode  ) 

Sets the Intent name as a value of the "IntentName" enumeration type.

(Optional; PDF 1.6 )

Parameters:
mode The intent name of the annotation.
See also:
IntentType


© 2002-2010 PDFTron Systems Inc.