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
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
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
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
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
Line.h
QuadPoint.h
pdftron::PDF::Annot::Annot
Annot(SDF::Obj d=0)
pdftron::PDF::Annot::GetSDFObj
SDF::Obj GetSDFObj() const
pdftron::PDF::Annots::FreeText::GetIntentName
IntentName GetIntentName() const
pdftron::PDF::Annots::FreeText::SetEndingStyle
void SetEndingStyle(Line::EndingStyle style)
pdftron::PDF::Annots::FreeText::GetEndingStyle
Line::EndingStyle GetEndingStyle() const
pdftron::PDF::Annots::FreeText::GetLineColor
ColorPt GetLineColor()
pdftron::PDF::Annots::FreeText::GetQuaddingFormat
int GetQuaddingFormat() const
pdftron::PDF::Annots::FreeText::SetIntentName
void SetIntentName(IntentName mode=e_FreeText)
pdftron::PDF::Annots::FreeText::FreeText
FreeText(const Annot &ann)
Definition FreeText.h:41
pdftron::PDF::Annots::FreeText::GetLineColor
void GetLineColor(ColorPt &color, int &col_comp)
pdftron::PDF::Annots::FreeText::SetLineColor
void SetLineColor(const ColorPt &color, int col_comp)
pdftron::PDF::Annots::FreeText::SetQuaddingFormat
void SetQuaddingFormat(const int format)
pdftron::PDF::Annots::FreeText::GetTextColorCompNum
int GetTextColorCompNum()
pdftron::PDF::Annots::FreeText::SetFontSize
void SetFontSize(double font_size)
pdftron::PDF::Annots::FreeText::SetFontName
void SetFontName(const char *fontName)
pdftron::PDF::Annots::FreeText::GetDefaultAppearance
UString GetDefaultAppearance() const
pdftron::PDF::Annots::FreeText::SetDefaultAppearance
void SetDefaultAppearance(const char *app_str)
pdftron::PDF::Annots::FreeText::GetCalloutLinePoint3
Point GetCalloutLinePoint3() const
pdftron::PDF::Annots::FreeText::CreateAnnot
static FreeText CreateAnnot(SDF::SDFDoc &doc, const Rect &pos)
pdftron::PDF::Annots::FreeText::GetLineColorCompNum
int GetLineColorCompNum()
pdftron::PDF::Annots::FreeText::SetEndingStyle
void SetEndingStyle(const char *est)
pdftron::PDF::Annots::FreeText::GetCalloutLinePoints
void GetCalloutLinePoints(Point &p1, Point &p2, Point &p3) const
pdftron::PDF::Annots::FreeText::GetTextColor
void GetTextColor(ColorPt &color, int &col_comp)
pdftron::PDF::Annots::FreeText::GetFontSize
double GetFontSize()
pdftron::PDF::Annots::FreeText::GetCalloutLinePoint1
Point GetCalloutLinePoint1() const
pdftron::PDF::Annots::FreeText::FreeText
FreeText(SDF::Obj d=0)
pdftron::PDF::Annots::FreeText::GetCalloutLinePoint2
Point GetCalloutLinePoint2() const
pdftron::PDF::Annots::FreeText::SetCalloutLinePoints
void SetCalloutLinePoints(const Point &p1, const Point &p2)
pdftron::PDF::Annots::FreeText::SetCalloutLinePoints
void SetCalloutLinePoints(const Point &p1, const Point &p2, const Point &p3)
pdftron::PDF::Annots::FreeText::SetTextColor
void SetTextColor(const ColorPt &color, int col_comp)
pdftron::PDF::Annots::FreeText::GetTextColor
ColorPt GetTextColor()
pdftron::PDF::Annots::FreeText::IntentName
IntentName
Definition FreeText.h:162
pdftron::PDF::Annots::FreeText::e_FreeTextCallout
@ e_FreeTextCallout
The annotation is intended to function as a callout.
Definition FreeText.h:164
pdftron::PDF::Annots::FreeText::e_FreeText
@ e_FreeText
The annotation intended to function as a plain FreeText annotation.
Definition FreeText.h:163
pdftron::PDF::Annots::FreeText::e_FreeTextTypeWriter
@ 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
pdftron::PDF::Annots::FreeText::e_Unknown
@ e_Unknown
User defined or Invalid.
Definition FreeText.h:166
pdftron::PDF::Annots::FreeText::Create
static FreeText Create(SDF::SDFDoc &doc, const Rect &pos)
pdftron::PDF::Annots::Line::EndingStyle
EndingStyle
Definition Line.h:86
pdftron::PDF::Annots::Markup::Markup
Markup(SDF::Obj d=0)
pdftron::PDF::ColorPt
Definition ColorSpace.h:21
pdftron::PDF::Point
Definition Point.h:13
pdftron::PDF::Rect
Definition Rect.h:29
pdftron::SDF::Obj
Definition Obj.h:41
pdftron::SDF::SDFDoc
Definition SDFDoc.h:68
pdftron::UString
Definition UString.h:28
pdftron::PDF::Annots
Definition Caret.h:12
pdftron::PDF
Definition Action.h:15
pdftron
Definition BasicTypes.h:10