Foxit PDF SDK
fs_annot.h
Go to the documentation of this file.
1 
15 #ifndef FS_ANNOT_H_
16 #define FS_ANNOT_H_
17 
18 #include "common/fs_common.h"
19 #include "common/file/fs_file.h"
20 #include "common/fs_image.h"
22 
28 namespace foxit {
32 namespace pdf {
33 // forward declaration
34 class PDFPage;
35 class FileSpec;
36 namespace actions {
37 class Action;
38 } // namespace actions
39 namespace annots {
40 class Note;
41 class Popup;
42 } // namespace annots
43 namespace interform {
44 class Field;
45 class Control;
46 } // namespace interform
47 
51 class DefaultAppearance FS_FINAL : public Object {
52  public:
58  typedef enum _DefAPFlags {
60  e_FlagFont = 0x0001,
62  e_FlagTextColor = 0x0002,
64  e_FlagFontSize = 0x0004
65  } DefAPFlags;
66 
67 
83  : flags(flags)
84  , font(font)
87 
90  : flags(0)
91  , text_size(0)
92  , text_color(0x000000) {}
93 
99  DefaultAppearance(const DefaultAppearance& default_appearance)
100  : flags(default_appearance.flags)
101  , font(default_appearance.font)
102  , text_size(default_appearance.text_size)
103  , text_color(default_appearance.text_color) {}
104 
112  DefaultAppearance& operator = (const DefaultAppearance& default_appearance) {
113  flags = default_appearance.flags;
114  font = default_appearance.font;
115  text_size = default_appearance.text_size;
116  text_color = default_appearance.text_color;
117  return *this;
118  }
119 
127  bool operator == (const DefaultAppearance& default_appearance) const {
128  return (flags == default_appearance.flags && font == default_appearance.font &&
129  fabs(text_size-default_appearance.text_size) <= FLT_EPSILON &&
130  text_color == default_appearance.text_color);
131  }
132 
140  bool operator != (const DefaultAppearance& default_appearance) const {
141  return (flags != default_appearance.flags || font != default_appearance.font ||
142  fabs(text_size - default_appearance.text_size) > FLT_EPSILON ||
143  text_color != default_appearance.text_color);
144  }
145 
164  this->flags = flags;
165  this->font = font;
166  this->text_size = text_size;
167  this->text_color = text_color;
168  }
169 
192  float text_size;
199 };
203 namespace annots {
205 class BorderInfo FS_FINAL : public Object {
206  public:
212  typedef enum _Style {
214  e_Solid = 0,
221  e_Dashed = 1,
241  e_Inset = 4,
249  } Style;
250 
251 
269  BorderInfo(float width, Style style, float intensity, float dash_phase, const FloatArray& dashes) {
270  this->width = width;
271  this->style = style;
272  this->cloud_intensity = intensity;
273  this->dash_phase = dash_phase;
274  this->dashes = dashes;
275  }
276 
279  : width(1.0f)
281  , cloud_intensity(0)
282  , dash_phase(0) {}
283 
286 
292  BorderInfo(const BorderInfo& border_info) {
293  this->width = border_info.width;
294  this->style = border_info.style;
295  this->cloud_intensity = border_info.cloud_intensity;
296  this->dash_phase = border_info.dash_phase;
297  this->dashes = border_info.dashes;
298  }
299 
307  BorderInfo& operator = (const BorderInfo& border_info) {
308  this->width = border_info.width;
309  this->style = border_info.style;
310  this->cloud_intensity = border_info.cloud_intensity;
311  this->dash_phase = border_info.dash_phase;
312  this->dashes = border_info.dashes;
313  return *this;
314  }
315 
323  bool operator == (const BorderInfo& border_info) const {
324  if (fabs(width - border_info.width) > FLT_EPSILON || style != border_info.style ||
325  fabs(cloud_intensity - border_info.cloud_intensity) > FLT_EPSILON ||
326  fabs(dash_phase - border_info.dash_phase) > FLT_EPSILON ||
327  dashes.GetSize() != border_info.dashes.GetSize())
328  return false;
329  for (int i=0; i<dashes.GetSize(); i++) {
330  if (fabs(dashes[i]-border_info.dashes[i])>FLT_EPSILON)
331  return false;
332  }
333  return true;
334  }
335 
343  bool operator != (const BorderInfo& border_info) const{
344  if (fabs(width - border_info.width) > FLT_EPSILON || style != border_info.style ||
345  fabs(cloud_intensity - border_info.cloud_intensity) > FLT_EPSILON ||
346  fabs(dash_phase - border_info.dash_phase) > FLT_EPSILON ||
347  dashes.GetSize() != border_info.dashes.GetSize())
348  return true;
349  for (int i=0; i<dashes.GetSize(); i++) {
350  if (fabs(dashes[i]-border_info.dashes[i])>FLT_EPSILON)
351  return true;
352  }
353  return false;
354  }
355 
375  void Set(float width, Style style, float intensity, float dash_phase, const FloatArray& dashes) {
376  this->width = width;
377  this->style = style;
378  this->cloud_intensity = intensity;
379  this->dash_phase = dash_phase;
380  this->dashes = dashes;
381  }
382 
388  float width;
389 
395 
408 
414  float dash_phase;
415 
423 };
424 
435 class QuadPoints FS_FINAL : public Object {
436  public:
445  QuadPoints(const PointF& first, const PointF& second, const PointF& third, const PointF& fourth) {
446  this->first = first;
447  this->second = second;
448  this->third = third;
449  this->fourth = fourth;
450  }
451 
454 
460  QuadPoints(const QuadPoints& quad_points) {
461  first = quad_points.first;
462  second = quad_points.second;
463  third = quad_points.third;
464  fourth = quad_points.fourth;
465  }
466 
474  QuadPoints& operator = (const QuadPoints& quad_points) {
475  first = quad_points.first;
476  second = quad_points.second;
477  third = quad_points.third;
478  fourth = quad_points.fourth;
479  return *this;
480  }
481 
489  bool operator == (const QuadPoints& quad_points) const {
490  return (first == quad_points.first && second == quad_points.second &&
491  third == quad_points.third && fourth == quad_points.fourth);
492  }
493 
501  bool operator != (const QuadPoints& quad_points) const {
502  return (first != quad_points.first || second != quad_points.second ||
503  third != quad_points.third || fourth != quad_points.fourth);
504  }
505 
516  void Set(const PointF& first, const PointF& second, const PointF& third, const PointF& fourth) {
517  this->first = first;
518  this->second = second;
519  this->third = third;
520  this->fourth = fourth;
521  }
522 
531 };
532 
534 FSDK_DEFINE_ARRAY(QuadPointsArray, QuadPoints)
535 
536 
540 class IconFit FS_FINAL : public Object {
541  public:
546  typedef enum _ScaleWayType {
548  e_ScaleWayAlways = 1,
550  e_ScaleWayBigger = 2,
552  e_ScaleWaySmaller = 3,
554  e_ScaleWayNever = 4
555  } ScaleWayType;
556 
557 
560  : scale_way_type((ScaleWayType)0)
561  , is_proportional_scaling(false)
562  , horizontal_fraction(0)
563  , vertical_fraction(0)
564  , fit_bounds(false) {}
565 
589  IconFit(ScaleWayType type, bool is_proportional_scaling, float horizontal_fraction,
590  float vertical_fraction, bool fit_bounds)
591  : scale_way_type(type)
592  , is_proportional_scaling(is_proportional_scaling)
593  , horizontal_fraction(horizontal_fraction)
594  , vertical_fraction(vertical_fraction)
595  , fit_bounds(fit_bounds) {}
596 
602  IconFit(const IconFit& icon_fit)
603  : scale_way_type(icon_fit.scale_way_type)
604  , is_proportional_scaling(icon_fit.is_proportional_scaling)
605  , horizontal_fraction(icon_fit.horizontal_fraction)
606  , vertical_fraction(icon_fit.vertical_fraction)
607  , fit_bounds(icon_fit.fit_bounds) {}
608 
616  IconFit& operator = (const IconFit& icon_fit) {
617  scale_way_type = icon_fit.scale_way_type;
618  is_proportional_scaling = icon_fit.is_proportional_scaling;
619  horizontal_fraction = icon_fit.horizontal_fraction;
620  vertical_fraction = icon_fit.vertical_fraction;
621  fit_bounds = icon_fit.fit_bounds;
622  return *this;
623  }
624 
632  bool operator == (const IconFit& icon_fit) const {
633  return (scale_way_type == icon_fit.scale_way_type &&
634  is_proportional_scaling == icon_fit.is_proportional_scaling &&
635  fabs(horizontal_fraction - icon_fit.horizontal_fraction) <= FLT_EPSILON &&
636  fabs(vertical_fraction - icon_fit.vertical_fraction) <= FLT_EPSILON &&
637  fit_bounds == icon_fit.fit_bounds);
638  }
639 
647  bool operator != (const IconFit& icon_fit) const {
648  return (scale_way_type != icon_fit.scale_way_type ||
649  is_proportional_scaling != icon_fit.is_proportional_scaling ||
650  fabs(horizontal_fraction - icon_fit.horizontal_fraction) > FLT_EPSILON ||
651  fabs(vertical_fraction - icon_fit.vertical_fraction) > FLT_EPSILON ||
652  fit_bounds != icon_fit.fit_bounds);
653  }
654 
680  void Set(ScaleWayType type, bool is_proportional_scaling, float horizontal_fraction,
681  float vertical_fraction, bool fit_bounds) {
682  this->scale_way_type = type;
683  this->is_proportional_scaling = is_proportional_scaling;
684  this->horizontal_fraction = horizontal_fraction;
685  this->vertical_fraction = vertical_fraction;
686  this->fit_bounds = fit_bounds;
687  }
688 
720 };
721 
754 class Annot : public Base {
755  public:
761  typedef enum _Type {
768  e_Note = 1,
770  e_Link = 2,
774  e_Line = 4,
776  e_Square = 5,
778  e_Circle = 6,
792  e_Stamp = 13,
794  e_Caret = 14,
796  e_Ink = 15,
798  e_PSInk = 16,
802  e_Sound = 18,
804  e_Movie = 19,
809  e_Widget = 20,
811  e_Screen = 21,
815  e_TrapNet = 23,
819  e_3D = 25,
821  e_Popup = 26,
823  e_Redact = 27
824  } Type;
825 
831  typedef enum _Flags {
838  e_FlagInvisible = 0x0001,
844  e_FlagHidden = 0x0002,
852  e_FlagPrint = 0x0004,
859  e_FlagNoZoom = 0x0008,
866  e_FlagNoRotate = 0x0010,
874  e_FlagNoView = 0x0020,
883  e_FlagReadOnly = 0x0040,
890  e_FlagLocked = 0x0080,
904  } Flags;
905 
911  typedef enum _HighlightingMode {
923 
929  typedef enum _Property {
945  } Property;
946 
952  typedef enum _MKEntry {
1001  } MKEntry;
1002 
1008  typedef enum _MKIconCaptionRelation {
1024 
1030  typedef enum _AppearanceType {
1037  } AppearanceType;
1038 
1039 
1040  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1041  explicit Annot(FS_HANDLE handle);
1049  Annot(const PDFPage& page, objects::PDFDictionary* annot_dict);
1050 #ifndef __EMSCRIPTEN_RENDER__
1051 
1056  Annot(const Annot& annot);
1057 #endif
1058 
1059  Annot() {}
1060 #ifndef __EMSCRIPTEN_RENDER__
1061 
1068  Annot& operator = (const Annot& annot);
1069 #endif
1070 
1077  bool operator ==(const Annot& other) const;
1085  bool operator != (const Annot& other) const;
1086 #ifndef __EMSCRIPTEN_RENDER__
1087 
1088  virtual ~Annot();
1089 #endif
1090 
1097  bool IsEmpty() const;
1098 
1104  PDFPage GetPage() const;
1111  bool IsMarkup() const;
1117  Type GetType() const;
1123  int GetIndex() const;
1129  WString GetContent() const;
1143  void SetContent(const WString& content);
1150  DateTime GetModifiedDateTime() const;
1158  void SetModifiedDateTime(const DateTime& date_time);
1165  uint32 GetFlags() const;
1174  void SetFlags(uint32 flags);
1180  WString GetUniqueID() const;
1188  void SetUniqueID(const WString& unique_id);
1195  RectF GetRect() const;
1196 
1209  Matrix GetDisplayMatrix(const Matrix& page_display_matrix);
1210 
1220  bool Move(const RectF& rect);
1237  BorderInfo GetBorderInfo() const;
1255  void SetBorderInfo(const BorderInfo& border);
1264  RGB GetBorderColor() const;
1276  void SetBorderColor(RGB color);
1289  bool ResetAppearanceStream();
1305  RectI GetDeviceRect(const Matrix& matrix);
1329  bool RemoveProperty(Property property);
1330 
1337 
1353  objects::PDFStream* GetAppearanceStream(AppearanceType type, const char* appearance_state = "") const;
1354 };
1355 
1357 FSDK_DEFINE_ARRAY(AnnotArray, Annot)
1358 
1359 
1360 class ShadingColor FS_FINAL : public Object {
1361  public:
1368  ShadingColor(ARGB firstcolor, ARGB secondcolor)
1369  : first_color(firstcolor)
1370  , second_color(secondcolor) {}
1371 
1374  : first_color(0xFFFFFFFF)
1375  , second_color(0xFFFFFFFF) {}
1376 
1382  ShadingColor(const ShadingColor& shading_color)
1383  : first_color(shading_color.first_color)
1384  , second_color(shading_color.second_color) {}
1385 
1393  ShadingColor& operator = (const ShadingColor& shading_color) {
1394  this->first_color = shading_color.first_color;
1395  this->second_color = shading_color.second_color;
1396  return *this;
1397  }
1398 
1406  bool operator == (const ShadingColor& shading_color) const {
1407  return (first_color == shading_color.first_color && second_color == shading_color.second_color);
1408  }
1409 
1417  bool operator != (const ShadingColor& shading_color) const {
1418  return (first_color != shading_color.first_color || second_color != shading_color.second_color);
1419  }
1420 
1429  void Set(ARGB firstcolor, ARGB secondcolor) {
1430  this->first_color = firstcolor;
1431  this->second_color = secondcolor;
1432  }
1433 
1438 };
1439 
1450  public:
1456  virtual void Release() = 0;
1465  virtual String GetProviderID() {
1466  return String();
1467  }
1477  return String();
1478  }
1488  virtual bool HasIcon(Annot::Type annot_type, const char* icon_name) {
1489  return false;
1490  }
1501  virtual bool CanChangeColor(Annot::Type annot_type, const char* icon_name) {
1502  return false;
1503  }
1504 #ifndef __EMSCRIPTEN_RENDER__
1505 
1515  virtual PDFPage GetIcon(Annot::Type annot_type, const char* icon_name, ARGB color);
1516 #endif
1517 
1531  virtual bool GetShadingColor(Annot::Type annot_type, const char* icon_name,
1532  RGB referenced_color, int shading_index, ShadingColor& out_shading_color) {
1533  return false;
1534  }
1545  virtual float GetDisplayWidth(Annot::Type annot_type, const char* icon_name) {
1546  return 0.0f;
1547  }
1558  virtual float GetDisplayHeight(Annot::Type annot_type, const char* icon_name) {
1559  return 0.0f;
1560  }
1561 
1562  protected:
1563  ~IconProviderCallback() {}
1564 };
1565 
1566 class Markup;
1568 FSDK_DEFINE_ARRAY(MarkupArray, Markup)
1569 
1570 
1588 class Markup : public Annot {
1589  public:
1595  typedef enum _StateModel {
1597  e_StateModelMarked = 1,
1599  e_StateModelReview = 2
1600  } StateModel;
1601 
1607  typedef enum _State {
1612  e_StateMarked = 1,
1617  e_StateUnmarked = 2,
1622  e_StateAccepted = 3,
1627  e_StateRejected = 4,
1632  e_StateCancelled = 5,
1637  e_StateCompleted = 6,
1642  e_StateNone = 7
1643  } State;
1644 
1650  typedef enum _EndingStyle {
1652  e_EndingStyleNone = 0,
1654  e_EndingStyleSquare = 1,
1656  e_EndingStyleCircle = 2,
1658  e_EndingStyleDiamond = 3,
1660  e_EndingStyleOpenArrow = 4,
1666  e_EndingStyleClosedArrow = 5,
1668  e_EndingStyleButt = 6,
1670  e_EndingStyleROpenArrow = 7,
1672  e_EndingStyleRClosedArrow = 8,
1674  e_EndingStyleSlash = 9
1675  } EndingStyle;
1676 
1682  typedef enum _MeasureType {
1684  e_MeasureTypeX = 0,
1686  e_MeasureTypeY = 1,
1688  e_MeasureTypeD = 2,
1690  e_MeasureTypeA = 3,
1692  e_MeasureTypeT = 4,
1694  e_MeasureTypeS = 5
1695  } MeasureType;
1696 
1697 
1703  explicit Markup(const Annot& annot);
1704  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1705  explicit Markup(FS_HANDLE handle);
1707  Markup() {}
1708 
1710  ~Markup() {}
1711 
1729  Popup GetPopup();
1746  void SetPopup(const Popup& popup);
1752  WString GetTitle() const;
1760  void SetTitle(const WString& title);
1766  WString GetSubject() const;
1774  void SetSubject(const WString& subject);
1783  float GetOpacity() const;
1796  void SetOpacity(float opacity);
1818  String GetIntent() const;
1854  void SetIntent(const String& intent);
1861  DateTime GetCreationDateTime() const;
1869  void SetCreationDateTime(const DateTime& date_time);
1875  int GetReplyCount();
1884  Note GetReply(int index) const;
1890  Note AddReply();
1901  bool RemoveReply(int index);
1907  bool RemoveAllReplies();
1908 
1925  bool IsGrouped();
1926 
1945  Markup GetGroupHeader();
1946 
1963  MarkupArray GetGroupElements();
1964 
1980  bool Ungroup();
1981 
2003  int GetStateAnnotCount(StateModel model);
2004 
2029  Note GetStateAnnot(StateModel model, int index);
2030 
2083  Note AddStateAnnot(StateModel model, State state);
2084 
2094  bool RemoveAllStateAnnots();
2095 
2096 };
2097 
2120 class Note FS_FINAL : public Markup {
2121  public:
2123  Note() {}
2129  explicit Note(const Annot& annot);
2130  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
2131  explicit Note(FS_HANDLE handle);
2133  ~Note() {}
2134 
2147  bool GetOpenStatus() const;
2162  void SetOpenStatus(bool status);
2174  String GetIconName() const;
2192  void SetIconName(const char* icon_name);
2202  Markup GetReplyTo();
2209  bool IsStateAnnot();
2210 
2223 
2235  State GetState();
2236 
2259  void SetState(State state);
2260 
2261 };
2262 
2274 class TextMarkup: public Markup {
2275  public:
2283  explicit TextMarkup(const Annot& annot);
2286 
2321  void SetQuadPoints(const QuadPointsArray& quad_points_array);
2322 };
2323 
2340 class Highlight FS_FINAL : public TextMarkup {
2341  public:
2349  explicit Highlight(const Annot& annot);
2352 };
2353 
2370 class Underline FS_FINAL : public TextMarkup {
2371  public:
2379  explicit Underline(const Annot& annot);
2382 };
2383 
2400 class StrikeOut FS_FINAL : public TextMarkup {
2401  public:
2409  explicit StrikeOut(const Annot& annot);
2412 };
2413 
2430 class Squiggly FS_FINAL : public TextMarkup {
2431  public:
2439  explicit Squiggly(const Annot& annot);
2442 };
2443 
2457 class Link FS_FINAL : public Annot {
2458  public:
2460  Link() {}
2466  explicit Link(const Annot& annot);
2467  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
2468  explicit Link(FS_HANDLE handle);
2470  ~Link() {}
2471 
2504  void SetQuadPoints(const QuadPointsArray& quad_points_array);
2505 
2514 
2525 
2533 
2548  void SetAction(const actions::Action& action);
2549 
2555  bool RemoveAction();
2556 };
2557 
2572 class Square FS_FINAL : public Markup {
2573  public:
2575  Square() {}
2581  explicit Square(const Annot& annot);
2583  ~Square() {}
2584 
2591  RGB GetFillColor() const;
2592 
2600  void SetFillColor(RGB fill_color);
2601 
2611  RectF GetInnerRect() const;
2623  void SetInnerRect(const RectF& inner_rect);
2624 };
2625 
2640 class Circle FS_FINAL : public Markup {
2641  public:
2643  Circle() {}
2649  explicit Circle(const Annot& annot);
2651  ~Circle() {}
2652 
2659  RGB GetFillColor() const;
2660 
2671  void SetFillColor(RGB fill_color);
2672 
2682  RectF GetInnerRect() const;
2683 
2697  void SetInnerRect(const RectF& inner_rect);
2698 };
2699 
2719 class FreeText FS_FINAL : public Markup {
2720  public:
2728  explicit FreeText(const Annot& annot);
2731 
2742  RGB GetFillColor() const;
2756  void SetFillColor(RGB fill_color);
2757 
2767 
2781  void SetAlignment(common::Alignment alignment);
2782 
2793  RectF GetInnerRect() const;
2794 
2809  void SetInnerRect(const RectF& inner_rect);
2810 
2820 
2843  bool SetDefaultAppearance(const DefaultAppearance& default_ap);
2844 
2856 
2871  void SetCalloutLineEndingStyle(EndingStyle ending_style);
2872 
2887 
2910  void SetCalloutLinePoints(const PointFArray& point_array);
2911 
2924  void SetTextMatrix(const Matrix& text_matrix);
2925 
2934  Matrix GetTextMatrix() const;
2935 
2943 
2958  void SetRotation(common::Rotation rotation);
2959 
2972  void Rotate(common::Rotation rotation);
2973 
2974 };
2975 
2994 class Line FS_FINAL : public Markup {
2995  public:
3001  typedef enum _CapPos {
3006  } CapPos;
3007 
3008 
3010  Line() {}
3016  explicit Line(const Annot& annot);
3018  ~Line() {}
3019 
3041  void SetLineStartStyle(EndingStyle ending_style);
3050  EndingStyle GetLineEndStyle() const;
3063  void SetLineEndStyle(EndingStyle ending_style);
3064 
3075  RGB GetStyleFillColor() const;
3076 
3090  void SetStyleFillColor(RGB color);
3091 
3100  PointF GetStartPoint() const;
3113  void SetStartPoint(const PointF& point);
3114 
3123  PointF GetEndPoint() const;
3136  void SetEndPoint(const PointF& point);
3137 
3146  bool HasCaption() const;
3159  void EnableCaption(bool cap);
3160 
3188  void SetCaptionPositionType(CapPos cap_position);
3201  Offset GetCaptionOffset() const;
3217  void SetCaptionOffset(const Offset& offset);
3218 
3233  float GetLeaderLineLength() const;
3251  void SetLeaderLineLength(float length);
3261  float GetLeaderLineExtensionLength() const;
3274  void SetLeaderLineExtensionLength(float extension_length);
3275 
3286  float GetLeaderLineOffset() const;
3300  void SetLeaderLineOffset(float offset);
3301 
3315  void SetMeasureRatio(const String& ratio);
3316 
3327 
3340  void SetMeasureUnit(MeasureType measure_type, const String& unit);
3341 
3353  String GetMeasureUnit(MeasureType measure_type);
3354 
3367  void SetMeasureConversionFactor(MeasureType measure_type, float factor);
3368 
3380  float GetMeasureConversionFactor(MeasureType measure_type);
3381 };
3382 
3400 class Ink FS_FINAL : public Markup {
3401  public:
3403  Ink() {}
3409  explicit Ink(const Annot& annot);
3411  ~Ink() {}
3439 
3472  void SetInkList(const common::Path& ink_list);
3473 };
3474 
3499 class Stamp FS_FINAL : public Markup {
3500  public:
3502  Stamp() {}
3508  explicit Stamp(const Annot& annot);
3509 #ifndef __EMSCRIPTEN_RENDER__
3510 
3511  ~Stamp();
3512 #endif
3513 
3524  String GetIconName() const;
3547  void SetIconName(const char* icon_name);
3558  void SetBitmap(const common::Bitmap& bitmap);
3559 
3582  void SetImage(const common::Image& image, int frame_index, int compress);
3583 
3594  void SetRotation(int angle);
3595 
3601  int GetRotation();
3602 
3612  void Rotate(int angle);
3613 };
3614 
3627 class Screen FS_FINAL : public Annot {
3628  public:
3630  Screen() {}
3636  explicit Screen(const Annot& annot);
3638  virtual ~Screen() {}
3639 
3662  void SetImage(const common::Image& image, int frame_index, int compress);
3663 
3673 
3681 
3694  void SetRotation(common::Rotation rotate);
3695 
3703 
3712  float GetOpacity() const;
3725  void SetOpacity(float opacity);
3726 
3732  WString GetTitle() const;
3740  void SetTitle(const WString& title);
3741 
3775  void SetAction(const actions::Action& action);
3784  void RemoveAction();
3785 };
3786 
3805 class Polygon FS_FINAL : public Markup {
3806  public:
3808  Polygon() {}
3814  explicit Polygon(const Annot& annot);
3825  RGB GetFillColor() const;
3826 
3838  void SetFillColor(RGB fill_color);
3839 
3849 
3861  void SetVertexes(const PointFArray& vertexes);
3862 
3876  void SetMeasureRatio(const String& ratio);
3877 
3888 
3901  void SetMeasureUnit(MeasureType measure_type, const String& unit);
3902 
3914  String GetMeasureUnit(MeasureType measure_type);
3915 
3928  void SetMeasureConversionFactor(MeasureType measure_type, float factor);
3929 
3941  float GetMeasureConversionFactor(MeasureType measure_type);
3942 };
3943 
3963 class PolyLine FS_FINAL : public Markup {
3964  public:
3972  explicit PolyLine(const Annot& annot);
3985  RGB GetStyleFillColor() const;
3997  void SetStyleFillColor(RGB fill_color);
3998 
4008 
4020  void SetVertexes(const PointFArray& vertexes);
4043  void SetLineStartStyle(EndingStyle starting_style);
4052  EndingStyle GetLineEndStyle() const;
4066  void SetLineEndStyle(EndingStyle ending_style);
4067 
4081  void SetMeasureRatio(const String& ratio);
4082 
4093 
4106  void SetMeasureUnit(MeasureType measure_type, const String& unit);
4107 
4119  String GetMeasureUnit(MeasureType measure_type);
4120 
4133  void SetMeasureConversionFactor(MeasureType measure_type, float factor);
4134 
4146  float GetMeasureConversionFactor(MeasureType measure_type);
4147 };
4148 
4161 class Caret FS_FINAL : public Markup {
4162  public:
4164  Caret() {}
4170  explicit Caret(const Annot& annot);
4172  ~Caret() {}
4173 
4183  RectF GetInnerRect() const;
4197  void SetInnerRect(const RectF& inner_rect);
4198 };
4199 
4212 class FileAttachment FS_FINAL : public Markup {
4213  public:
4221  explicit FileAttachment(const Annot& annot);
4224 
4232  bool SetFileSpec(const FileSpec& file_spec);
4233 
4241 
4252  String GetIconName() const;
4253 
4269  void SetIconName(const char* icon_name);
4270 };
4271 
4281 class Popup FS_FINAL : public Annot {
4282  public:
4284  Popup() {}
4290  explicit Popup(const Annot& annot);
4291  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
4292  explicit Popup(FS_HANDLE handle);
4294  ~Popup() {}
4295 
4308  bool GetOpenStatus() const;
4323  void SetOpenStatus(bool status);
4324 
4332  Markup GetParent();
4333 };
4334 #ifndef __FSDK_NO_PSINK__
4335 
4353 class PSInk FS_FINAL : public Annot {
4354  public:
4356  PSInk() {}
4362  explicit PSInk(const Annot& annot);
4363  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
4364  explicit PSInk(FS_HANDLE handle);
4366  ~PSInk() {}
4367 };
4368 #endif
4369 
4381 class Widget FS_FINAL : public Annot {
4382  public:
4384  Widget() {}
4390  explicit Widget(const Annot& annot);
4391  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
4392  explicit Widget(FS_HANDLE handle);
4393 #ifndef __EMSCRIPTEN_RENDER__
4394 
4395  ~Widget();
4396 #endif
4397 
4403 
4410 
4421 
4434 
4445 
4469  void SetAction(const actions::Action& action);
4470 
4479  void RemoveAction();
4480 
4492  bool HasMKEntry(MKEntry mk_entry);
4504  void RemoveMKEntry(MKEntry mk_entry);
4530  void SetMKRotation(common::Rotation rotation);
4541  RGB GetMKBorderColor() const;
4552  void SetMKBorderColor(RGB color);
4563  RGB GetMKBackgroundColor() const;
4574  void SetMKBackgroundColor(RGB color);
4588  WString GetMKNormalCaption() const;
4602  void SetMKNormalCaption(const wchar_t* caption);
4617  WString GetMKRolloverCaption() const;
4618 
4633  void SetMKRolloverCaption(const wchar_t* caption);
4634 
4648  WString GetMKDownCaption() const;
4649 
4663  void SetMKDownCaption(const wchar_t* caption);
4664 
4678 
4692  void SetMKNormalIconBitmap(const common::Bitmap& bitmap);
4693 
4709  void SetMKNormalIconImage(const common::Image& image, int frame_index);
4710 
4725 
4740  void SetMKRolloverIconBitmap(const common::Bitmap& bitmap);
4741 
4758  void SetMKRolloverIconImage(const common::Image& image, int frame_index);
4759 
4773 
4787  void SetMKDownIconBitmap(const common::Bitmap& bitmap);
4788 
4804  void SetMKDownIconImage(const common::Image& image, int frame_index);
4805 
4819  IconFit GetMKIconFit() const;
4837  void SetMKIconFit(const IconFit& icon_fit);
4838 
4853 
4870 
4878  void SetAppearanceState(const String& appearance_state);
4879 
4885  String GetAppearanceState() const;
4886 
4893 
4894 #ifdef _SUPPORTWEBSDK_
4895  //Set push button icon form icon stream. stream is from doc::createIcon.
4896  //face: 0: normal, 1: down, 2: roller
4897  void SetButtonIcon(objects::PDFStream* icon, int face);
4898 #endif
4899 };
4900 
4917 class Redact FS_FINAL : public Markup {
4918  public:
4920  Redact() {}
4926  explicit Redact(const Annot& annot);
4927  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
4928  explicit Redact(FS_HANDLE handle);
4929 #ifndef __EMSCRIPTEN_RENDER__
4930 
4931  ~Redact();
4932 #endif
4933 
4947 
4966  void SetQuadPoints(const QuadPointsArray& quad_points_array);
4967 
4974  RGB GetFillColor() const;
4982  void SetFillColor(RGB fill_color);
4983 
4990  RGB GetApplyFillColor() const;
4991 
4999  void SetApplyFillColor(RGB fill_color);
5000 
5006  WString GetOverlayText() const;
5007 
5015  void SetOverlayText(const WString& overlay_text);
5016 
5026 
5040 
5050 
5073  bool SetDefaultAppearance(const DefaultAppearance& default_ap);
5074 
5086  bool Apply();
5087 };
5088 
5098 class Sound FS_FINAL : public Markup{
5099  public:
5105  typedef enum _SampleEncodingFormat {
5115 
5116 
5118  Sound() {}
5119 
5125  explicit Sound(const Annot& annot);
5126 
5127  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
5128  explicit Sound(FS_HANDLE handle);
5129 
5130 #ifndef __EMSCRIPTEN_RENDER__
5131 
5132  ~Sound();
5133 #endif
5134 
5147 
5153  float GetSamplingRate() const;
5154 
5160  int GetChannelCount() const;
5161 
5167  int GetBits() const;
5168 
5176 
5182  String GetCompressionFormat() const;
5183 
5197  FileSpec GetFileSpec() const;
5198 };
5199 
5200 } // namespace annots
5201 } // namespace pdf
5202 } // namespace foxit
5203 
5204 #endif // FS_ANNOT_H_
5205 
FloatArray dashes
A dash array that represents the dash patterns.
Definition: fs_annot.h:422
Annotation flag: read only.
Definition: fs_annot.h:883
void SetFillColor(RGB fill_color)
Set fill color.
Definition: fs_annot.h:1449
WString GetUniqueID() const
Get unique ID.
StateModel GetStateModel()
Get the state model.
Rollover caption entry. "RC" in MK dictionary.
Definition: fs_annot.h:968
~Line()
Destructor.
Definition: fs_annot.h:3018
Square()
Constructor.
Definition: fs_annot.h:2575
void SetStyleFillColor(RGB fill_color)
Set fill color for some line ending styles.
RectI GetDeviceRect(const Matrix &matrix)
Get annotation rectangle in device coordinate system.
~FreeText()
Destructor.
Definition: fs_annot.h:2730
IconFit()
Constructor.
Definition: fs_annot.h:559
void SetBorderColor(RGB color)
Set border color.
Definition: fs_pdfobject.h:385
PointFArray GetVertexes()
Get vertexes.
IconFit GetMKIconFit() const
Get the icon fit information in the MK dictionary.
WString GetMKNormalCaption() const
Get the normal caption string in the MK dictionary.
State
Enumeration for markup annotation's state.
Definition: fs_annot.h:1607
Definition: fs_annot.h:1360
Definition: fs_annot.h:2274
Definition: fs_annot.h:2370
~Popup()
Destructor.
Definition: fs_annot.h:4294
String GetAppearanceState() const
Get the annotation's appearance state, which selects the applicable appearance stream from an appeara...
Definition: fs_annot.h:3627
Redact()
Constructor.
Definition: fs_annot.h:4920
DefaultAppearance GetDefaultAppearance()
Get default appearance data.
PointFArray GetCalloutLinePoints() const
Get a point of callout line points.
void Set(const PointF &first, const PointF &second, const PointF &third, const PointF &fourth)
Set value.
Definition: fs_annot.h:516
Definition: fs_image.h:36
MKIconCaptionRelation
Enumeration for icon and caption relative position in annotation's MK dictionary.
Definition: fs_annot.h:1008
Annotation type: squiggly annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:788
Annotation flag: no view.
Definition: fs_annot.h:874
RectF GetInnerRect() const
Get the inner rectangle.
void SetMeasureConversionFactor(MeasureType measure_type, float factor)
Set the conversion factor for measuring.
Definition: fs_annot.h:4212
Markup()
Constructor.
Definition: fs_annot.h:1707
PDFPage GetPage() const
Get the related PDF page.
WString GetContent() const
Get content.
Twos-complement values.
Definition: fs_annot.h:5109
Annotation type: file attachment annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:800
Annot()
Constructor.
Definition: fs_annot.h:1059
QuadPointsArray GetQuadPoints() const
Get quadrilaterals.
Unspecified or unsigned values in the range 0 to (2^B - 1).
Definition: fs_annot.h:5107
void SetAppearanceState(const String &appearance_state)
Set the annotation's appearance state, which selects the applicable appearance stream from an appeara...
void SetQuadPoints(const QuadPointsArray &quad_points_array)
Set quadrilaterals.
bool IsStateAnnot()
Check if current note annotation is used as a state annotation.
Down icon (or alternate icon) entry. "IX" in MK dictionary.
Definition: fs_annot.h:988
Markup GetReplyTo()
Get the markup annotation, which current note annotation is in reply to.
float width
Border width, in points.
Definition: fs_annot.h:388
Annotation type: free text annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:772
State GetState()
Get the state.
StrikeOut()
Constructor.
Definition: fs_annot.h:2403
CFX_Object Object
Object type.
Definition: fs_basictypes.h:219
Annotation type: pop-up annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:821
common::Rotation GetRotation()
Get current rotation value (in clockwise).
void SetMeasureUnit(MeasureType measure_type, const String &unit)
Set the label for displaying the units for measuring.
PolyLine()
Constructor.
Definition: fs_annot.h:3966
ARGB first_color
First color used for shading. Format: 0xAARRGGBB.
Definition: fs_annot.h:1435
actions::Action GetAction()
Get action.
float GetMeasureConversionFactor(MeasureType measure_type)
Get the conversion factor for measuring.
void SetFlags(uint32 flags)
Set annotation flags.
String GetAppearanceOnStateName() const
Get the name of the annotation's appearance "ON" state.
Definition: fs_annot.h:1357
void SetOverlayText(const WString &overlay_text)
Set the overlay text.
Screen()
Constructor.
Definition: fs_annot.h:3630
Sound()
Constructor.
Definition: fs_annot.h:5118
IconFit(ScaleWayType type, bool is_proportional_scaling, float horizontal_fraction, float vertical_fraction, bool fit_bounds)
Constructor, with parameters.
Definition: fs_annot.h:589
bool HasCaption() const
Check whether the content of current line annotation should be replicated as a caption in the appeara...
Icon and caption relation entry. "TP" in MK dictionary.
Definition: fs_annot.h:1000
float GetLeaderLineOffset() const
Get the length of leader line offset.
void SetMKRolloverIconBitmap(const common::Bitmap &bitmap)
Set the rollover icon bitmap in the MK dictionary.
void SetFillColor(RGB fill_color)
Set fill color.
Definition: fs_annot.h:540
Markup GetParent()
Get related parent markup annotation.
void SetMKNormalIconImage(const common::Image &image, int frame_index)
Set an image with specified frame index as normal icon in the MK dictionary.
HighlightingMode GetHighlightingMode()
Get highlighting mode.
Annotation flag: print.
Definition: fs_annot.h:852
bool operator!=(const BorderInfo &border_info) const
Not equal operator.
Definition: fs_annot.h:343
Definition: fs_basictypes.h:426
BorderInfo GetBorderInfo() const
Get border information.
RGB GetApplyFillColor() const
Get the filling color which is used for rollover appearance and will be used after redaction is appli...
BorderInfo(const BorderInfo &border_info)
Constructor, with another border information object.
Definition: fs_annot.h:292
Definition: fs_annot.h:205
Style
Enumeration for PDF annotation border style.
Definition: fs_annot.h:212
bool HasMKEntry(MKEntry mk_entry)
Check if a specified entry exists in the MK dictionary.
~Highlight()
Destructor.
Definition: fs_annot.h:2351
virtual bool GetShadingColor(Annot::Type annot_type, const char *icon_name, RGB referenced_color, int shading_index, ShadingColor &out_shading_color)
A callback function used to get the shading colors if current icon provider supports for a specified ...
Definition: fs_annot.h:1531
virtual String GetProviderVersion()
A callback function used to get provider version.
Definition: fs_annot.h:1476
Definition: fs_annot.h:2572
No caption; icon only.
Definition: fs_annot.h:1012
uint32 RGB
RGB color type, 24 bits, ((b) | ((g) << 8) | ((r) << 16)))
Definition: fs_basictypes.h:214
void SetTextMatrix(const Matrix &text_matrix)
Set matrix in default appearance data for text in current free text annotation.
Definition: fx_coordinates.h:30
int GetRotation()
Get current rotation angle (in clockwise).
void SetLineStartStyle(EndingStyle starting_style)
Set line ending style of the start point.
void SetMKRolloverIconImage(const common::Image &image, int frame_index)
Set an image with specified frame index as rollover icon in the MK dictionary.
MeasureType
Enumeration for annotation's measure type.
Definition: fs_annot.h:1682
Annotation type: unknown.
Definition: fs_annot.h:763
Caption above the icon.
Definition: fs_annot.h:1016
DefaultAppearance GetDefaultAppearance()
Get default appearance data.
Type
Enumeration for PDF annotation type.
Definition: fs_annot.h:761
Annotation type: redact annotation.
Definition: fs_annot.h:823
void SetIconName(const char *icon_name)
Set icon name.
Definition: fs_annot.h:1588
int GetSize() const
Get the number of elements in the array.
Definition: fx_basic.h:1351
void SetIconName(const char *icon_name)
Set icon name.
Annotation's normal appearance.
Definition: fs_annot.h:1032
Definition: fs_annot.h:534
Flags
Enumeration for PDF annotation flags.
Definition: fs_annot.h:831
Header file for file operation related definitions and functions.
objects::PDFStream * GetAppearanceStream(AppearanceType type, const char *appearance_state="") const
Get annotation's appearance stream with specified type and state.
DefaultAppearance(const DefaultAppearance &default_appearance)
Constructor, with another default appearance object.
Definition: fs_annot.h:99
void SetCalloutLineEndingStyle(EndingStyle ending_style)
Set line ending style of the start point in a callout line.
float GetMeasureConversionFactor(MeasureType measure_type)
Get the conversion factor for measuring.
void EnableCaption(bool cap)
Set the flag which is used to decide whether the content of current line annotation should be replica...
objects::PDFStream * GetSoundStream() const
Get the stream of sound data.
Definition: fs_annot.h:51
Annotation type: square annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:776
float cloud_intensity
Intensity of the cloudy effect.
Definition: fs_annot.h:407
~Caret()
Destructor.
Definition: fs_annot.h:4172
void SetMeasureConversionFactor(MeasureType measure_type, float factor)
Set the conversion factor for measuring.
RGB GetStyleFillColor() const
Get fill color for ending styles.
EndingStyle GetLineEndStyle() const
Get line ending style of the end point.
void SetInkList(const common::Path &ink_list)
Set ink list data.
void SetFillColor(RGB fill_color)
Set fill color.
void SetHighlightingMode(HighlightingMode mode)
Set highlighting mode.
RectF GetInnerRect() const
Get the inner rectangle.
Underline()
Constructor.
Definition: fs_annot.h:2373
void SetMKIconCaptionRelation(MKIconCaptionRelation relation)
Set the relation of icon and caption in the MK dictionary.
Annotation property: creation date.
Definition: fs_annot.h:936
void Set(float width, Style style, float intensity, float dash_phase, const FloatArray &dashes)
Set value.
Definition: fs_annot.h:375
void SetMKDict(pdf::objects::PDFDictionary *dict)
Set the appearance characteristics dictionary (known as "MK" dictionary as well).
Definition: fs_annot.h:4381
RGB GetFillColor() const
Get fill color.
Definition: fs_annot.h:3805
WIDE STRING CLASS.
Definition: fx_string.h:1452
void SetOpenStatus(bool status)
Set open status.
Definition: fs_annot.h:2120
void SetAlignment(common::Alignment alignment)
Set alignment value.
Annotation type: movie annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:804
Annotation property: modified date.
Definition: fs_annot.h:931
actions::Action GetAction()
Get action.
DateTime GetModifiedDateTime() const
Get last modified date time.
Normal icon entry. "I" in MK dictionary.
Definition: fs_annot.h:978
bool IsEmpty() const
Check whether current object is empty or not.
virtual ~Screen()
Destructor.
Definition: fs_annot.h:3638
void SetIconName(const char *icon_name)
Set icon name.
Caption below the icon.
Definition: fs_annot.h:1014
RGB GetStyleFillColor() const
Get fill color for some line ending styles.
RectF GetInnerRect() const
Get the inner rectangle.
bool Apply()
Apply current redact annotation: remove the text or graphics under annotation rectangle permanently.
bool operator==(const BorderInfo &border_info) const
Equal operator.
Definition: fs_annot.h:323
FileSpec GetFileSpec()
Get the file specification.
Annotation flag: no rotate.
Definition: fs_annot.h:866
void SetLineEndStyle(EndingStyle ending_style)
Set line ending style of the end point.
SampleEncodingFormat GetSampleEncodingFormat() const
Get the encoding format for the sample data.
float GetSamplingRate() const
Get the sampling rate, in samples per second.
RGB GetFillColor() const
Get fill color.
String GetMeasureUnit(MeasureType measure_type)
Get the label for displaying the units for measuring.
RGB GetFillColor() const
Get fill color.
Annotation type: screen annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:811
bool operator==(const QuadPoints &quad_points) const
Equal operator.
Definition: fs_annot.h:489
void SetEndPoint(const PointF &point)
Set the end point.
RGB GetMKBackgroundColor() const
Get the background color in the MK dictionary.
objects::PDFDictionary * GetOptionalContent() const
Get the PDF dictionary of annotation's optional content.
bool IsMarkup() const
Check if current annotation is a markup annotation.
~StrikeOut()
Destructor.
Definition: fs_annot.h:2411
ScaleWayType scale_way_type
The circumstances under which the icon should be scaled inside the annotation rectangle....
Definition: fs_annot.h:693
~PolyLine()
Destructor.
Definition: fs_annot.h:3974
DefaultAppearance()
Constructor.
Definition: fs_annot.h:89
Annotation property: fill color.
Definition: fs_annot.h:944
DefaultAppearance(uint32 flags, const common::Font &font, float text_size, RGB text_color)
Constructor, with parameters.
Definition: fs_annot.h:82
ShadingColor(const ShadingColor &shading_color)
Constructor, with another shading color object.
Definition: fs_annot.h:1382
Annotation property: border color.
Definition: fs_annot.h:938
Widget()
Constructor.
Definition: fs_annot.h:4384
float vertical_fraction
The vertical fraction of left-over space to allocate at the left and bottom of the icon.
Definition: fs_annot.h:712
void SetAction(const actions::Action &action)
Set action.
Definition: fs_pdfform.h:1103
Highlight()
Constructor.
Definition: fs_annot.h:2343
float horizontal_fraction
The horizontal fraction of left-over space to allocate at the left and bottom of the icon.
Definition: fs_annot.h:707
Indicates property text color of pdf::DefaultAppearance is meaningful.
Definition: fs_annot.h:62
Annotation flag: toggle no view.
Definition: fs_annot.h:896
void SetFillColor(RGB fill_color)
Set fill color.
~Underline()
Destructor.
Definition: fs_annot.h:2381
Definition: fs_annot.h:3499
Definition: fs_annot.h:3003
Header file for image and bitmap related definitions and classes.
void SetBitmap(const common::Bitmap &bitmap)
Set bitmap to current stamp annotation.
void SetLeaderLineLength(float length)
Set the length of leader line.
Definition: fs_annot.h:4917
FreeText()
Constructor.
Definition: fs_annot.h:2722
BorderInfo & operator=(const BorderInfo &border_info)
Assign operator.
Definition: fs_annot.h:307
void Set(ScaleWayType type, bool is_proportional_scaling, float horizontal_fraction, float vertical_fraction, bool fit_bounds)
Set value.
Definition: fs_annot.h:680
ShadingColor(ARGB firstcolor, ARGB secondcolor)
Constructor, with parameters.
Definition: fs_annot.h:1368
Border style: Solid.
Definition: fs_annot.h:214
~Note()
Destructor.
Definition: fs_annot.h:2133
Type GetType() const
Get actual annotation type of current annotation.
Offset GetCaptionOffset() const
Get caption offset values.
void SetMeasureRatio(const String &ratio)
Set the scale ratio string for measuring.
Annotation flag: no zoom.
Definition: fs_annot.h:859
bool operator!=(const DefaultAppearance &default_appearance) const
Not equal operator.
Definition: fs_annot.h:140
Annotation's rollover appearance.
Definition: fs_annot.h:1034
bool operator!=(const Annot &other) const
Not equal operator.
IconFit(const IconFit &icon_fit)
Constructor, with another icon fit object.
Definition: fs_annot.h:602
float GetLeaderLineExtensionLength() const
Get the length of leader line extension.
MKEntry
Enumeration for annotation's MK dictionary (an appearance characteristics) entry.
Definition: fs_annot.h:952
bool operator==(const char *str1, const CFX_ByteString &str2)
Check if two byte strings are equal.
Definition: fs_basictypes.h:128
common::Rotation GetMKRotation() const
Get the rotation value in the MK dictionary.
String GetMeasureRatio()
Get the scale ratio string for measuring.
void SetInnerRect(const RectF &inner_rect)
Set the inner rectangle.
float GetOpacity() const
Get opacity value.
String GetMeasureRatio()
Get the scale ratio string for measuring.
common::Path GetInkList()
Get ink list data.
Annotation's down appearance.
Definition: fs_annot.h:1036
uint32 flags
Flags to indicate which properties of default appearance are meaningful.
Definition: fs_annot.h:177
ARGB second_color
Second color used for shading. Format: 0xAARRGGBB.
Definition: fs_annot.h:1437
μ-law-encoded samples
Definition: fs_annot.h:5111
void SetMeasureRatio(const String &ratio)
Set the scale ratio string for measuring.
Definition: fs_annot.h:2640
Highlighting mode: Invert, which is to invert the contents of the annotation rectangle.
Definition: fs_annot.h:915
Line()
Constructor.
Definition: fs_annot.h:3010
PointF GetEndPoint() const
Get the end point.
Annotation type: polygon annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:780
void SetMKIconFit(const IconFit &icon_fit)
Set the icon fit information in the MK dictionary.
uint32 GetFlags() const
Get annotation flags.
common::Bitmap GetMKDownIconBitmap()
Get the down icon bitmap in the MK dictionary.
Border style: Beveled.
Definition: fs_annot.h:234
int GetChannelCount() const
Get the count of sound channels.
Circle()
Constructor.
Definition: fs_annot.h:2643
uint32 ARGB
ARGB color type, 32 bits, ((b) | ((g) << 8) | ((r) << 16)) | ((a) << 24)
Definition: fs_basictypes.h:212
void SetMKBorderColor(RGB color)
Set the border color in the MK dictionary.
Highlighting mode: Outline, which is to invert the annotation's border.
Definition: fs_annot.h:917
common::Font font
A font for default appearance. It should be a valid font object when it is useful.
Definition: fs_annot.h:183
void Set(ARGB firstcolor, ARGB secondcolor)
Set value.
Definition: fs_annot.h:1429
MKIconCaptionRelation GetMKIconCaptionRelation() const
Get the relation of icon and caption in the MK dictionary.
common::Rotation GetRotation()
Get the rotation of the image used for the appearance of current screen annotation.
bool Move(const RectF &rect)
Move current annotation to a new position, specified by a new rectangle in PDF coordinate system.
void SetContent(const WString &content)
Set content.
EndingStyle GetLineStartStyle() const
Get line ending style of the start point.
bool is_proportional_scaling
A boolean value which indicates whether use proportional scaling or not.
Definition: fs_annot.h:702
Matrix GetDisplayMatrix(const Matrix &page_display_matrix)
Get the display matrix, from PDF coordinate system to targeted device coordinate system.
bool GetOpenStatus() const
Get open status.
Definition: fs_annot.h:2400
common::Bitmap GetMKNormalIconBitmap()
Get the normal icon bitmap in the MK dictionary.
PointF fourth
Fourth point of quadrilateral, in PDF coordinate system.
Definition: fs_annot.h:530
Popup()
Constructor.
Definition: fs_annot.h:4284
Definition: fs_annot.h:4161
Definition: fs_annot.h:4353
Annot & operator=(const Annot &annot)
Assign operator.
Annotation type: widget annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:809
Annotation type: note annotation, which is just "Text" annotation - one of standard annotation in <PD...
Definition: fs_annot.h:768
virtual void Release()=0
A callback function used to release current callback object itself.
StateModel
Enumeration for markup annotation's state model.
Definition: fs_annot.h:1595
void SetQuadPoints(const QuadPointsArray &quad_points_array)
Set quadrilaterals.
~Squiggly()
Destructor.
Definition: fs_annot.h:2441
void SetAction(const actions::Action &action)
Set action.
~Polygon()
Destructor.
Definition: fs_annot.h:3816
Annotation type: ink annotation. One of standard annotation in <PDF reference 1.7>.
Definition: fs_annot.h:796
Annotation type: link annotation. One of standard annotation in <PDF reference 1.7>.
Definition: fs_annot.h:770
Border color entry. "BC" in MK dictionary.
Definition: fs_annot.h:956
bool fit_bounds
A boolean value that indicates whether to scale button appearance to fit fully within bounds or not.
Definition: fs_annot.h:719
pdf::objects::PDFDictionary * GetMKDict() const
Get the appearance characteristics dictionary (known as "MK" dictionary as well).
PointF second
Second point of quadrilateral, in PDF coordinate system.
Definition: fs_annot.h:526
DefAPFlags
Enumeration for default appearance flags.
Definition: fs_annot.h:58
RGB GetFillColor() const
Get fill color.
Definition: fs_common.h:1879
void SetCaptionPositionType(CapPos cap_position)
Set the position type of caption.
virtual PDFPage GetIcon(Annot::Type annot_type, const char *icon_name, ARGB color)
A callback function used to get the icon as PDF page contents for a specified type.
void SetTitle(const WString &title)
Set title of current screen annotation.
EndingStyle
Enumeration for line ending style.
Definition: fs_annot.h:1650
Definition: fs_annot.h:3400
RGB GetMKBorderColor() const
Get the border color in the MK dictionary.
Caret()
Constructor.
Definition: fs_annot.h:4164
ScaleWayType
Enumeration for the type of icon scaling way.
Definition: fs_annot.h:546
Annotation flag: locked.
Definition: fs_annot.h:890
void SetRotation(common::Rotation rotate)
Set the rotation of the image used for the appearance of current screen annotation.
void SetVertexes(const PointFArray &vertexes)
Set vertexes.
~Ink()
Destructor.
Definition: fs_annot.h:3411
void SetMKNormalCaption(const wchar_t *caption)
Set the normal caption string in the MK dictionary.
Annotation type: pressure sensitive ink annotation.
Definition: fs_annot.h:798
QuadPoints & operator=(const QuadPoints &quad_points)
Assign operator.
Definition: fs_annot.h:474
void SetFillColor(RGB fill_color)
Set fill color.
void SetMeasureRatio(const String &ratio)
Set the scale ratio string for measuring.
Definition: fs_pdfform.h:145
void SetMKNormalIconBitmap(const common::Bitmap &bitmap)
Set a bitmap as normal icon in the MK dictionary.
Definition: fs_annot.h:3005
Rollover icon entry. "RI" in MK dictionary.
Definition: fs_annot.h:983
void RemoveAction()
Remove action.
bool operator!=(const QuadPoints &quad_points) const
Not equal operator.
Definition: fs_annot.h:501
FX_UINT32 uint32
32-bit unsigned integer.
Definition: fs_basictypes.h:198
void SetImage(const common::Image &image, int frame_index, int compress)
Set image to current stamp annotation, with a specified frame index.
void Rotate(common::Rotation rotation)
Rotate current annotation from current state with specified rotation value (in clockwise).
interform::Field GetField()
Get associated form field.
Definition: fs_pdfpage.h:313
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:216
void Rotate(int angle)
Rotate current annotation from current state with specified angle degree in clockwise.
CFX_ByteString String
Byte string.
Definition: fs_basictypes.h:223
bool SetDefaultAppearance(const DefaultAppearance &default_ap)
Set default appearance data.
Border style: Underline.
Definition: fs_annot.h:227
Property
Enumeration for some PDF annotation property.
Definition: fs_annot.h:929
Annotation flag: invisible.
Definition: fs_annot.h:838
Header file for common definitions and classes.
virtual ~Annot()
Destructor.
bool GetOpenStatus() const
Get open status.
Annotation type: trap network annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:815
String GetCompressionFormat() const
Get the name of the sound compression format used on the sample data.
common::Alignment GetAlignment() const
Get alignment value.
QuadPoints(const PointF &first, const PointF &second, const PointF &third, const PointF &fourth)
Constructor, with parameters.
Definition: fs_annot.h:445
Matrix GetTextMatrix() const
Get matrix in default appearance data for text in current free text annotation.
Definition: fs_annot.h:1568
EndingStyle GetLineEndStyle() const
Get line ending style of the end point.
PointF GetStartPoint() const
Get the start point.
interform::Control GetControl()
Get associated form control.
QuadPointsArray GetQuadPoints() const
Get quadrilaterals.
void SetMKRolloverCaption(const wchar_t *caption)
Set the rollover caption string in the MK dictionary.
void SetImage(const common::Image &image, int frame_index, int compress)
Set image to current screen annotation, with a specified frame index.
Definition: fx_coordinates.h:594
common::Bitmap GetMKRolloverIconBitmap()
Get the rollover icon bitmap in the MK dictionary.
void SetMeasureConversionFactor(MeasureType measure_type, float factor)
Set the conversion factor for measuring.
Annotation type: polyline annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:782
Ink()
Constructor.
Definition: fs_annot.h:3403
Caption overlaid directly on the icon.
Definition: fs_annot.h:1022
int GetIndex() const
Get the index of current annotation in the page which current annotation belongs to.
Alignment
Enumeration for alignment (horizontal).
Definition: fs_common.h:293
PointF third
Third point of quadrilateral, in PDF coordinate system.
Definition: fs_annot.h:528
float text_size
Text size for default appearance.
Definition: fs_annot.h:192
Definition: fs_annot.h:2719
void SetCalloutLinePoints(const PointFArray &point_array)
Set points for callout line.
Header file for PDF object related definitions and classes.
Highlighting mode: Toggle. This is only useful for widget annotation.
Definition: fs_annot.h:921
FileSpec GetFileSpec() const
Get the file specification object which represents an external sound file.
Definition: fs_basictypes.h:393
Annotation type: printer's mark annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:813
TextMarkup()
Constructor.
Definition: fs_annot.h:2277
void SetMKDownIconImage(const common::Image &image, int frame_index)
Set an image with specified frame index as down icon in the MK dictionary.
Highlighting mode: No highlighting.
Definition: fs_annot.h:913
Caption to the right of the icon.
Definition: fs_annot.h:1018
void SetOverlayTextAlignment(common::Alignment alignment)
Set alignment value of overlay text.
void SetInnerRect(const RectF &inner_rect)
Set the inner rectangle.
String GetIconName() const
Get icon name.
bool operator==(const Annot &other) const
Equal operator.
String GetMeasureUnit(MeasureType measure_type)
Get the label for displaying the units for measuring.
virtual bool CanChangeColor(Annot::Type annot_type, const char *icon_name)
A callback function used to check if current icon provider supports to change color for a specified t...
Definition: fs_annot.h:1501
WString GetMKRolloverCaption() const
Get the rollover caption string in the MK dictionary.
Definition: fs_filespec.h:38
DefaultAppearance & operator=(const DefaultAppearance &default_appearance)
Assign operator.
Definition: fs_annot.h:112
void SetOpacity(float opacity)
Set opacity value.
PointF first
First point of quadrilateral, in PDF coordinate system.
Definition: fs_annot.h:524
HighlightingMode
Enumeration for PDF annotation highlighting mode.
Definition: fs_annot.h:911
void SetRotation(common::Rotation rotation)
Set rotation value (in clockwise).
FileAttachment()
Constructor.
Definition: fs_annot.h:4215
Annotation type: highlight annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:784
void SetOpenStatus(bool status)
Set open status.
String GetMeasureRatio()
Get the scale ratio string for measuring.
void SetLineEndStyle(EndingStyle ending_style)
Set line ending style of the end point.
A-law-encoded samples.
Definition: fs_annot.h:5113
~BorderInfo()
Destructor.
Definition: fs_annot.h:285
Definition: fs_annot.h:754
QuadPoints(const QuadPoints &quad_points)
Constructor, with another quadrilateral points object.
Definition: fs_annot.h:460
bool RemoveProperty(Property property)
Remove a specified annotation's property.
objects::PDFDictionary * GetDict() const
Get annotation's dictionary object.
Polygon()
Constructor.
Definition: fs_annot.h:3808
Annotation type: sound annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:802
Annotation type: strikeout annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:790
Definition: fs_common.h:1315
void SetStartPoint(const PointF &point)
Set the start point.
Definition: fs_pdfobject.h:763
WString GetOverlayText() const
Get the overlay text.
bool SetFileSpec(const FileSpec &file_spec)
Set a file specification, which should specify an embedded file.
Rotation
Enumeration for rotation.
Definition: fs_common.h:275
Icon fit information entry. "IF" in MK dictionary.
Definition: fs_annot.h:993
PSInk()
Constructor.
Definition: fs_annot.h:4356
Foxit namespace.
Definition: fs_compare.h:27
virtual bool HasIcon(Annot::Type annot_type, const char *icon_name)
A callback function used to check if current icon provider supports icon for a specified type.
Definition: fs_annot.h:1488
Annotation type: underline annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:786
~PSInk()
Destructor.
Definition: fs_annot.h:4366
Definition: fs_action.h:418
RGB text_color
Text color for default appearance. Format: 0xRRGGBB.
Definition: fs_annot.h:198
Rotation entry. "R" in MK dictionary.
Definition: fs_annot.h:954
void SetMKDownCaption(const wchar_t *caption)
Set the down caption string in the MK dictionary.
BYTE STRING CLASS.
Definition: fx_string.h:317
WString GetMKDownCaption() const
Get the down caption string in the MK dictionary.
float GetLeaderLineLength() const
Get the length of leader line.
common::Alignment GetOverlayTextAlignment() const
Get alignment value of overlay text.
Annotation type: line annotation. One of standard annotation in <PDF reference 1.7>.
Definition: fs_annot.h:774
Squiggly()
Constructor.
Definition: fs_annot.h:2433
bool operator==(const DefaultAppearance &default_appearance) const
Equal operator.
Definition: fs_annot.h:127
Border style: Cloudy.
Definition: fs_annot.h:248
void SetMKBackgroundColor(RGB color)
Set the background color in the MK dictionary.
void RemoveMKEntry(MKEntry mk_entry)
Remove a specified entry from the MK dictionary.
void SetMKRotation(common::Rotation rotation)
Set the rotation value in the MK dictionary.
void SetVertexes(const PointFArray &vertexes)
Set vertexes.
AppearanceType
Enumeration for the type of annotation's appearance.
Definition: fs_annot.h:1030
Indicates property font of pdf::DefaultAppearance is meaningful.
Definition: fs_annot.h:60
float dash_phase
Dash phase.
Definition: fs_annot.h:414
int GetBits() const
Get the number of bits per sample value per channel.
Style style
Border style. Please refer to values starting from BorderInfo::e_Solid and this should be one of thes...
Definition: fs_annot.h:394
CapPos GetCaptionPositionType() const
Get the position type of caption.
Annotation type: caret annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:794
~Square()
Destructor.
Definition: fs_annot.h:2583
Definition: fs_annot.h:4281
void SetModifiedDateTime(const DateTime &date_time)
Set last modified date time.
Annotation type: 3D annotation. One of standard annotation in <PDF reference 1.7>.
Definition: fs_annot.h:819
bool SetDefaultAppearance(const DefaultAppearance &default_ap)
Set default appearance data.
Border style: Inset.
Definition: fs_annot.h:241
No icon; captin only.
Definition: fs_annot.h:1010
void SetBorderInfo(const BorderInfo &border)
Set border information.
~Circle()
Destructor.
Definition: fs_annot.h:2651
void SetApplyFillColor(RGB fill_color)
Set the filling color which is used for rollover appearance and will be used after redaction is appli...
EndingStyle GetCalloutLineEndingStyle() const
Get line ending style of the start point in a callout line.
Definition: fs_annot.h:3963
bool operator!=(const char *str1, const CFX_ByteString &str2)
Check if two byte strings are not equal.
Definition: fs_basictypes.h:140
BorderInfo()
Constructor.
Definition: fs_annot.h:278
RectF GetInnerRect() const
Get the inner rectangle.
void SetLineStartStyle(EndingStyle ending_style)
Set line ending style of the start point.
Annotation type: watermark annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:817
String GetIconName() const
Get icon name.
EndingStyle GetLineStartStyle() const
Get line ending style of the start point.
void SetUniqueID(const WString &unique_id)
Set unique ID.
void SetMeasureUnit(MeasureType measure_type, const String &unit)
Set the label for displaying the units for measuring.
Definition: fx_coordinates.h:1074
PointFArray GetVertexes()
Get vertexes.
SampleEncodingFormat
Enumeration for encoding format of sound sample data.
Definition: fs_annot.h:5105
void Set(uint32 flags, const common::Font &font, float text_size, RGB text_color)
Set value.
Definition: fs_annot.h:163
void SetMeasureUnit(MeasureType measure_type, const String &unit)
Set the label for displaying the units for measuring.
Definition: fs_annot.h:2994
RGB GetFillColor() const
Get fill color.
void SetRotation(int angle)
Set rotation angle (in clockwise).
~FileAttachment()
Destructor.
Definition: fs_annot.h:4223
void SetLeaderLineExtensionLength(float extension_length)
Set the length of leader line extension.
void SetInnerRect(const RectF &inner_rect)
Set the inner rectangle.
Definition: fs_annot.h:435
RGB GetBorderColor() const
Get border color.
Definition: fs_annot.h:2430
String GetIconName() const
Get icon name.
virtual float GetDisplayWidth(Annot::Type annot_type, const char *icon_name)
A callback function used to get the width for display of a specified icon, in device size(pixel norma...
Definition: fs_annot.h:1545
virtual float GetDisplayHeight(Annot::Type annot_type, const char *icon_name)
A callback function used to get the height for display of a specified icon, in device size(pixel norm...
Definition: fs_annot.h:1558
Annotation type: circle annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:778
WString GetTitle() const
Get title of current screen annotation.
Caption to the left of the icon.
Definition: fs_annot.h:1020
void SetInnerRect(const RectF &inner_rect)
Set the inner rectangle.
CapPos
Enumeration for the position type of caption.
Definition: fs_annot.h:3001
Indicates property text size of pdf::DefaultAppearance is meaningful.
Definition: fs_annot.h:64
Note()
Constructor.
Definition: fs_annot.h:2123
Stamp()
Constructor.
Definition: fs_annot.h:3502
ShadingColor()
Constructor.
Definition: fs_annot.h:1373
virtual String GetProviderID()
A callback function used to get provider ID.
Definition: fs_annot.h:1465
~Markup()
Destructor.
Definition: fs_annot.h:1710
void SetCaptionOffset(const Offset &offset)
Set caption offset values.
Definition: fs_annot.h:2340
Normal caption entry. "CA" in MK dictionary.
Definition: fs_annot.h:963
Down caption (or alternate caption) entry. "AC" in MK dictionary.
Definition: fs_annot.h:973
String GetMeasureUnit(MeasureType measure_type)
Get the label for displaying the units for measuring.
~TextMarkup()
Destructor.
Definition: fs_annot.h:2285
Background color entry. "BG" in MK dictionary.
Definition: fs_annot.h:958
void RemoveAction()
Remove action.
void SetMKDownIconBitmap(const common::Bitmap &bitmap)
Set the down icon bitmap in the MK dictionary.
float GetMeasureConversionFactor(MeasureType measure_type)
Get the conversion factor for measuring.
RectF GetRect() const
Get rectangle, in PDF coordinate system.
QuadPoints()
Constructor.
Definition: fs_annot.h:453
Annotation flag: locked contents.
Definition: fs_annot.h:903
Annotation type: stamp annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:792
Definition: fs_image.h:430
Annotation flag: hidden.
Definition: fs_annot.h:844
Definition: fs_annot.h:5098
Border style: Dashed.
Definition: fs_annot.h:221
void SetState(State state)
Set the state.
void SetStyleFillColor(RGB color)
Set fill color for ending styles.
bool ResetAppearanceStream()
Reset appearance stream.
Definition: fx_coordinates.h:769
void SetLeaderLineOffset(float offset)
Set the length of leader line offset.
Highlighting mode: Push, which is to display the annotation's down appearance, if any.
Definition: fs_annot.h:919
BorderInfo(float width, Style style, float intensity, float dash_phase, const FloatArray &dashes)
Constructor, with parameters.
Definition: fs_annot.h:269