All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PolyLine.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_CPPPDFAnnotsPolyLine
6 #define PDFTRON_H_CPPPDFAnnotsPolyLine
7 
8 #include <PDF/Annots/Line.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 {
25 class PolyLine : public Line
26 {
27  public:
34  PolyLine(SDF::Obj d = 0);
35 
42  PolyLine(const Annot& ann) : Line(ann.GetSDFObj()) {}
43 
52  static PolyLine Create(SDF::SDFDoc& doc, const Rect& pos);
53 
61  int GetVertexCount() const;
62 
72  Point GetVertex(int idx) const;
73 
83  void SetVertex(int idx, const Point& pt);
84 
85 
91  {
96  };
97 
104  IntentType GetIntentName() const;
105 
113  void SetIntentName(IntentType mode);
114 
115 
116 #ifndef SWIGHIDDEN
117 PolyLine(TRN_Annot polyline);
118 #endif
119 
120 };//class PolyLine
121 
122 
123 
124 
125 class Polygon : public PolyLine
126 {
127  public:
134  Polygon(SDF::Obj d = 0);
135 
142  Polygon(const Annot& ann) : PolyLine(ann.GetSDFObj()) {}
143 
152  static Polygon Create(SDF::SDFDoc& doc, const Rect& pos);
153 
154 
155 #ifndef SWIGHIDDEN
156 Polygon(TRN_Annot polyline);
157 #endif
158 
159 };//class Polygon
160 
161 
162 
163 
164  };//namespace Annot
165  };//namespace PDF
166 };//namespace pdftron
167 
168 #ifdef SWIG
169 #undef Line
170 #endif
171 
172 #include <Impl/Page.inl>
173 
174 #endif // PDFTRON_H_CPPPDFAnnotsPolyLine
SDF::Obj GetSDFObj() const
Non-standard intent type.
Definition: PolyLine.h:95
Polygon(const Annot &ann)
Definition: PolyLine.h:142
Point GetVertex(int idx) const
The annotation is intended to function as a cloud object.
Definition: PolyLine.h:92
IntentType GetIntentName() const
The polyline annotation is intended to function as a dimension. (PDF 1.7)
Definition: PolyLine.h:93
static PolyLine Create(SDF::SDFDoc &doc, const Rect &pos)
void SetIntentName(IntentType mode)
void SetVertex(int idx, const Point &pt)
PolyLine(const Annot &ann)
Definition: PolyLine.h:42
The polygon annotation is intended to function as a dimension. (PDF 1.7)
Definition: PolyLine.h:94
static Polygon Create(SDF::SDFDoc &doc, const Rect &pos)