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-2020 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 
114  Point GetCalloutLinePoint1() const;
115  Point GetCalloutLinePoint2() const;
116  Point GetCalloutLinePoint3() const;
117 
118 #ifndef SWIG
119 
132  void GetCalloutLinePoints(Point& p1, Point& p2, Point& p3) const;
133 #endif
134 
144  void SetCalloutLinePoints(const Point& p1, const Point& p2, const Point& p3);
145 
154  void SetCalloutLinePoints(const Point& p1, const Point& p2);
155 
156 
161  {
166  };
167 
175  IntentName GetIntentName() const;
176 
185 
197 
210  void SetEndingStyle( Line::EndingStyle style);
211 
223  void SetEndingStyle(const char* est);
224 
237  void SetTextColor( const ColorPt& color, int col_comp );
238 
247 
248  int GetTextColorCompNum();
249 
250 #ifndef SWIG
251 
262  void GetTextColor( ColorPt& color, int& col_comp );
263 #endif
264 
277  void SetLineColor( const ColorPt& color, int col_comp );
278 
291  int GetLineColorCompNum();
292 
293 #ifndef SWIG
294 
305  void GetLineColor( ColorPt& color, int& col_comp );
306 #endif
307 
315  void SetFontSize( double font_size );
316 
325  double GetFontSize();
326 
327  // @cond PRIVATE_DOC
328  #ifndef SWIGHIDDEN
329  FreeText(TRN_Annot freetext);
330  #endif
331  // @endcond
332 
333 };//class FreeText
334 
335  } //namespace Annot
336  } //namespace PDF
337 } //namespace pdftron
338 
339 #ifdef SWIG
340 #undef Line
341 #endif
342 
343 #include <Impl/Page.inl>
344 
345 #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:163
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:162
IntentName GetIntentName() const
void SetFontSize(double font_size)
Point GetCalloutLinePoint2() const
UString GetDefaultAppearance() const
User defined or Invalid.
Definition: FreeText.h:165
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:164