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
00013 namespace pdftron {
00014 namespace PDF {
00015 namespace Annots {
00021 class Line : public Markup
00022 {
00023 public:
00029 Line(SDF::Obj d=0);
00030
00036 Line(const Annot& ann) : Markup(ann.GetSDFObj()) {}
00037
00038
00047 static Line Create(SDF::SDFDoc& doc, const Rect& pos);
00048
00049
00055 Point GetStartPoint() const;
00056
00062 void SetStartPoint(const Point& sp);
00063
00069 Point GetEndPoint () const;
00070
00076 void SetEndPoint(const Point& ep);
00077
00082 enum EndingStyle
00083 {
00084 e_Square,
00085 e_Circle,
00086 e_Diamond,
00087 e_OpenArrow,
00088 e_ClosedArrow,
00089 e_Butt,
00090 e_ROpenArrow,
00091 e_RClosedArrow,
00092 e_Slash,
00093 e_None,
00094 e_Unknown
00095 };
00096
00103 EndingStyle GetStartStyle() const;
00104
00105
00113 void SetStartStyle(EndingStyle sst);
00114
00115
00122 EndingStyle GetEndStyle() const;
00123
00124
00132 void SetEndStyle(EndingStyle est);
00133
00134
00135
00148 double GetLeaderLineLength() const;
00149
00163 void SetLeaderLineLength(const double& ll);
00164
00174 double GetLeaderLineExtensionLength() const;
00175
00186 void SetLeaderLineExtensionLength(const double& ll);
00187
00197 bool GetShowCaption() const;
00198
00208 void SetShowCaption(bool showCaption);
00209
00215 enum IntentType
00216 {
00217 e_LineArrow,
00218 e_LineDimension,
00219 e_null
00220 };
00221
00230 IntentType GetIntentType() const;
00231
00241 void SetIntentType(IntentType style);
00242
00251 double GetLeaderLineOffset() const;
00252
00262 void SetLeaderLineOffset(double ll);
00263
00269 enum CapPos
00270 {
00271 e_Inline,
00272 e_Top
00273 };
00274
00283 CapPos GetCaptionPosition() const;
00284
00294 void SetCaptionPosition(const CapPos& style);
00295
00305 double GetTextHOffset() const;
00306
00316 void SetTextHOffset(double offset);
00317
00326 double GetTextVOffset() const;
00327
00337 void SetTextVOffset(double offset);
00338
00340 Line(TRN_Annot line);
00342
00343 };
00344 };
00345 };
00346 };
00347 #include <Impl/Page.inl>
00348 #endif