Loading...
Searching...
No Matches
PolyLine.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_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
15namespace pdftron {
16 namespace PDF {
17 namespace Annots {
25class PolyLine : public Line
26{
27 public:
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
98
106
115
116
117#ifndef SWIGHIDDEN
118PolyLine(TRN_Annot polyline);
119#endif
120
121};//class PolyLine
122
123
124
125
126class Polygon : public PolyLine
127{
128 public:
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
157Polygon(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
Annot(SDF::Obj d=0)
SDF::Obj GetSDFObj() const
void SetVertex(int idx, const Point &pt)
PolyLine(TRN_Annot polyline)
static PolyLine Create(SDF::SDFDoc &doc, const Rect &pos)
PolyLine(const Annot &ann)
Definition PolyLine.h:42
void SetIntentName(IntentType mode)
Point GetVertex(int idx) const
static PolyLine CreateAnnot(SDF::SDFDoc &doc, const Rect &pos)
@ e_PolygonCloud
The annotation is intended to function as a cloud object.
Definition PolyLine.h:93
@ e_PolyLineDimension
The polyline annotation is intended to function as a dimension. (PDF 1.7)
Definition PolyLine.h:94
@ e_PolygonDimension
The polygon annotation is intended to function as a dimension. (PDF 1.7)
Definition PolyLine.h:95
@ e_Unknown
Non-standard intent type.
Definition PolyLine.h:96
IntentType GetIntentName() const
static Polygon Create(SDF::SDFDoc &doc, const Rect &pos)
Polygon(const Annot &ann)
Definition PolyLine.h:143
Polygon(TRN_Annot polyline)
static Polygon CreateAnnot(SDF::SDFDoc &doc, const Rect &pos)