All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
pdftron::PDF::Annots::PolyLine Class Reference

#include <PolyLine.h>

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

Public Types

enum  IntentType { e_PolygonCloud, e_PolyLineDimension, e_PolygonDimension, e_Unknown }
 
- Public Types inherited from pdftron::PDF::Annots::Line
enum  EndingStyle {
  e_Square, e_Circle, e_Diamond, e_OpenArrow,
  e_ClosedArrow, e_Butt, e_ROpenArrow, e_RClosedArrow,
  e_Slash, e_None, e_Unknown
}
 
enum  IntentType { e_LineArrow, e_LineDimension, e_null }
 
enum  CapPos { e_Inline, e_Top }
 
- Public Types inherited from pdftron::PDF::Annots::Markup
enum  BorderEffect { e_None, e_Cloudy }
 
- Public Types inherited from pdftron::PDF::Annot
enum  Type {
  e_Text, e_Link, e_FreeText, e_Line,
  e_Square, e_Circle, e_Polygon, e_Polyline,
  e_Highlight, e_Underline, e_Squiggly, e_StrikeOut,
  e_Stamp, e_Caret, e_Ink, e_Popup,
  e_FileAttachment, e_Sound, e_Movie, e_Widget,
  e_Screen, e_PrinterMark, e_TrapNet, e_Watermark,
  e_3D, e_Redact, e_Projection, e_RichMedia,
  e_Unknown
}
 
enum  Flag {
  e_invisible, e_hidden, e_print, e_no_zoom,
  e_no_rotate, e_no_view, e_read_only, e_locked,
  e_toggle_no_view, e_locked_contents
}
 
enum  ActionTriggerEvent {
  e_action_trigger_activate = 0, e_action_trigger_annot_enter = 1, e_action_trigger_annot_exit = 2, e_action_trigger_annot_down = 3,
  e_action_trigger_annot_up = 4, e_action_trigger_annot_focus = 5, e_action_trigger_annot_blur = 6, e_action_trigger_annot_page_open = 7,
  e_action_trigger_annot_page_close = 8, e_action_trigger_annot_page_visible = 9, e_action_trigger_annot_page_invisible = 10
}
 
enum  AnnotationState { e_normal, e_rollover, e_down }
 
typedef pdftron::PDF::BorderStyle BorderStyle
 

Public Member Functions

 PolyLine (SDF::Obj d=0)
 
 PolyLine (const Annot &ann)
 
int GetVertexCount () const
 
Point GetVertex (int idx) const
 
void SetVertex (int idx, const Point &pt)
 
IntentType GetIntentName () const
 
void SetIntentName (IntentType mode)
 
 PolyLine (TRN_Annot polyline)
 
- Public Member Functions inherited from pdftron::PDF::Annots::Line
 Line (SDF::Obj d=0)
 
 Line (const Annot &ann)
 
Point GetStartPoint () const
 
void SetStartPoint (const Point &sp)
 
Point GetEndPoint () const
 
void SetEndPoint (const Point &ep)
 
EndingStyle GetStartStyle () const
 
void SetStartStyle (EndingStyle sst)
 
EndingStyle GetEndStyle () const
 
void SetEndStyle (EndingStyle est)
 
double GetLeaderLineLength () const
 
void SetLeaderLineLength (const double &length)
 
double GetLeaderLineExtensionLength () const
 
void SetLeaderLineExtensionLength (const double &length)
 
bool GetShowCaption () const
 
void SetShowCaption (bool showCaption)
 
IntentType GetIntentType () const
 
void SetIntentType (IntentType it)
 
double GetLeaderLineOffset () const
 
void SetLeaderLineOffset (double length)
 
CapPos GetCaptionPosition () const
 
void SetCaptionPosition (const CapPos &style)
 
double GetTextHOffset () const
 
void SetTextHOffset (double offset)
 
double GetTextVOffset () const
 
void SetTextVOffset (double offset)
 
- Public Member Functions inherited from pdftron::PDF::Annots::Markup
 Markup (SDF::Obj d=0)
 
 Markup (const Annot &ann)
 
UString GetTitle ()
 
void SetTitle (const UString &title)
 
void SetTitle (const char *title)
 
Popup GetPopup () const
 
void SetPopup (const Popup &ppup)
 
double GetOpacity () const
 
void SetOpacity (double op)
 
UString GetSubject () const
 
void SetSubject (const UString &contents)
 
Date GetCreationDates () const
 
void SetCreationDates (const Date &dt)
 
BorderEffect GetBorderEffect () const
 
void SetBorderEffect (BorderEffect effect=e_None)
 
double GetBorderEffectIntensity () const
 
