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-2023 by Apryse Software 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  static FreeText CreateAnnot(SDF::SDFDoc& doc, const Rect& pos);
53 
64 
74  void SetDefaultAppearance(const char* app_str);
75 
86  int GetQuaddingFormat() const;
87 
100  void SetQuaddingFormat(const int format);
101 
115  Point GetCalloutLinePoint1() const;
116  Point GetCalloutLinePoint2() const;
117  Point GetCalloutLinePoint3() const;
118 
119 #ifndef SWIG
120 
133  void GetCalloutLinePoints(Point& p1, Point& p2, Point& p3) const;
134 #endif
135 
145  void SetCalloutLinePoints(const Point& p1, const Point& p2, const Point& p3);
146 
155  void SetCalloutLinePoints(const Point& p1, const Point& p2);
156 
157 
162  {
167  };
168 
176  IntentName GetIntentName() const;
177 
186 
198 
211  void SetEndingStyle( Line::EndingStyle style);
212 
224  void SetEndingStyle(const char* est);
225 
238  void SetTextColor( const ColorPt& color, int col_comp );
239 
248 
249  int GetTextColorCompNum();
250 
251 #ifndef SWIG
252 
263  void GetTextColor( ColorPt& color, int& col_comp );
264 #endif
265 
278  void SetLineColor( const ColorPt& color, int col_comp );
279 
292  int GetLineColorCompNum();
293 
294 #ifndef SWIG
295 
306  void GetLineColor( ColorPt& color, int& col_comp );
307 #endif
308 
313  void SetFontName(const char* fontName);
314 
323  void SetFontSize(double font_size);
324 
333  double GetFontSize();
334 
335  // @cond PRIVATE_DOC
336  #ifndef SWIGHIDDEN
337  FreeText(TRN_Annot freetext);
338  #endif
339  // @endcond
340 
341 };//class FreeText
342 
343  } //namespace Annot
344  } //namespace PDF
345 } //namespace pdftron
346 
347 #ifdef SWIG
348 #undef Line
349 #endif
350 
351 #include <Impl/Page.inl>
352 
353 #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:164
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
void SetFontName(const char *fontName)
The annotation intended to function as a plain FreeText annotation.
Definition: FreeText.h:163
IntentName GetIntentName() const
void SetFontSize(double font_size)
static FreeText CreateAnnot(SDF::SDFDoc &doc, const Rect &pos)
Point GetCalloutLinePoint2() const
UString GetDefaultAppearance() const
User defined or Invalid.
Definition: FreeText.h:166
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:165