![]() |
#include <PolyLine.h>
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. |
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.
This enum specifies the intention of the PolyLine annotation, it used for the purposes of generating the appearance of the annotation.
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.
pdftron::PDF::Annots::PolyLine::PolyLine | ( | SDF::Obj | d = 0 |
) |
Creates a PolyLine annotation and initializes it using given Cos/SDF object.
pdftron::PDF::Annots::PolyLine::PolyLine | ( | const Annot & | ann | ) | [inline] |
Creates a PolyLine annotation and initializes it using given annotation object.
static PolyLine pdftron::PDF::Annots::PolyLine::Create | ( | SDF::SDFDoc & | doc, | |
const Rect & | pos | |||
) | [static] |
Creates a new PolyLine annotation in the specified document.
doc | A document to which the PolyLine annotation is added. | |
pos | A rectangle specifying the PolyLine annotation's bounds in default user space units. |
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.
Point pdftron::PDF::Annots::PolyLine::GetVertex | ( | int | idx | ) | const |
Returns the vertex(as a Point object) corresponding to the index within the Vertices array.
idx | The index of the vertex, should be less than the value returned by GetVertexCount(). |
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.
idx | The index of the vertex. | |
pt | A Point object corresponding to the vertex to be added to the array. |
IntentType pdftron::PDF::Annots::PolyLine::GetIntentName | ( | ) | const |
Returns the intent name as a value of the "IntentName" enumeration type.
void pdftron::PDF::Annots::PolyLine::SetIntentName | ( | IntentType | mode | ) |
Sets the Intent name as a value of the "IntentName" enumeration type.
(Optional; PDF 1.6 )
mode | The intent name of the annotation. |