#include <FreeText.h>
Public Member Functions | |
FreeText (SDF::Obj d=0) | |
FreeText (const Annot &ann) | |
UString | GetDefaultAppearance () const |
void | SetDefaultAppearance (const char *app_str) |
int | GetQuaddingFormat () const |
void | SetQuaddingFormat (const int format) |
Point | GetCalloutLinePoint1 () const |
Point | GetCalloutLinePoint2 () const |
Point | GetCalloutLinePoint3 () const |
void | GetCalloutLinePoints (Point &p1, Point &p2, Point &p3) const |
void | SetCalloutLinePoints (const Point &p1, const Point &p2, const Point &p3) |
void | SetCalloutLinePoints (const Point &p1, const Point &p2) |
IntentName | GetIntentName () const |
void | SetIntentName (IntentName mode=e_FreeText) |
Line::EndingStyle | GetEndingStyle () const |
void | SetEndingStyle (Line::EndingStyle style) |
void | SetEndingStyle (const char *est) |
void | SetTextColor (const ColorPt &color, int col_comp) |
ColorPt | GetTextColor () |
int | GetTextColorCompNum () |
void | GetTextColor (ColorPt &color, int &col_comp) |
void | SetLineColor (const ColorPt &color, int col_comp) |
ColorPt | GetLineColor () |
int | GetLineColorCompNum () |
void | GetLineColor (ColorPt &color, int &col_comp) |
void | SetFontName (const char *fontName) |
void | SetFontSize (double font_size) |
double | GetFontSize () |
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) | |
Annot & | operator= (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 FreeText | Create (SDF::SDFDoc &doc, const Rect &pos) |
static FreeText | 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 Annot * | CreateInternal (ptrdiff_t impl) |
A FreeText annotation (PDF 1.3) displays text directly on the page. Unlike an ordinary Text annotation, a FreeText annotation has no open or closed state; The content of the FreeText annotation is always visible instead of being displayed in a popup window.
Definition at line 24 of file FreeText.h.
This enum defines the intention of the FreeText annotation
Enumerator | |
---|---|
e_FreeText |
The annotation intended to function as a plain FreeText annotation. |
e_FreeTextCallout |
The annotation is intended to function as a callout. |
e_FreeTextTypeWriter |
The annotation is intended to function as a click-to-type or typewriter object and no callout line is drawn. |
e_Unknown |
User defined or Invalid. |
Definition at line 161 of file FreeText.h.
pdftron::PDF::Annots::FreeText::FreeText | ( | SDF::Obj | d = 0 | ) |
Creates a FreeText annotation and initializes it using given Cos/SDF object.
d | The Cos/SDF object to initialze the annotation with. |
|
inline |
Creates a FreeText annotation and initializes it using given annotation object.
Definition at line 41 of file FreeText.h.
|
static |
|
static |
Point pdftron::PDF::Annots::FreeText::GetCalloutLinePoint1 | ( | ) | const |
Returns the callout line points of the FreeText annotation. (PDF 1.6)
p1 | The target point. (where the ending style is used) |
p2 | The ending point. |
p3 | The knee point. |
Point pdftron::PDF::Annots::FreeText::GetCalloutLinePoint2 | ( | ) | const |
Point pdftron::PDF::Annots::FreeText::GetCalloutLinePoint3 | ( | ) | const |
void pdftron::PDF::Annots::FreeText::GetCalloutLinePoints | ( | Point & | p1, |
Point & | p2, | ||
Point & | p3 | ||
) | const |
Returns the callout line points of the FreeText annotation. (PDF 1.6)
p1 | The target point. (where the ending style is used) |
p2 | The ending point. |
p3 | The knee point. |
UString pdftron::PDF::Annots::FreeText::GetDefaultAppearance | ( | ) | const |
Returns the default appearance of the FreeText annotation.
Line::EndingStyle pdftron::PDF::Annots::FreeText::GetEndingStyle | ( | ) | const |
Returns the ending style of the callout line of the FreeText Annotation.
double pdftron::PDF::Annots::FreeText::GetFontSize | ( | ) |
Get the default appearance font size. To get the actual font size used, call RefreshAppearance and then use ElementReader on the content stream of this annotation.
IntentName pdftron::PDF::Annots::FreeText::GetIntentName | ( | ) | const |
ColorPt pdftron::PDF::Annots::FreeText::GetLineColor | ( | ) |
Returns the line and border color of the FreeText Annotation.
color | reference to ColorPt object, where results will be saved. |
col_comp | reference to an integer, where number of colorant components will be written. |
void pdftron::PDF::Annots::FreeText::GetLineColor | ( | ColorPt & | color, |
int & | col_comp | ||
) |
Returns the line and border color of the FreeText Annotation.
color | reference to ColorPt object, where results will be saved. |
col_comp | reference to an integer, where number of colorant components will be written. |
int pdftron::PDF::Annots::FreeText::GetLineColorCompNum | ( | ) |
int pdftron::PDF::Annots::FreeText::GetQuaddingFormat | ( | ) | const |
ColorPt pdftron::PDF::Annots::FreeText::GetTextColor | ( | ) |
Returns the text color of the FreeText Annotation.
void pdftron::PDF::Annots::FreeText::GetTextColor | ( | ColorPt & | color, |
int & | col_comp | ||
) |
Returns the text color of the FreeText Annotation.
color | reference to ColorPt object, where results will be saved. |
col_comp | reference to an integer, where number of colorant components will be written. |
int pdftron::PDF::Annots::FreeText::GetTextColorCompNum | ( | ) |
void pdftron::PDF::Annots::FreeText::SetDefaultAppearance | ( | const char * | app_str | ) |
Sets the default appearance of the FreeText annotation.
app_str | A string representing the default appearance of the annotation. |
void pdftron::PDF::Annots::FreeText::SetEndingStyle | ( | Line::EndingStyle | style | ) |
void pdftron::PDF::Annots::FreeText::SetEndingStyle | ( | const char * | est | ) |
void pdftron::PDF::Annots::FreeText::SetFontName | ( | const char * | fontName | ) |
Sets the default appearance font name.
fontName | Set the default name name. |
void pdftron::PDF::Annots::FreeText::SetFontSize | ( | double | font_size | ) |
Sets the default appearance font size. A value of zero specifies that the font size should should adjust so that the text uses as much of the FreeText bounding box as possible.
font_size | Set the default font size. A value of zero means auto resize font. |
void pdftron::PDF::Annots::FreeText::SetIntentName | ( | IntentName | mode = e_FreeText | ) |
void pdftron::PDF::Annots::FreeText::SetLineColor | ( | const ColorPt & | color, |
int | col_comp | ||
) |
Sets the line and border color of the FreeText Annotation.
color | ColorPt object representing the color. |
col_comp | number of colorant components in ColorPt object. |
void pdftron::PDF::Annots::FreeText::SetQuaddingFormat | ( | const int | format | ) |
Sets the quading format of the FreeText annotation. (Optional; PDF 1.4)
format | A int code indicating the quading format of the FreeText annotation. Default value: 0 (left-justified). |
void pdftron::PDF::Annots::FreeText::SetTextColor | ( | const ColorPt & | color, |
int | col_comp | ||
) |
Sets the text color of the FreeText Annotation.
color | ColorPt object representing the color. |
col_comp | number of colorant components in ColorPt object. |