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 
138  explicit FillSign(const PDFPage& page);
139 
145  FillSign(const FillSign& other);
146 
154  FillSign& operator = (const FillSign& other);
155 
157  ~FillSign();
158 
166  bool operator == (const FillSign& other) const;
167 
175  bool operator != (const FillSign& other) const;
176 
184  bool IsEmpty() const;
185 
220  FillSignObject AddObject(FillSignObjectType type, const PointF& point, float width, float height,
222 
244  FillSignObject AddTextObject(const TextFillSignObjectDataArray& text_data, const PointF& point, float width,
245  float height, common::Rotation rotation = common::e_Rotation0, bool is_comb_field_mode = false);
246 
259  bool RemoveObject(const FillSignObject& fillsign_object);
260 
272  FillSignObject GetObjectAtPoint(const PointF& point);
273 
286  FillSignObject GetObjectAtDevicePoint(const PointF& point, const Matrix& matrix);
287 
288  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
289  explicit FillSign(FS_HANDLE handle = NULL);
290 };
291 
297 class FillSignObject : public Base {
298  public:
299  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
300  explicit FillSignObject(FS_HANDLE handle);
301 
302 #ifndef __EMSCRIPTEN_RENDER__
303 
308  FillSignObject(const FillSignObject& other);
309 #endif
310 
313 
314 #ifndef __EMSCRIPTEN_RENDER__
315 
324 #endif
325 
333  bool operator ==(const FillSignObject& other) const;
334 
342  bool operator != (const FillSignObject& other) const;
343 
351  bool IsEmpty() const;
352 
353 #ifndef __EMSCRIPTEN_RENDER__
354 
355  virtual ~FillSignObject();
356 #endif
357 
366 
394  void Move(const PointF& point, float width, float height, common::Rotation rotation = common::e_Rotation0);
395 
402  RectF GetRect() const;
403 
413  bool GenerateContent();
414 
415 };
416 
422 class TextFillSignObject FS_FINAL : public FillSignObject {
423  public:
429  explicit TextFillSignObject(const FillSignObject& fillsign_object);
430 
431  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
432  explicit TextFillSignObject(FS_HANDLE handle);
433 
436 
439 
446 
452  bool IsCombFieldMode();
453 };
454 
461 class SignatureFillSignObject FS_FINAL: public FillSignObject {
462  public:
468  explicit SignatureFillSignObject(const FillSignObject& fillsign_object);
469 
470  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
471  explicit SignatureFillSignObject(FS_HANDLE handle);
472 
475 
478 
485  bool IsInitialsType();
486 
494  void SetBitmap(const common::Bitmap& bitmap);
495 };
496 } // namespace pdf
497 } // namespace foxit
498 #endif // FS_FILLSIGN_H_
499 
Definition: fs_image.h:36
Definition: fs_pdfgraphicsobject.h:857
TextFillSignObject()
Constructor.
Definition: fs_fillsign.h:435
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:297
WIDE STRING CLASS.
Definition: fx_string.h:1452
~TextFillSignObject()
Destructor.
Definition: fs_fillsign.h:438
Definition: fs_fillsign.h:461
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:474
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:411
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:214
Header file for common definitions and classes.
FillSignObject()
Constructor.
Definition: fs_fillsign.h:312
virtual ~FillSignObject()
Destructor.
Definition: fs_basictypes.h:407
TextFillSignObjectDataArray GetTextDataArray()
Get text data array.
Definition: fs_fillsign.h:422
~SignatureFillSignObject()
Destructor.
Definition: fs_fillsign.h:477
Header file for PDF page related definitions and classes.
TextFillSignObjectData()
Constructor.
Definition: fs_fillsign.h:52
No rotation.
Definition: fs_common.h:59
bool IsInitialsType()
Check if current annotation is an initials signature fill-sign object.
Rotation
Enumeration for rotation.
Definition: fs_common.h:57
Foxit namespace.
Definition: fs_taggedpdf.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:780
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