All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FreeText.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------------------
2 // Copyright (c) 2001-2018 by PDFTron Systems Inc. All Rights Reserved.
3 // Consult legal.txt regarding legal and license information.
4 //---------------------------------------------------------------------------------------
5 #ifndef PDFTRON_H_CPPPDFAnnotsFreeText
6 #define PDFTRON_H_CPPPDFAnnotsFreeText
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 {
24 class FreeText : public Markup
25 {
26  public:
33  FreeText(SDF::Obj d = 0);
34 
41  FreeText(const Annot& ann) : Markup(ann.GetSDFObj()) {}
42 
51  static FreeText Create(SDF::SDFDoc& doc, const Rect& pos);
52 
63 
73  void SetDefaultAppearance(const char* app_str);
74 
85  int GetQuaddingFormat() const;
86 
99  void SetQuaddingFormat(const int format);
100 
101 
115  Point GetCalloutLinePoint1() const;
116  Point GetCalloutLinePoint2() const;
117  Point GetCalloutLinePoint3() const;
118 
119 #ifndef SWIG
120  void GetCalloutLinePoints(Point& p1, Point& p2, Point& p3) const;
121 #endif
122 
132  void SetCalloutLinePoints(const Point& p1, const Point& p2, const Point& p3);
133 
142  void SetCalloutLinePoints(const Point& p1, const Point& p2);
143 
144 
149  {
154  };
155 
163  IntentName GetIntentName() const;
164 
173 
174 
175 
187 
200  void SetEndingStyle( Line::EndingStyle style);
201 
213  void SetEndingStyle(const char* est);
214 
227  void SetTextColor( const ColorPt& color, int col_comp );
228 
241 
242  int GetTextColorCompNum();
243 
244 #ifndef SWIG
245  void GetTextColor( ColorPt& color, int& col_comp );
246 #endif
247 
260  void SetLineColor( const ColorPt& color, int col_comp );
261 
274  int GetLineColorCompNum();
275 
276 #ifndef SWIG
277  void GetLineColor( ColorPt& color, int& col_comp );
278 #endif
279 
287  void SetFontSize( double font_size );
288 
297  double GetFontSize();
298 
300  #ifndef SWIGHIDDEN
301  FreeText(TRN_Annot freetext);
302  #endif
303 
305 };//class FreeText
306 
307  } //namespace Annot
308  } //namespace PDF
309 } //namespace pdftron
310 
311 #ifdef SWIG
312 #undef Line
313 #endif
314 
315 #include <Impl/Page.inl>
316 
317 #endif // PDFTRON_H_CPPPDFAnnotsFreeText
SDF::Obj GetSDFObj() const
void SetDefaultAppearance(const char *app_str)
void SetTextColor(const ColorPt &color, int col_comp)
static FreeText Create(SDF::SDFDoc &doc, const Rect &pos)
FreeText(const Annot &ann)
Definition: FreeText.h:41
Line::EndingStyle GetEndingStyle() const
void SetIntentName(IntentName mode=e_FreeText)
The annotation is intended to function as a callout.
Definition: FreeText.h:151
Point GetCalloutLinePoint3() const
void SetQuaddingFormat(const int format)
void GetCalloutLinePoints(Point &p1, Point &p2, Point &p3) const
void SetCalloutLinePoints(const Point &p1, const Point &p2, const Point &p3)
Point GetCalloutLinePoint1() const
The annotation intended to function as a plain FreeText annotation.
Definition: FreeText.h:150
IntentName GetIntentName() const
void SetFontSize(double font_size)
Point GetCalloutLinePoint2() const
UString GetDefaultAppearance() const
User defined or Invalid.
Definition: FreeText.h:153
void SetLineColor(const ColorPt &color, int col_comp)
void SetEndingStyle(Line::EndingStyle style)
The annotation is intended to function as a click-to-type or typewriter object and no callout line is...
Definition: FreeText.h:152

© 2002-2014 PDFTron Systems Inc.