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

#include <Ink.h>

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

Public Member Functions

 Ink (SDF::Obj d=0)
 
 Ink (const Annot &ann)
 
int GetPathCount () const
 
int GetPointCount (unsigned int pathindex) const
 
Point GetPoint (unsigned int pathindex, unsigned int pointindex) const
 
void SetPoint (unsigned int pathindex, unsigned int pointindex, const Point &pt)
 
bool Erase (const Point &pt1, const Point &pt2, double width)
 
bool GetHighlightIntent ()
 
void SetHighlightIntent (bool highlight)
 
- 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 Ink Create (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)
 

Additional Inherited Members

- 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
 

Detailed Description

An ink annotation (PDF 1.3) represents a freehand "scribble" composed of one or more disjoint paths. When opened, it shall display a pop-up window containing the text of the associated note.

Definition at line 19 of file Ink.h.

Constructor & Destructor Documentation

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

Creates an Ink 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::Ink::Ink ( const Annot ann)
inline

Creates an Ink annotation and initializes it using given annotation object.

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

Definition at line 36 of file Ink.h.

Member Function Documentation

static Ink pdftron::PDF::Annots::Ink::Create ( SDF::SDFDoc doc,
const Rect pos 
)
static

Creates a new Ink annotation in the specified document.

Parameters
docA document to which the Ink annotation is added.
posA rectangle specifying the Ink annotation's bounds in default user space units.
Returns
A newly created blank Ink annotation.
bool pdftron::PDF::Annots::Ink::Erase ( const Point pt1,
const Point pt2,
double  width 
)

Erase a rectangle area formed by pt1pt2 with width

Parameters
pt1A point object that is one end of the eraser segment
pt2A point object that is the other end of the eraser segment
widthThe half width of the eraser
Returns
Whether an ink stroke was erased
bool pdftron::PDF::Annots::Ink::GetHighlightIntent ( )

Retrieves whether the Ink will draw like a highlighter.

Returns
true if the Ink will draw like a highlighter. (multiply blend mode) If false it will draw in normal mode. (normal blend mode)
int pdftron::PDF::Annots::Ink::GetPathCount ( ) const

Returns number of paths in the annotation.

Returns
An integer representing the number of paths in the 'InkList' entry of the annotation dictionary.
Note
Each path is an array of Point objects specifying points along the path. When drawn, the points shall be connected by straight lines or curves in an implementation-dependent way.
Point pdftron::PDF::Annots::Ink::GetPoint ( unsigned int  pathindex,
unsigned int  pointindex 
) const

Returns the specific point in a given path.

Parameters
pathindexpath index for each the point is returned. Index starts at 0.
pointindexindex of point in the path. Index starts at 0.
Returns
A Point object for specified path and point index.
Note
Each path is an array of Point objects specifying points along the path. When drawn, the points shall be connected by straight lines or curves in an implementation-dependent way.
int pdftron::PDF::Annots::Ink::GetPointCount ( unsigned int  pathindex) const

Returns number of points in a certain stroked path in the InkList.

Parameters
pathindexpath index for each the point count is returned. Index starts at 0.
Returns
An integer representing the number of points in the stroked path of the Ink list.
See also
GetPathCount()
void pdftron::PDF::Annots::Ink::SetHighlightIntent ( bool  highlight)

Enables or disables the Ink drawing like a highlighter.

Parameters
highlighttrue if the Ink will draw like a highlighter. (multiply blend mode) If false it will draw in normal mode. (normal blend mode)
void pdftron::PDF::Annots::Ink::SetPoint ( unsigned int  pathindex,
unsigned int  pointindex,
const Point pt 
)

Sets the specific point in the Ink List, adding it if needed.

Parameters
pathindexAn unsigned integer indicating the index of the path.
pointindexAn unsigned integer indicating the index of the point within the stroked path indicated by the parameter "pathindex".
ptA Point object that is to be assigned.
Note
Ink annotation contains an array of paths. Each path is an array of Point objects specifying points along the path. When drawn, the points shall be connected by straight lines or curves in an implementation-dependent way.

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