![]() |
00001 //--------------------------------------------------------------------------------------- 00002 // Copyright (c) 2001-2010 by PDFTron Systems Inc. All Rights Reserved. 00003 // Consult legal.txt regarding legal and license information. 00004 //--------------------------------------------------------------------------------------- 00005 00006 #ifndef H_PDFTRON_PDF_CPPWRAP_POLYLINE 00007 #define H_PDFTRON_PDF_CPPWRAP_POLYLINE 00008 00009 #include <PDF/Annots/Line.h> 00010 #include <PDF/QuadPoint.h> 00011 00012 namespace pdftron { 00013 namespace PDF { 00014 namespace Annots { 00022 class PolyLine : public Line 00023 { 00024 public: 00030 PolyLine(SDF::Obj d = 0); 00031 00037 PolyLine(const Annot& ann) : Line(ann.GetSDFObj()) {} 00038 00047 static PolyLine Create(SDF::SDFDoc& doc, const Rect& pos); 00048 00056 int GetVertexCount() const; 00057 00067 Point GetVertex(int idx) const; 00068 00078 void SetVertex(int idx, const Point& pt); 00079 00080 00085 enum IntentType 00086 { 00087 e_PolygonCloud, 00088 e_PolyLineDimension, 00089 e_PolygonDimension, 00090 e_Unknown 00091 }; 00092 00099 IntentType GetIntentName() const; 00100 00108 void SetIntentName(IntentType mode); 00109 00110 00112 PolyLine(TRN_Annot polyline); 00114 00115 };//class PolyLine 00116 00117 00118 00119 00120 class Polygon : public PolyLine 00121 { 00122 public: 00128 Polygon(SDF::Obj d = 0); 00129 00135 Polygon(const Annot& ann) : PolyLine(ann.GetSDFObj()) {} 00136 00145 static Polygon Create(SDF::SDFDoc& doc, const Rect& pos); 00146 00147 00149 Polygon(TRN_Annot polyline); 00151 00152 };//class Polygon 00153 00154 00155 00156 00157 };//namespace Annot 00158 };//namespace PDF 00159 };//namespace pdftron 00160 #include <Impl/Page.inl> 00161 #endif