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 
215  FillSignObject AddObject(FillSignObjectType type, const PointF& point, float width, float height,
217 
239  FillSignObject AddTextObject(const TextFillSignObjectDataArray& text_data, const PointF& point, float width,
240  float height, common::Rotation rotation = common::e_Rotation0, bool is_comb_field_mode = false);
241 
254  bool RemoveObject(const FillSignObject& fillsign_object);
255 
267  FillSignObject GetObjectAtPoint(const PointF& point);
268 
281  FillSignObject GetObjectAtDevicePoint(const PointF& point, const Matrix& matrix);
282 
283  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
284  explicit FillSign(FS_HANDLE handle = NULL);
285 };
286 
292 class FillSignObject : public Base {
293  public:
294  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
295  explicit FillSignObject(FS_HANDLE handle);
296 
297 #ifndef __EMSCRIPTEN_RENDER__
298 
303  FillSignObject(const FillSignObject& other);
304 #endif
305 
308 
309 #ifndef __EMSCRIPTEN_RENDER__
310 
319 #endif
320 
328  bool operator ==(const FillSignObject& other) const;
329 
337  bool operator != (const FillSignObject& other) const;
338 
346  bool IsEmpty() const;
347 
348 #ifndef __EMSCRIPTEN_RENDER__
349 
350  virtual ~FillSignObject();
351 #endif
352 
361 
389  void Move(const PointF& point, float width, float height, common::Rotation rotation = common::e_Rotation0);
390 
397  RectF GetRect() const;
398 
408  bool GenerateContent();
409 
410 };
411 
417 class TextFillSignObject FS_FINAL : public FillSignObject {
418  public:
424  explicit TextFillSignObject(const FillSignObject& fillsign_object);
425 
426  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
427  explicit TextFillSignObject(FS_HANDLE handle);
428 
431 
434 
441 
447  bool IsCombFieldMode();
448 };
449 
456 class SignatureFillSignObject FS_FINAL: public FillSignObject {
457  public:
463  explicit SignatureFillSignObject(const FillSignObject& fillsign_object);
464 
465  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
466  explicit SignatureFillSignObject(FS_HANDLE handle);
467 
470 
473 
480  bool IsInitialsType();
481 
489  void SetBitmap(const common::Bitmap& bitmap);
490 };
491 } // namespace pdf
492 } // namespace foxit
493 #endif // FS_FILLSIGN_H_
494 
Definition: fs_image.h:36
Definition: fs_pdfgraphicsobject.h:873
TextFillSignObject()
Constructor.
Definition: fs_fillsign.h:430
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:292
WIDE STRING CLASS.
Definition: fx_string.h:1461
~TextFillSignObject()
Destructor.
Definition: fs_fillsign.h:433
Definition: fs_fillsign.h:456
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:469
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:412
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:214
Header file for common definitions and classes.
FillSignObject()
Constructor.
Definition: fs_fillsign.h:307
virtual ~FillSignObject()
Destructor.
Definition: fs_basictypes.h:443
TextFillSignObjectDataArray GetTextDataArray()
Get text data array.
Definition: fs_fillsign.h:417
~SignatureFillSignObject()
Destructor.
Definition: fs_fillsign.h:472
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:792
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