![]() |
#include <Markup.h>
Public Types | |
enum | BorderEffect { e_None, e_Cloudy } |
Border Effect Style. More... | |
Public Member Functions | |
Markup (SDF::Obj d=0) | |
Creates a markup annotation and initializes it using given Cos/SDF object. | |
Markup (const Annot &ann) | |
Creates a markup annotation and initializes it using given annotation object. | |
UString | GetTitle () |
Returns the title of the markup annotation. | |
void | SetTitle (const UString &title) |
Sets the title of the markup annotation. | |
void | SetTitle (const char *title) |
Sets the title of the markup annotation. | |
Popup | GetPopup () const |
Returns the Popup object associated with this markup annotation. | |
void | SetPopup (const Popup &bs) |
Sets the Popup object associated with this markup annotation. | |
double | GetOpacity () const |
void | SetOpacity (double op) |
Sets the opacity value for the annotation. | |
UString | GetSubject () const |
Returns the subject of the Markup annotation. | |
void | SetSubject (const UString &subj) |
Sets subject of the Markup annotation. | |
Date | GetCreationDates () const |
void | SetCreationDates (const Date &dt) |
Sets the creation date for the markup annotation. | |
BorderEffect | GetBorderEffect () const |
void | SetBorderEffect (BorderEffect effect=e_None) |
Sets the border effect of the markup annotation. | |
double | GetBorderEffectIntensity () const |
void | SetBorderEffectIntensity (double intensity=0) |
Sets the border effect intensity of the markup annotation. | |
ColorPt | GetInteriorColor () const |
Returns the interior color of the annotation. | |
int | GetInteriorColorCompNum () const |
Returns the number indicating the interior color space of the annotation. | |
void | SetInteriorColor (const ColorPt &c, int CompNum) |
Sets the interior color of the Markup annotation. | |
Rect | GetContentRect () const |
Returns the inner bounding rectangle of the Markup annotation. | |
void | SetContentRect (const Rect &cr) |
Sets the inner bounding rectangle of the Markup annotation. | |
Rect | GetPadding () const |
Returns the rectangle difference between overall annotation rectangle and content rectangle. | |
void | SetPadding (const Rect &rd) |
Sets the rectangle difference between overall annotation rectangle and content rectangle. | |
void | SetPadding (double x) |
These annotations have text that appears as part of the annotation and may be displayed in other ways by a conforming reader, such as in a Comments pane. Markup annotations may be divided into the following groups:
pdftron::PDF::Annots::Markup::Markup | ( | SDF::Obj | d = 0 |
) |
Creates a markup annotation and initializes it using given Cos/SDF object.
pdftron::PDF::Annots::Markup::Markup | ( | const Annot & | ann | ) | [inline] |
Creates a markup annotation and initializes it using given annotation object.
UString pdftron::PDF::Annots::Markup::GetTitle | ( | ) |
Returns the title of the markup annotation.
void pdftron::PDF::Annots::Markup::SetTitle | ( | const UString & | title | ) |
Sets the title of the markup annotation.
(Optional; PDF 1.1)
title | A string. |
void pdftron::PDF::Annots::Markup::SetTitle | ( | const char * | title | ) |
Sets the title of the markup annotation.
(Optional; PDF 1.1)
title | A string. |
Popup pdftron::PDF::Annots::Markup::GetPopup | ( | ) | const |
void pdftron::PDF::Annots::Markup::SetPopup | ( | const Popup & | bs | ) |
double pdftron::PDF::Annots::Markup::GetOpacity | ( | ) | const |
This corresponds to the 'CA' field of the annotation's dictionary.
void pdftron::PDF::Annots::Markup::SetOpacity | ( | double | op | ) |
Sets the opacity value for the annotation.
(Optional; PDF 1.4 )
op | A number indicating the Markup annotation's opacity value. Default value: 1.0. |
This corresponds to the 'CA' field of the annotation's dictionary.
UString pdftron::PDF::Annots::Markup::GetSubject | ( | ) | const |
void pdftron::PDF::Annots::Markup::SetSubject | ( | const UString & | subj | ) |
Date pdftron::PDF::Annots::Markup::GetCreationDates | ( | ) | const |
void pdftron::PDF::Annots::Markup::SetCreationDates | ( | const Date & | dt | ) |
BorderEffect pdftron::PDF::Annots::Markup::GetBorderEffect | ( | ) | const |
void pdftron::PDF::Annots::Markup::SetBorderEffect | ( | BorderEffect | effect = e_None |
) |
Sets the border effect of the markup annotation.
(Optional; PDF 1.5 )
Beginning with PDF 1.5, some annotations (square, circle, and polygon) may have a 'BE' entry, which is a border effect dictionary that specifies an effect that shall be applied to the border of the annotations. Beginning with PDF 1.6, the free text annotation may also have a BE entry.
effect | An entry from the enum "BorderEffect" that represents the border effect of the Markup annotation. Default value: e_None. |
double pdftron::PDF::Annots::Markup::GetBorderEffectIntensity | ( | ) | const |
effect | An entry from the enum "BorderEffect" that represents the border effect of the Markup annotation. |
void pdftron::PDF::Annots::Markup::SetBorderEffectIntensity | ( | double | intensity = 0 |
) |
Sets the border effect intensity of the markup annotation.
(Optional; valid only if Border effect is Cloudy)
Beginning with PDF 1.5, some annotations (square, circle, and polygon) may have a 'BE' entry, which is a border effect dictionary that specifies an effect that shall be applied to the border of the annotations. Beginning with PDF 1.6, the free text annotation may also have a BE entry.
effect | An entry from the enum "BorderEffect" that represents the border effect of the Markup annotation. | |
intensity | A number describing the intensity of the border effect, in the range 0 (which is default) to 2. |
ColorPt pdftron::PDF::Annots::Markup::GetInteriorColor | ( | ) | const |
Returns the interior color of the annotation.
According to PDF Reference Manual interior color is not the property that is expected for Markup annotations in general, but it applies to many derived annotations (Line,Square,Circle,Polygon,PolyLine,Redaction) and therefore get()/set() methods are provided in the base class Markup. Annotations that do not use interior color will ignore the interior color ('IC' entry), if present in their annotation dictionary. In case no color is specified, CMYK white is returned.
int pdftron::PDF::Annots::Markup::GetInteriorColorCompNum | ( | ) | const |
Returns the number indicating the interior color space of the annotation.
void pdftron::PDF::Annots::Markup::SetInteriorColor | ( | const ColorPt & | c, | |
int | CompNum | |||
) |
Sets the interior color of the Markup annotation.
c | A ColorPt object that denotes the color of the Markup annotation. | |
CompNum | An integer indicating the number of channels forming the color space used. It also defines the length of the array to be allocated for storing the entries of c. |
According to PDF Reference Manual interior color is not the property that is expected for Markup annotations in general, but it applies to many derived annotation classes and therefore get()/set() methods are provided in the base class Markup. Annotations that do not use interior color will ignore the interior color ('IC' entry), if present in their annotation dictionary.
Rect pdftron::PDF::Annots::Markup::GetContentRect | ( | ) | const |
Returns the inner bounding rectangle of the Markup annotation.
According to PDF Reference Manual content rectangle is not the property that is expected for Markup annotations in general, but it applies to many derived annotation classes (FreeText,Square,Circle,Caret) and therefore get()/set() methods are provided in the base class Markup. Annotations that do not use this property will ignore the content rectangle ('RD' entry), if present in their annotation dictionary.
void pdftron::PDF::Annots::Markup::SetContentRect | ( | const Rect & | cr | ) |
Sets the inner bounding rectangle of the Markup annotation.
(Optional)
cr | A Rect struct to be assign to the 'RD' entry of the annotation dictionary. |
According to PDF Reference Manual content rectangle is not the property that is expected for Markup annotations in general, but it applies to many derived annotation classes (FreeText,Square,Circle,Caret) and therefore get()/set() methods are provided in the base class Markup. Annotations that do not use this property will ignore the content rectangle ('RD' entry), if present in their annotation dictionary.
Rect pdftron::PDF::Annots::Markup::GetPadding | ( | ) | const |
Returns the rectangle difference between overall annotation rectangle and content rectangle.
GetPadding() and GetContentRectangle() both use 'RD' entry of the annotation dictionary, but represent it to user in different ways.
void pdftron::PDF::Annots::Markup::SetPadding | ( | const Rect & | rd | ) |
Sets the rectangle difference between overall annotation rectangle and content rectangle.
(Optional)
rd | A set of four numbers represented as a Rect struct |
SetPadding() and SetContentRectangle() both use 'RD' entry of the annotation dictionary. Two methods are provided to give users additional flexibility and ease of use in setting the values of the 'RD' field.
void pdftron::PDF::Annots::Markup::SetPadding | ( | double | x | ) |