void SetBorderEffectIntensity (double intensity=0)
 
ColorPt GetInteriorColor () const
 
int GetInteriorColorCompNum () const
 
void SetInteriorColor (const ColorPt &c, int CompNum)
 
Rect GetContentRect () const
 
void SetContentRect (const Rect &cr)
 
Rect GetPadding () const
 
void SetPadding (const Rect &rd)
 
void SetPadding (double x)
 
void RotateAppearance (double angle)
 
- Public Member Functions inherited from pdftron::PDF::Annot
 Annot (SDF::Obj d=0)
 
 Annot (const Annot &d)
 
Annotoperator= (const Annot &d)
 
bool operator== (const Annot &d)
 
bool IsValid () const
 
SDF::Obj GetSDFObj () const
 
Type GetType () const
 
Rect GetRect () const
 
Rect GetVisibleContentBox () const
 
bool IsMarkup () const
 
void SetRect (const Rect &pos)
 
Page GetPage () const
 
void SetPage (const Page &page)
 
SDF::Obj GetUniqueID () const
 
void SetUniqueID (const char *id, int id_buf_sz=0)
 
Date GetDate () const
 
void SetDate (const Date &date)
 
bool GetFlag (Flag flag) const
 
void SetFlag (Flag flag, bool value)
 
SDF::Obj GetTriggerAction (Annot::ActionTriggerEvent trigger)
 
BorderStyle GetBorderStyle () const
 
void SetBorderStyle (const BorderStyle &bs, bool oldStyleOnly=false)
 
SDF::Obj GetAppearance (AnnotationState annot_state=e_normal, const char *app_state=0)
 
void SetAppearance (SDF::Obj app_stream, AnnotationState annot_state=e_normal, const char *app_state=0)
 
void RemoveAppearance (AnnotationState annot_state=e_normal, const char *app_state=0)
 
void Flatten (class Page page)
 
const char * GetActiveAppearanceState () const
 
void SetActiveAppearanceState (const char *astate)
 
ColorPt GetColorAsRGB () const
 
ColorPt GetColorAsCMYK () const
 
ColorPt GetColorAsGray () const
 
int GetColorCompNum () const
 
void SetColor (const ColorPt &col, int numcomp=3)
 
int GetStructParent () const
 
void SetStructParent (const int parkeyval)
 
SDF::Obj GetOptionalContent () const
 
void SetOptionalContent (SDF::Obj content)
 
void SetContents (const UString &contents)
 
UString GetContents () const
 
int GetRotation () const
 
void SetRotation (int angle)
 
void RefreshAppearance ()
 
void RefreshAppearance (const RefreshOptions &options)
 
UString GetCustomData (const UString &key) const
 
void SetCustomData (const UString &key, const UString &value)
 
void DeleteCustomData (const UString &key)
 
void Resize (const Rect &newrect)
 
ptrdiff_t GetHandleInternal ()
 

Static Public Member Functions

static PolyLine Create (SDF::SDFDoc &doc, const Rect &pos)
 
static PolyLine CreateAnnot (SDF::SDFDoc &doc, const Rect &pos)
 
- Static Public Member Functions inherited from pdftron::PDF::Annots::Line
static Line Create (SDF::SDFDoc &doc, const Rect &pos)
 
static Line CreateAnnot (SDF::SDFDoc &doc, const Rect &pos)
 
- Static Public Member Functions inherited from pdftron::PDF::Annot
static Annot Create (SDF::SDFDoc &doc, Type type, const Rect &pos)
 
static AnnotCreateInternal (ptrdiff_t impl)
 

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.

Definition at line 25 of file PolyLine.h.

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.

Definition at line 91 of file PolyLine.h.

Constructor & Destructor Documentation

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

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

Parameters
dThe Cos/SDF object to initialze the annotation with.
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.

Parameters
annAnnot object used to initialize the PolyLine annotation.
Note
The constructor does not copy any data, but is instead the logical equivalent of a type cast.

Definition at line 42 of file PolyLine.h.

pdftron::PDF::Annots::PolyLine::PolyLine ( TRN_Annot  polyline)

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
docA document to which the PolyLine annotation is added.
posA rectangle specifying the PolyLine annotation's bounds in default user space units.
Returns
A newly created blank PolyLine annotation.
static PolyLine pdftron::PDF::Annots::PolyLine::CreateAnnot ( SDF::SDFDoc doc,
const Rect pos 
)
static
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
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
idxThe 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.
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.
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
modeThe intent name of the annotation.
See Also
IntentType
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
idxThe index of the vertex.
ptA 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.

The documentation for this class was generated from the following file: