- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

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-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
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
63 UString GetDefaultAppearance() const;
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
161 enum IntentName
162 {
163 e_FreeText,
164 e_FreeTextCallout,
165 e_FreeTextTypeWriter,
166 e_Unknown
167 };
168
176 IntentName GetIntentName() const;
177
185 void SetIntentName(IntentName mode=e_FreeText);
186
197 Line::EndingStyle GetEndingStyle() const;
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
246 ColorPt GetTextColor();
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
285 ColorPt GetLineColor();
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
pdftron::PDF::Annot::GetSDFObj
SDF::Obj GetSDFObj() const
pdftron::PDF::Annots::FreeText::SetDefaultAppearance
void SetDefaultAppearance(const char *app_str)
pdftron::PDF::ColorPt
Definition: ColorSpace.h:20
pdftron::PDF::Annots::FreeText::GetTextColorCompNum
int GetTextColorCompNum()
pdftron::PDF::Annots::FreeText::GetLineColor
ColorPt GetLineColor()
pdftron::PDF::Annots::FreeText::SetTextColor
void SetTextColor(const ColorPt &color, int col_comp)
pdftron::PDF::Annots::FreeText
Definition: FreeText.h:24
pdftron::PDF::Annots::FreeText::Create
static FreeText Create(SDF::SDFDoc &doc, const Rect &pos)
pdftron::PDF::Rect
Definition: Rect.h:28
pdftron::PDF::Point
Definition: Point.h:12
pdftron::PDF::Annots::FreeText::FreeText
FreeText(const Annot &ann)
Definition: FreeText.h:41
pdftron::PDF::Annots::FreeText::GetEndingStyle
Line::EndingStyle GetEndingStyle() const
pdftron::PDF::Annots::FreeText::SetIntentName
void SetIntentName(IntentName mode=e_FreeText)
pdftron::PDF::Annots::FreeText::FreeText
FreeText(SDF::Obj d=0)
pdftron::PDF::Annots::FreeText::e_FreeTextCallout
The annotation is intended to function as a callout.
Definition: FreeText.h:164
Line.h
pdftron::PDF::Annots::FreeText::GetFontSize
double GetFontSize()
pdftron::SDF::SDFDoc
Definition: SDFDoc.h:67
pdftron::PDF::Annots::FreeText::GetCalloutLinePoint3
Point GetCalloutLinePoint3() const
pdftron::PDF::Annots::FreeText::SetQuaddingFormat
void SetQuaddingFormat(const int format)
pdftron::PDF::Annots::FreeText::GetCalloutLinePoints
void GetCalloutLinePoints(Point &p1, Point &p2, Point &p3) const
pdftron::PDF::Annots::FreeText::SetCalloutLinePoints
void SetCalloutLinePoints(const Point &p1, const Point &p2, const Point &p3)
pdftron::PDF::Annots::FreeText::GetCalloutLinePoint1
Point GetCalloutLinePoint1() const
pdftron::PDF::Annots::Line::EndingStyle
EndingStyle
Definition: Line.h:85
pdftron::PDF::Annots::FreeText::IntentName
IntentName
Definition: FreeText.h:161
pdftron::PDF::Annots::FreeText::GetQuaddingFormat
int GetQuaddingFormat() const
pdftron::PDF::Annots::FreeText::SetFontName
void SetFontName(const char *fontName)
pdftron::PDF::Annots::FreeText::GetTextColor
ColorPt GetTextColor()
pdftron::PDF::Annots::FreeText::GetLineColorCompNum
int GetLineColorCompNum()
QuadPoint.h
pdftron::PDF::Annots::FreeText::e_FreeText
The annotation intended to function as a plain FreeText annotation.
Definition: FreeText.h:163
pdftron::PDF::Annots::FreeText::GetIntentName
IntentName GetIntentName() const
pdftron::PDF::Annot
Definition: Annot.h:33
pdftron::PDF::Annots::FreeText::SetFontSize
void SetFontSize(double font_size)
pdftron::PDF::Annots::FreeText::CreateAnnot
static FreeText CreateAnnot(SDF::SDFDoc &doc, const Rect &pos)
pdftron::PDF::Annots::FreeText::GetCalloutLinePoint2
Point GetCalloutLinePoint2() const
pdftron::PDF::Annots::FreeText::GetDefaultAppearance
UString GetDefaultAppearance() const
pdftron::SDF::Obj
Definition: Obj.h:40
pdftron::PDF::Annots::Markup
Definition: Markup.h:43
pdftron::PDF::Annots::FreeText::e_Unknown
User defined or Invalid.
Definition: FreeText.h:166
pdftron::PDF::Annots::FreeText::SetLineColor
void SetLineColor(const ColorPt &color, int col_comp)
pdftron::UString
Definition: UString.h:27
pdftron::PDF::Annots::FreeText::SetEndingStyle
void SetEndingStyle(Line::EndingStyle style)
pdftron::PDF::Annots::FreeText::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