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
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
91 enum IntentType
92 {
93 e_PolygonCloud,
94 e_PolyLineDimension,
95 e_PolygonDimension,
96 e_Unknown
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
Line.h
QuadPoint.h
pdftron::PDF::Annot
Definition Annot.h:34
pdftron::PDF::Annot::Annot
Annot(SDF::Obj d=0)
pdftron::PDF::Annot::GetSDFObj
SDF::Obj GetSDFObj() const
pdftron::PDF::Annots::Line::Line
Line(SDF::Obj d=0)
pdftron::PDF::Annots::PolyLine::SetVertex
void SetVertex(int idx, const Point &pt)
pdftron::PDF::Annots::PolyLine::PolyLine
PolyLine(TRN_Annot polyline)
pdftron::PDF::Annots::PolyLine::Create
static PolyLine Create(SDF::SDFDoc &doc, const Rect &pos)
pdftron::PDF::Annots::PolyLine::PolyLine
PolyLine(const Annot &ann)
Definition PolyLine.h:42
pdftron::PDF::Annots::PolyLine::PolyLine
PolyLine(SDF::Obj d=0)
pdftron::PDF::Annots::PolyLine::SetIntentName
void SetIntentName(IntentType mode)
pdftron::PDF::Annots::PolyLine::GetVertexCount
int GetVertexCount() const
pdftron::PDF::Annots::PolyLine::GetVertex
Point GetVertex(int idx) const
pdftron::PDF::Annots::PolyLine::CreateAnnot
static PolyLine CreateAnnot(SDF::SDFDoc &doc, const Rect &pos)
pdftron::PDF::Annots::PolyLine::IntentType
IntentType
Definition PolyLine.h:92
pdftron::PDF::Annots::PolyLine::e_PolygonCloud
@ e_PolygonCloud
The annotation is intended to function as a cloud object.
Definition PolyLine.h:93
pdftron::PDF::Annots::PolyLine::e_PolyLineDimension
@ e_PolyLineDimension
The polyline annotation is intended to function as a dimension. (PDF 1.7)
Definition PolyLine.h:94
pdftron::PDF::Annots::PolyLine::e_PolygonDimension
@ e_PolygonDimension
The polygon annotation is intended to function as a dimension. (PDF 1.7)
Definition PolyLine.h:95
pdftron::PDF::Annots::PolyLine::e_Unknown
@ e_Unknown
Non-standard intent type.
Definition PolyLine.h:96
pdftron::PDF::Annots::PolyLine::GetIntentName
IntentType GetIntentName() const
pdftron::PDF::Annots::Polygon::Polygon
Polygon(SDF::Obj d=0)
pdftron::PDF::Annots::Polygon::Create
static Polygon Create(SDF::SDFDoc &doc, const Rect &pos)
pdftron::PDF::Annots::Polygon::Polygon
Polygon(const Annot &ann)
Definition PolyLine.h:143
pdftron::PDF::Annots::Polygon::Polygon
Polygon(TRN_Annot polyline)
pdftron::PDF::Annots::Polygon::CreateAnnot
static Polygon CreateAnnot(SDF::SDFDoc &doc, const Rect &pos)
pdftron::PDF::Point
Definition Point.h:13
pdftron::PDF::Rect
Definition Rect.h:29
pdftron::SDF::Obj
Definition Obj.h:41
pdftron::SDF::SDFDoc
Definition SDFDoc.h:68
pdftron::PDF::Annots
Definition Caret.h:12
pdftron::PDF
Definition Action.h:15
pdftron
Definition BasicTypes.h:10