Foxit PDF SDK
fs_fillsign.h
Go to the documentation of this file.
1 
15 #ifndef FS_FILLSIGN_H_
16 #define FS_FILLSIGN_H_
17 
18 #include "common/fs_common.h"
19 #include "pdf/fs_pdfpage.h"
20 
26 namespace foxit {
30 namespace pdf {
31 class FillSignObject;
32 
36 class TextFillSignObjectData FS_FINAL : public Base {
37  public:
47  this->text_state = text_state;
48  this->text = text;
49  }
50 
53 
60  text_state = text_data.text_state;
61  text = text_data.text;
62  }
63 
72  text_state = text_data.text_state;
73  text = text_data.text;
74  return (*this);
75  }
76 
86  this->text_state = text_state;
87  this->text = text;
88  }
89 
94 };
95 
98 
99 
104 class FillSign FS_FINAL : public Base {
105  public:
111  typedef enum _FillSignObjectType {
113  e_FillSignObjectTypeText = 0,
115  e_FillSignObjectTypeCrossMark = 1,
117  e_FillSignObjectTypeCheckMark = 2,
119  e_FillSignObjectTypeRoundRectangle = 3,
121  e_FillSignObjectTypeLine = 4,
123  e_FillSignObjectTypeDot = 5,
125  e_FillSignObjectTypeSignature = 6,
127  e_FillSignObjectTypeInitialsSignature = 7
128  } FillSignObjectType;
129 
130 
136  explicit FillSign(const PDFPage& page);
137 
143  FillSign(const FillSign& other);
144 
152  FillSign& operator = (const FillSign& other);
153 
155  ~FillSign();
156 
164  bool operator == (const FillSign& other) const;
165 
173  bool operator != (const FillSign& other) const;
174 
182  bool IsEmpty() const;
183 
218  FillSignObject AddObject(FillSignObjectType type, const PointF& point, float width, float height,
220 
242  FillSignObject AddTextObject(const TextFillSignObjectDataArray& text_data, const PointF& point, float width,
243  float height, common::Rotation rotation = common::e_Rotation0, bool is_comb_field_mode = false);
244 
257  bool RemoveObject(const FillSignObject& fillsign_object);
258 
270  FillSignObject GetObjectAtPoint(const PointF& point);
271 
284  FillSignObject GetObjectAtDevicePoint(const PointF& point, const Matrix& matrix);
285 
286  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
287  explicit FillSign(FS_HANDLE handle = NULL);
288 };
289 
295 class FillSignObject : public Base {
296  public:
297  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
298  explicit FillSignObject(FS_HANDLE handle);
299 
300 #ifndef __EMSCRIPTEN_RENDER__
301 
306  FillSignObject(const FillSignObject& other);
307 #endif
308 
311 
312 #ifndef __EMSCRIPTEN_RENDER__
313 
322 #endif
323 
331  bool operator ==(const FillSignObject& other) const;
332 
340  bool operator != (const FillSignObject& other) const;
341 
349  bool IsEmpty() const;
350 
351 #ifndef __EMSCRIPTEN_RENDER__
352 
353  virtual ~FillSignObject();
354 #endif
355 
364 
392  void Move(const PointF& point, float width, float height, common::Rotation rotation = common::e_Rotation0);
393 
400  RectF GetRect() const;
401 
411  bool GenerateContent();
412 };
413 
419 class TextFillSignObject FS_FINAL : public FillSignObject {
420  public:
426  explicit TextFillSignObject(const FillSignObject& fillsign_object);
427 
428  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
429  explicit TextFillSignObject(FS_HANDLE handle);
430 
433 
436 
443 
449  bool IsCombFieldMode();
450 };
451 
458 class SignatureFillSignObject FS_FINAL: public FillSignObject {
459  public:
465  explicit SignatureFillSignObject(const FillSignObject& fillsign_object);
466 
467  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
468  explicit SignatureFillSignObject(FS_HANDLE handle);
469 
472 
475 
482  bool IsInitialsType();
483 
491  void SetBitmap(const common::Bitmap& bitmap);
492 };
493 } // namespace pdf
494 } // namespace foxit
495 #endif // FS_FILLSIGN_H_
496 
Definition: fs_image.h:36
Definition: fs_pdfgraphicsobject.h:855
TextFillSignObject()
Constructor.
Definition: fs_fillsign.h:432
TextFillSignObjectData(const TextFillSignObjectData &text_data)
Constructor, with another text fill-sign object data.
Definition: fs_fillsign.h:59
Definition: fs_fillsign.h:97
graphics::TextState text_state
Text state information.
Definition: fs_fillsign.h:91
Definition: fx_coordinates.h:30
Definition: fs_fillsign.h:295
WIDE STRING CLASS.
Definition: fx_string.h:1452
~TextFillSignObject()
Destructor.
Definition: fs_fillsign.h:435
Definition: fs_fillsign.h:458
Definition: fs_fillsign.h:36
Definition: fs_fillsign.h:104
void Move(const PointF &point, float width, float height, common::Rotation rotation=common::e_Rotation0)
Move current fill-sign object.
bool operator==(const char *str1, const CFX_ByteString &str2)
Check if two byte strings are equal.
Definition: fs_basictypes.h:128
SignatureFillSignObject()
Constructor.
Definition: fs_fillsign.h:471
FillSignObjectType
Enumeration for fill-sign object type.
Definition: fs_fillsign.h:111
void SetBitmap(const common::Bitmap &bitmap)
Set a bitmap.
TextFillSignObjectData & operator=(const TextFillSignObjectData &text_data)
Assign operator.
Definition: fs_fillsign.h:71
bool GenerateContent()
Generate content for current fill-sign object.
WString text
Text content string.
Definition: fs_fillsign.h:93
bool IsEmpty() const
Check whether current object is empty or not.
bool operator==(const FillSignObject &other) const
Equal operator.
void Set(const graphics::TextState &text_state, WString text)
Set value.
Definition: fs_fillsign.h:85
TextFillSignObjectData(const graphics::TextState &text_state, WString text)
Constructor, with parameters.
Definition: fs_fillsign.h:46
FillSignObject & operator=(const FillSignObject &other)
Assign operator.
Definition: fs_pdfpage.h:367
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:214
Header file for common definitions and classes.
FillSignObject()
Constructor.
Definition: fs_fillsign.h:310
virtual ~FillSignObject()
Destructor.
Definition: fs_basictypes.h:397
TextFillSignObjectDataArray GetTextDataArray()
Get text data array.
Definition: fs_fillsign.h:419
~SignatureFillSignObject()
Destructor.
Definition: fs_fillsign.h:474
Header file for PDF page related definitions and classes.
TextFillSignObjectData()
Constructor.
Definition: fs_fillsign.h:52
No rotation.
Definition: fs_common.h:58
bool IsInitialsType()
Check if current annotation is an initials signature fill-sign object.
Rotation
Enumeration for rotation.
Definition: fs_common.h:56
Foxit namespace.
Definition: fs_compare.h:27
bool IsCombFieldMode()
Check whether current mode is comb field mode or not.
RectF GetRect() const
Get rectangle, in PDF coordinate system.
#define NULL
The null-pointer value.
Definition: fx_system.h:767
bool operator !=(const FillSignObject &other) const
Not equal operator.
Definition: fx_coordinates.h:1076
FillSign::FillSignObjectType GetType()
Get fill-sign type.
Definition: fx_coordinates.h:771