![]() |
#include <Line.h>
Public Types | |
enum | EndingStyle { e_Square, e_Circle, e_Diamond, e_OpenArrow, e_ClosedArrow, e_Butt, e_ROpenArrow, e_RClosedArrow, e_Slash, e_None, e_Unknown } |
For each line, one can choose a separate style for the start and the end of the line. More... | |
enum | IntentType { e_LineArrow, e_LineDimension, e_null } |
This enum represents the intent of the Line annotation. More... | |
enum | CapPos { e_Inline, e_Top } |
Enumeration type describing the annotation’s caption positioning. More... | |
Public Member Functions | |
Line (SDF::Obj d=0) | |
Creates a Line annotation and initializes it using given Cos/SDF object. | |
Line (const Annot &ann) | |
Creates a Line annotation and initializes it using given annotation object. | |
Point | GetStartPoint () const |
Returns the coordinates of the start of a line. | |
void | SetStartPoint (const Point &sp) |
Sets the coordinates of the start of a line. | |
Point | GetEndPoint () const |
Returns the coordinates of the end of a line. | |
void | SetEndPoint (const Point &ep) |
Sets the coordinates of the end of a line. | |
EndingStyle | GetStartStyle () const |
Returns the ending style that applies to the first point of the line. | |
void | SetStartStyle (EndingStyle sst) |
Sets the ending style that applies to the first point of the line. | |
EndingStyle | GetEndStyle () const |
Returns the ending style that applies to the second point of the line. | |
void | SetEndStyle (EndingStyle est) |
Sets the ending style that applies to the second point of the line. | |
double | GetLeaderLineLength () const |
Returns the leader line length of a line. | |
void | SetLeaderLineLength (const double &ll) |
Sets the leader line length of a line. | |
double | GetLeaderLineExtensionLength () const |
Returns the leader line extension length of a line. | |
void | SetLeaderLineExtensionLength (const double &ll) |
Sets the leader line extension length of a line. | |
bool | GetShowCaption () const |
Returns true if caption is to be shown, otherwise false. | |
void | SetShowCaption (bool showCaption) |
Sets the option of whether to show caption. | |
IntentType | GetIntentType () const |
Returns the intent type of the line. | |
void | SetIntentType (IntentType style) |
Sets the intent type of the line. | |
double | GetLeaderLineOffset () const |
Returns the leader line offset length of a line. | |
void | SetLeaderLineOffset (double ll) |
Sets the leader line offset length of a line. | |
CapPos | GetCaptionPosition () const |
Returns the caption position of a line. | |
void | SetCaptionPosition (const CapPos &style) |
Sets the caption position of a line. | |
double | GetTextHOffset () const |
Returns the horizontal offset of the caption. | |
void | SetTextHOffset (double offset) |
Sets the horizontal offset of the caption. | |
double | GetTextVOffset () const |
Returns the vertical offset of the caption. | |
void | SetTextVOffset (double offset) |
Sets the vertical offset of the caption. | |
Static Public Member Functions | |
static Line | Create (SDF::SDFDoc &doc, const Rect &pos) |
Creates a new Line annotation in the specified document. |
When opened, it should display a pop-up window containing the text of the associated note.
For each line, one can choose a separate style for the start and the end of the line.
The styles are defined by the "EndingStyle" enumeration.
This enum represents the intent of the Line annotation.
For each line, one can specify the purpose of the line by choosing its intent defined by the "IntentType" enum.
Reimplemented in pdftron::PDF::Annots::PolyLine.
Enumeration type describing the annotation’s caption positioning.
Valid values are e_Inline, meaning the caption shall be centered inside the line, and e_Top, meaning the caption shall be on top of the line.
pdftron::PDF::Annots::Line::Line | ( | SDF::Obj | d = 0 |
) |
Creates a Line annotation and initializes it using given Cos/SDF object.
pdftron::PDF::Annots::Line::Line | ( | const Annot & | ann | ) | [inline] |
Creates a Line annotation and initializes it using given annotation object.
static Line pdftron::PDF::Annots::Line::Create | ( | SDF::SDFDoc & | doc, | |
const Rect & | pos | |||
) | [static] |
Creates a new Line annotation in the specified document.
doc | A document to which the annotation is added. | |
pos | A rectangle specifying the annotation's bounds in default user space units. |
Reimplemented in pdftron::PDF::Annots::PolyLine, and pdftron::PDF::Annots::Polygon.
Point pdftron::PDF::Annots::Line::GetStartPoint | ( | ) | const |
Returns the coordinates of the start of a line.
void pdftron::PDF::Annots::Line::SetStartPoint | ( | const Point & | sp | ) |
Sets the coordinates of the start of a line.
sp | A point specifying the coordinates of the end of the line. |
Point pdftron::PDF::Annots::Line::GetEndPoint | ( | ) | const |
Returns the coordinates of the end of a line.
void pdftron::PDF::Annots::Line::SetEndPoint | ( | const Point & | ep | ) |
Sets the coordinates of the end of a line.
ep | - A point specifying the coordinates of the end of the line. |
EndingStyle pdftron::PDF::Annots::Line::GetStartStyle | ( | ) | const |
Returns the ending style that applies to the first point of the line.
void pdftron::PDF::Annots::Line::SetStartStyle | ( | EndingStyle | sst | ) |
Sets the ending style that applies to the first point of the line.
(Optional; PDF 1.4.)
sst | A enum value from the "EndingStyle". |
EndingStyle pdftron::PDF::Annots::Line::GetEndStyle | ( | ) | const |
Returns the ending style that applies to the second point of the line.
void pdftron::PDF::Annots::Line::SetEndStyle | ( | EndingStyle | est | ) |
Sets the ending style that applies to the second point of the line.
(Optional; PDF 1.4)
est | A enum value from the "EndingStyle". |
double pdftron::PDF::Annots::Line::GetLeaderLineLength | ( | ) | const |
Returns the leader line length of a line.
Leader length is length of leader lines in default user space that extend from each endpoint of the line perpendicular to the line itself. A positive value shall mean that the leader lines appear in the direction that is clockwise when traversing the line from its starting point to its ending point (as specified by L); a negative value shall indicate the opposite direction. Default value: 0 (no leader lines)
void pdftron::PDF::Annots::Line::SetLeaderLineLength | ( | const double & | ll | ) |
Sets the leader line length of a line.
(PDF 1.6)
A | number denoting the length of the leader line in default user space units. |
Leader length is length of leader lines in default user space that extend from each endpoint of the line perpendicular to the line itself. A positive value shall mean that the leader lines appear in the direction that is clockwise when traversing the line from its starting point to its ending point (as specified by L); a negative value shall indicate the opposite direction. Default value: 0 (no leader lines)
double pdftron::PDF::Annots::Line::GetLeaderLineExtensionLength | ( | ) | const |
Returns the leader line extension length of a line.
void pdftron::PDF::Annots::Line::SetLeaderLineExtensionLength | ( | const double & | ll | ) |
Sets the leader line extension length of a line.
(PDF 1.6)
A | number denoting the length of the leader line extension in default user space units. |
bool pdftron::PDF::Annots::Line::GetShowCaption | ( | ) | const |
Returns true if caption is to be shown, otherwise false.
void pdftron::PDF::Annots::Line::SetShowCaption | ( | bool | showCaption | ) |
Sets the option of whether to show caption.
showCaption | A boolean value indicating whether the caption will be shown. |
IntentType pdftron::PDF::Annots::Line::GetIntentType | ( | ) | const |
Returns the intent type of the line.
void pdftron::PDF::Annots::Line::SetIntentType | ( | IntentType | style | ) |
Sets the intent type of the line.
(For PDF 1.6)
style | An intent type value from the "IntentType" enum. |
double pdftron::PDF::Annots::Line::GetLeaderLineOffset | ( | ) | const |
Returns the leader line offset length of a line.
void pdftron::PDF::Annots::Line::SetLeaderLineOffset | ( | double | ll | ) |
Sets the leader line offset length of a line.
(PDF 1.7)
ll | A number denoting the length of the leader line offset in default user space units. |
CapPos pdftron::PDF::Annots::Line::GetCaptionPosition | ( | ) | const |
Returns the caption position of a line.
void pdftron::PDF::Annots::Line::SetCaptionPosition | ( | const CapPos & | style | ) |
double pdftron::PDF::Annots::Line::GetTextHOffset | ( | ) | const |
Returns the horizontal offset of the caption.
void pdftron::PDF::Annots::Line::SetTextHOffset | ( | double | offset | ) |
Sets the horizontal offset of the caption.
(For PDF 1.7 )
offset | A number denoting the horizontal offset of the caption in default user space units. |
double pdftron::PDF::Annots::Line::GetTextVOffset | ( | ) | const |
Returns the vertical offset of the caption.
void pdftron::PDF::Annots::Line::SetTextVOffset | ( | double | offset | ) |
Sets the vertical offset of the caption.
(For PDF 1.7 )
offset | A number denoting the vertical offset of the caption in default user space units. |