- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Line.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------------------
2 // Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3 // Consult legal.txt regarding legal and license information.
4 //---------------------------------------------------------------------------------------
5 #ifndef PDFTRON_H_CPPPDFAnnotsLine
6 #define PDFTRON_H_CPPPDFAnnotsLine
7
8 #include <PDF/Annots/Markup.h>
9 #include <PDF/QuadPoint.h>
10
11 #ifdef SWIG
12 #define Line LineAnnot
13 #endif
14
15 namespace pdftron {
16 namespace PDF {
17 namespace Annots {
23 class Line : public Markup
24 {
25 public:
31 Line(SDF::Obj d=0);
32
39 Line(const Annot& ann) : Markup(ann.GetSDFObj()) {}
40
41
50 static Line Create(SDF::SDFDoc& doc, const Rect& pos);
51 static Line CreateAnnot(SDF::SDFDoc& doc, const Rect& pos);
52
58 Point GetStartPoint() const;
59
65 void SetStartPoint(const Point& sp);
66
72 Point GetEndPoint () const;
73
79 void SetEndPoint(const Point& ep);
80
85 enum EndingStyle
86 {
87 e_Square,
88 e_Circle,
89 e_Diamond,
90 e_OpenArrow,
91 e_ClosedArrow,
92 e_Butt,
93 e_ROpenArrow,
94 e_RClosedArrow,
95 e_Slash,
96 e_None,
97 e_Unknown
98 };
99
106 EndingStyle GetStartStyle() const;
107
108
116 void SetStartStyle(EndingStyle sst);
117
118
125 EndingStyle GetEndStyle() const;
126
127
135 void SetEndStyle(EndingStyle est);
136
137
138
151 double GetLeaderLineLength() const;
152
166 void SetLeaderLineLength(const double& length);
167
177 double GetLeaderLineExtensionLength() const;
178
189 void SetLeaderLineExtensionLength(const double& length);
190
200 bool GetShowCaption() const;
201
211 void SetShowCaption(bool showCaption);
212
218 enum IntentType
219 {
220 e_LineArrow,
221 e_LineDimension,
222 e_null
223 };
224
233 IntentType GetIntentType() const;
234
244 void SetIntentType(IntentType it);
245
254 double GetLeaderLineOffset() const;
255
265 void SetLeaderLineOffset(double length);
266
272 enum CapPos
273 {
274 e_Inline,
275 e_Top
276 };
277
286 CapPos GetCaptionPosition() const;
287
297 void SetCaptionPosition(const CapPos& style);
298
308 double GetTextHOffset() const;
309
319 void SetTextHOffset(double offset);
320
329 double GetTextVOffset() const;
330
340 void SetTextVOffset(double offset);
341
342 // @cond PRIVATE_DOC
343 #ifndef SWIGHIDDEN
344 Line(TRN_Annot line);
345 #endif
346 // @endcond
347
348 };//class Line
349 };//namespace Annot
350 };//namespace PDF
351 };//namespace pdftron
352
353 #ifdef SWIG
354 #undef Line
355 #endif
356
357 #include <Impl/Page.inl>
358
359 #endif // PDFTRON_H_CPPPDFAnnotsLine
pdftron::PDF::Annot::GetSDFObj
SDF::Obj GetSDFObj() const
pdftron::PDF::Annots::Line::SetEndStyle
void SetEndStyle(EndingStyle est)
pdftron::PDF::Annots::Line::GetLeaderLineOffset
double GetLeaderLineOffset() const
pdftron::PDF::Annots::Line::Line
Line(const Annot &ann)
Definition: Line.h:39
pdftron::PDF::Annots::Line::GetTextVOffset
double GetTextVOffset() const
pdftron::PDF::Annots::Line::e_Inline
the caption shall be centered inside the line
Definition: Line.h:274
pdftron::PDF::Annots::Line::SetStartPoint
void SetStartPoint(const Point &sp)
pdftron::PDF::Annots::Line::e_None
No special line ending.
Definition: Line.h:96
pdftron::PDF::Annots::Line::e_Square
A square filled with the annotation&#39;s interior color, if any.
Definition: Line.h:87
pdftron::PDF::Annots::Line::e_Butt
A short line at the endpoint perpendicular to the line itself.
Definition: Line.h:92
pdftron::PDF::Annots::Line::Line
Line(SDF::Obj d=0)
pdftron::PDF::Annots::Line::SetCaptionPosition
void SetCaptionPosition(const CapPos &style)
pdftron::PDF::Annots::Line::GetEndStyle
EndingStyle GetEndStyle() const
pdftron::PDF::Annots::Line::GetStartStyle
EndingStyle GetStartStyle() const
pdftron::PDF::Annots::Line::GetShowCaption
bool GetShowCaption() const
pdftron::PDF::Annots::Line::e_Circle
A circle filled with the annotation&#39;s interior color, if any.
Definition: Line.h:88
pdftron::PDF::Annots::Line::GetLeaderLineLength
double GetLeaderLineLength() const
pdftron::PDF::Annots::Line
Definition: Line.h:23
pdftron::PDF::Annots::Line::e_null
Definition: Line.h:222
pdftron::PDF::Rect
Definition: Rect.h:28
pdftron::PDF::Annots::Line::GetLeaderLineExtensionLength
double GetLeaderLineExtensionLength() const
pdftron::PDF::Point
Definition: Point.h:12
pdftron::PDF::Annots::Line::GetTextHOffset
double GetTextHOffset() const
pdftron::PDF::Annots::Line::SetShowCaption
void SetShowCaption(bool showCaption)
pdftron::PDF::Annots::Line::SetLeaderLineOffset
void SetLeaderLineOffset(double length)
pdftron::PDF::Annots::Line::GetCaptionPosition
CapPos GetCaptionPosition() const
Markup.h
pdftron::SDF::SDFDoc
Definition: SDFDoc.h:67
pdftron::PDF::Annots::Line::EndingStyle
EndingStyle
Definition: Line.h:85
pdftron::PDF::Annots::Line::GetStartPoint
Point GetStartPoint() const
pdftron::PDF::Annots::Line::IntentType
IntentType
Definition: Line.h:218
pdftron::PDF::Annots::Line::e_RClosedArrow
A triangular closed arrowhead in the reverse direction from ClosedArrow.
Definition: Line.h:94
pdftron::PDF::Annots::Line::e_ClosedArrow
Two short lines meeting in an acute angle as in the OpenArrow style and connected by a third line to ...
Definition: Line.h:91
QuadPoint.h
pdftron::PDF::Annots::Line::SetLeaderLineExtensionLength
void SetLeaderLineExtensionLength(const double &length)
pdftron::PDF::Annots::Line::SetLeaderLineLength
void SetLeaderLineLength(const double &length)
pdftron::PDF::Annots::Line::CreateAnnot
static Line CreateAnnot(SDF::SDFDoc &doc, const Rect &pos)
pdftron::PDF::Annots::Line::CapPos
CapPos
Definition: Line.h:272
pdftron::PDF::Annots::Line::SetEndPoint
void SetEndPoint(const Point &ep)
pdftron::PDF::Annots::Line::SetTextVOffset
void SetTextVOffset(double offset)
pdftron::PDF::Annots::Line::Create
static Line Create(SDF::SDFDoc &doc, const Rect &pos)
pdftron::PDF::Annots::Line::e_OpenArrow
Two short lines meeting in an acute angle to form an open arrowhead.
Definition: Line.h:90
pdftron::PDF::Annot
Definition: Annot.h:33
pdftron::PDF::Annots::Line::GetEndPoint
Point GetEndPoint() const
pdftron::PDF::Annots::Line::SetTextHOffset
void SetTextHOffset(double offset)
pdftron::PDF::Annots::Line::e_ROpenArrow
Two short lines in the reverse direction from OpenArrow.
Definition: Line.h:93
pdftron::PDF::Annots::Line::e_LineDimension
Line is a dimension.
Definition: Line.h:221
pdftron::PDF::Annots::Line::e_Top
the caption shall be on top of the line
Definition: Line.h:275
pdftron::PDF::Annots::Line::GetIntentType
IntentType GetIntentType() const
pdftron::PDF::Annots::Line::e_Diamond
A diamond shape filled with the annotation&#39;s interior color, if any.
Definition: Line.h:89
pdftron::SDF::Obj
Definition: Obj.h:40
pdftron::PDF::Annots::Markup
Definition: Markup.h:43
pdftron::PDF::Annots::Line::SetStartStyle
void SetStartStyle(EndingStyle sst)
pdftron::PDF::Annots::Line::e_LineArrow
Line is an arrow.
Definition: Line.h:220
pdftron::PDF::Annots::Line::e_Slash
A short line at the endpoint approximately 30 degrees clockwise from perpendicular to the line itself...
Definition: Line.h:95
pdftron::PDF::Annots::Line::e_Unknown
Non-standard or invalid ending.
Definition: Line.h:97
pdftron::PDF::Annots::Line::SetIntentType
void SetIntentType(IntentType it)