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-2024 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 
247 
248  int GetTextColorCompNum();
249 
250 #ifndef SWIG
251 
261  void GetTextColor( ColorPt& color, int& col_comp );
262 #endif
263 
276  void SetLineColor( const ColorPt& color, int col_comp );
277 
286  int GetLineColorCompNum();
287 
288 #ifndef SWIG
289 
296  void GetLineColor( ColorPt& color, int& col_comp );
297 #endif
298 
303  void SetFontName(const char* fontName);
304 
313  void SetFontSize(double font_size);
314 
323  double GetFontSize();
324 
325  // @cond PRIVATE_DOC
326  #ifndef SWIGHIDDEN
327  FreeText(TRN_Annot freetext);
328  #endif
329  // @endcond
330 
331 };//class FreeText
332 
333  } //namespace Annot
334  } //namespace PDF
335 } //namespace pdftron
336 
337 #ifdef SWIG
338 #undef Line
339 #endif
340 
341 #include <Impl/Page.inl>
342 
343 #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