00001
00002
00003
00004
00005
00006 #ifndef H_PDFTRON_PDF_CPPWRAP_Line
00007 #define H_PDFTRON_PDF_CPPWRAP_Line
00008
00009 #include <PDF/Annots/Markup.h>
00010 #include <PDF/QuadPoint.h>
00011
00012 #ifdef SWIG
00013 #define Line LineAnnot
00014 #endif
00015
00016 namespace pdftron {
00017 namespace PDF {
00018 namespace Annots {
00024 class Line : public Markup
00025 {
00026 public:
00032 Line(SDF::Obj d=0);
00033
00039 Line(const Annot& ann) : Markup(ann.GetSDFObj()) {}
00040
00041
00050 static Line Create(SDF::SDFDoc& doc, const Rect& pos);
00051
00052
00058 Point GetStartPoint() const;
00059
00065 void SetStartPoint(const Point& sp);
00066
00072 Point GetEndPoint () const;
00073
00079 void SetEndPoint(const Point& ep);
00080
00085 enum EndingStyle
00086 {
00087 e_Square,
00088 e_Circle,
00089 e_Diamond,
00090 e_OpenArrow,
00091 e_ClosedArrow,
00092 e_Butt,
00093 e_ROpenArrow,
00094 e_RClosedArrow,
00095 e_Slash,
00096 e_None,
00097 e_Unknown
00098 };
00099
00106 EndingStyle GetStartStyle() const;
00107
00108
00116 void SetStartStyle(EndingStyle sst);
00117
00118
00125 EndingStyle GetEndStyle() const;
00126
00127
00135 void SetEndStyle(EndingStyle est);
00136
00137
00138
00151 double GetLeaderLineLength() const;
00152
00166 void SetLeaderLineLength(const double& ll);
00167
00177 double GetLeaderLineExtensionLength() const;
00178
00189 void SetLeaderLineExtensionLength(const double& ll);
00190
00200 bool GetShowCaption() const;
00201
00211 void SetShowCaption(bool showCaption);
00212
00218 enum IntentType
00219 {
00220 e_LineArrow,
00221 e_LineDimension,
00222 e_null
00223 };
00224
00233 IntentType GetIntentType() const;
00234
00244 void SetIntentType(IntentType style);
00245
00254 double GetLeaderLineOffset() const;
00255
00265 void SetLeaderLineOffset(double ll);
00266
00272 enum CapPos
00273 {
00274 e_Inline,
00275 e_Top
00276 };
00277
00286 CapPos GetCaptionPosition() const;
00287
00297 void SetCaptionPosition(const CapPos& style);
00298
00308 double GetTextHOffset() const;
00309
00319 void SetTextHOffset(double offset);
00320
00329 double GetTextVOffset() const;
00330
00340 void SetTextVOffset(double offset);
00341
00343 #ifndef SWIGHIDDEN
00344 Line(TRN_Annot line);
00345 #endif
00347
00348 };
00349 };
00350 };
00351 };
00352
00353 #ifdef SWIG
00354 #undef Line
00355 #endif
00356
00357 #include <Impl/Page.inl>
00358 #endif