![]() |
#include <FreeText.h>
Public Types | |
enum | IntentName { e_FreeText, e_FreeTextCallout, e_FreeTextTypeWriter, e_Unknown } |
This enum defines the intention of the FreeText annotation. More... | |
Public Member Functions | |
FreeText (SDF::Obj d=0) | |
Creates a FreeText annotation and initializes it using given Cos/SDF object. | |
FreeText (const Annot &ann) | |
Creates a FreeText annotation and initializes it using given annotation object. | |
UString | GetDefaultAppearance () const |
Returns the default appearance of the FreeText annotation. | |
void | SetDefaultAppearance (const char *app_str) |
Sets the default appearance of the FreeText annotation. | |
int | GetQuaddingFormat () const |
Returns the quading format of the FreeText annotation. | |
void | SetQuaddingFormat (const int app_qform) |
Sets the quading format of the FreeText annotation. | |
void | GetCalloutLinePoints (Point &p1, Point &p2, Point &p3) const |
Returns the callout line points of the FreeText annotation. | |
void | SetCalloutLinePoints (const Point &p1, const Point &p2, const Point &p3) |
Sets the callout line points of the FreeText annotation. | |
void | SetCalloutLinePoints (const Point &p1, const Point &p2) |
Sets the callout line points of the FreeText annotation. | |
IntentName | GetIntentName () const |
Returns Intent name of the FreeText annotation. | |
void | SetIntentName (IntentName mode=e_FreeText) |
Sets the Intent name of the FreeText annotation. | |
Line::EndingStyle | GetEndingStyle () const |
Returns the ending style of the callout line of the FreeText Annotation. | |
void | SetEndingStyle (Line::EndingStyle est) |
Sets the ending style of the callout line of the FreeText Annotation. | |
void | SetEndingStyle (const char *est) |
Sets the ending style of the callout line of the FreeText Annotation. | |
void | SetTextColor (const ColorPt &color, int col_comp) |
Sets the text color of the FreeText Annotation. | |
void | GetTextColor (ColorPt &color, int &col_comp) |
Returns the text color of the FreeText Annotation. | |
void | SetLineColor (const ColorPt &color, int col_comp) |
Sets the line and border color of the FreeText Annotation. | |
void | GetLineColor (ColorPt &color, int &col_comp) |
Returns the line and border color of the FreeText Annotation. | |
Static Public Member Functions | |
static FreeText | Create (SDF::SDFDoc &doc, const Rect &pos) |
Creates a new FreeText annotation in the specified document. |
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.
This enum defines the intention of the FreeText annotation.
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. |
pdftron::PDF::Annots::FreeText::FreeText | ( | SDF::Obj | d = 0 |
) |
Creates a FreeText annotation and initializes it using given Cos/SDF object.
pdftron::PDF::Annots::FreeText::FreeText | ( | const Annot & | ann | ) | [inline] |
Creates a FreeText annotation and initializes it using given annotation object.
static FreeText pdftron::PDF::Annots::FreeText::Create | ( | SDF::SDFDoc & | doc, | |
const Rect & | pos | |||
) | [static] |
UString pdftron::PDF::Annots::FreeText::GetDefaultAppearance | ( | ) | const |
Returns the default appearance of the FreeText annotation.
this method corresponds to the 'DA' entry in the annotation dictionary.
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. |
this method corresponds to the 'DA' entry in the annotation dictionary.
int pdftron::PDF::Annots::FreeText::GetQuaddingFormat | ( | ) | const |
void pdftron::PDF::Annots::FreeText::SetQuaddingFormat | ( | const int | app_qform | ) |
Sets the quading format of the FreeText annotation.
(Optional; PDF 1.4)
app_qform | A int code indicating the quading format of the FreeText annotation. Default value: 0 (left-justified). |
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 starting point. | |
p2 | The ending point. | |
p3 | The knee point. |
IntentName pdftron::PDF::Annots::FreeText::GetIntentName | ( | ) | const |
void pdftron::PDF::Annots::FreeText::SetIntentName | ( | IntentName | mode = e_FreeText |
) |
Sets the Intent name of the FreeText annotation.
(Optional; PDF 1.4)
mode | The intent name of the annotation as an entry from the enum "IntentName". |
Line::EndingStyle pdftron::PDF::Annots::FreeText::GetEndingStyle | ( | ) | const |
Returns the ending style of the callout line of the FreeText Annotation.
void pdftron::PDF::Annots::FreeText::SetEndingStyle | ( | Line::EndingStyle | est | ) |
void pdftron::PDF::Annots::FreeText::SetEndingStyle | ( | const char * | est | ) |
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. |
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. |
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::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. |