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-2020 by PDFTron Systems 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 
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 
86  {
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 
219  {
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  {
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
SDF::Obj GetSDFObj() const
void SetEndStyle(EndingStyle est)
double GetLeaderLineOffset() const
Line(const Annot &ann)
Definition: Line.h:39
double GetTextVOffset() const
the caption shall be centered inside the line
Definition: Line.h:274
void SetStartPoint(const Point &sp)
No special line ending.
Definition: Line.h:96
A square filled with the annotation&#39;s interior color, if any.
Definition: Line.h:87
A short line at the endpoint perpendicular to the line itself.
Definition: Line.h:92
void SetCaptionPosition(const CapPos &style)
EndingStyle GetEndStyle() const
EndingStyle GetStartStyle() const
bool GetShowCaption() const
A circle filled with the annotation&#39;s interior color, if any.
Definition: Line.h:88
double GetLeaderLineLength() const
double GetLeaderLineExtensionLength() const
double GetTextHOffset() const
void SetShowCaption(bool showCaption)
void SetLeaderLineOffset(double length)
CapPos GetCaptionPosition() const
Point GetStartPoint() const
A triangular closed arrowhead in the reverse direction from ClosedArrow.
Definition: Line.h:94
Two short lines meeting in an acute angle as in the OpenArrow style and connected by a third line to ...
Definition: Line.h:91
void SetLeaderLineExtensionLength(const double &length)
void SetLeaderLineLength(const double &length)
void SetEndPoint(const Point &ep)
void SetTextVOffset(double offset)
static Line Create(SDF::SDFDoc &doc, const Rect &pos)
Two short lines meeting in an acute angle to form an open arrowhead.
Definition: Line.h:90
Point GetEndPoint() const
void SetTextHOffset(double offset)
Two short lines in the reverse direction from OpenArrow.
Definition: Line.h:93
the caption shall be on top of the line
Definition: Line.h:275
IntentType GetIntentType() const
A diamond shape filled with the annotation&#39;s interior color, if any.
Definition: Line.h:89
void SetStartStyle(EndingStyle sst)
A short line at the endpoint approximately 30 degrees clockwise from perpendicular to the line itself...
Definition: Line.h:95
Non-standard or invalid ending.
Definition: Line.h:97
void SetIntentType(IntentType it)