Loading...
Searching...
No Matches
FreeText.h
Go to the documentation of this file.
1//---------------------------------------------------------------------------------------
2// Copyright (c) 2001-2025 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
15namespace pdftron {
16 namespace PDF {
17 namespace Annots {
24class FreeText : public Markup
25{
26 public:
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
118
119#ifndef SWIG
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
168
177
186
198
212
224 void SetEndingStyle(const char* est);
225
238 void SetTextColor( const ColorPt& color, int col_comp );
239
247
249
250#ifndef SWIG
261 void GetTextColor( ColorPt& color, int& col_comp );
262#endif
263
276 void SetLineColor( const ColorPt& color, int col_comp );
277
287
288#ifndef SWIG
296 void GetLineColor( ColorPt& color, int& col_comp );
297#endif
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
Annot(SDF::Obj d=0)
SDF::Obj GetSDFObj() const
IntentName GetIntentName() const
void SetEndingStyle(Line::EndingStyle style)
Line::EndingStyle GetEndingStyle() const
void SetIntentName(IntentName mode=e_FreeText)
FreeText(const Annot &ann)
Definition FreeText.h:41
void GetLineColor(ColorPt &color, int &col_comp)
void SetLineColor(const ColorPt &color, int col_comp)
void SetQuaddingFormat(const int format)
void SetFontSize(double font_size)
void SetFontName(const char *fontName)
UString GetDefaultAppearance() const
void SetDefaultAppearance(const char *app_str)
static FreeText CreateAnnot(SDF::SDFDoc &doc, const Rect &pos)
void SetEndingStyle(const char *est)
void GetCalloutLinePoints(Point &p1, Point &p2, Point &p3) const
void GetTextColor(ColorPt &color, int &col_comp)
void SetCalloutLinePoints(const Point &p1, const Point &p2)
void SetCalloutLinePoints(const Point &p1, const Point &p2, const Point &p3)
void SetTextColor(const ColorPt &color, int col_comp)
@ e_FreeTextCallout
The annotation is intended to function as a callout.
Definition FreeText.h:164
@ e_FreeText
The annotation intended to function as a plain FreeText annotation.
Definition FreeText.h:163
@ e_FreeTextTypeWriter
The annotation is intended to function as a click-to-type or typewriter object and no callout line is...
Definition FreeText.h:165
@ e_Unknown
User defined or Invalid.
Definition FreeText.h:166
static FreeText Create(SDF::SDFDoc &doc, const Rect &pos)