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-2023 by Apryse Software 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  static PolyLine CreateAnnot(SDF::SDFDoc& doc, const Rect& pos);
54 
62  int GetVertexCount() const;
63 
73  Point GetVertex(int idx) const;
74 
84  void SetVertex(int idx, const Point& pt);
85 
86 
92  {
97  };
98 
105  IntentType GetIntentName() const;
106 
114  void SetIntentName(IntentType mode);
115 
116 
117 #ifndef SWIGHIDDEN
118 PolyLine(TRN_Annot polyline);
119 #endif
120 
121 };//class PolyLine
122 
123 
124 
125 
126 class Polygon : public PolyLine
127 {
128  public:
135  Polygon(SDF::Obj d = 0);
136 
143  Polygon(const Annot& ann) : PolyLine(ann.GetSDFObj()) {}
144 
153  static Polygon Create(SDF::SDFDoc& doc, const Rect& pos);
154  static Polygon CreateAnnot(SDF::SDFDoc& doc, const Rect& pos);
155 
156 #ifndef SWIGHIDDEN
157 Polygon(TRN_Annot polyline);
158 #endif
159 
160 };//class Polygon
161 
162 
163 
164 
165  };//namespace Annot
166  };//namespace PDF
167 };//namespace pdftron
168 
169 #ifdef SWIG
170 #undef Line
171 #endif
172 
173 #include <Impl/Page.inl>
174 
175 #endif // PDFTRON_H_CPPPDFAnnotsPolyLine
SDF::Obj GetSDFObj() const
Non-standard intent type.
Definition: PolyLine.h:96
Polygon(const Annot &ann)
Definition: PolyLine.h:143
Point GetVertex(int idx) const
The annotation is intended to function as a cloud object.
Definition: PolyLine.h:93
IntentType GetIntentName() const
The polyline annotation is intended to function as a dimension. (PDF 1.7)
Definition: PolyLine.h:94
static PolyLine Create(SDF::SDFDoc &doc, const Rect &pos)
static PolyLine CreateAnnot(SDF::SDFDoc &doc, const Rect &pos)
void SetIntentName(IntentType mode)
static Polygon CreateAnnot(SDF::SDFDoc &doc, const Rect &pos)
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:95
static Polygon Create(SDF::SDFDoc &doc, const Rect &pos)