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);
1312 
1322  bool HasProperty(Property property) const;
1323 
1341  bool RemoveProperty(Property property);
1342 
1349 
1365  objects::PDFStream* GetAppearanceStream(AppearanceType type, const char* appearance_state = "") const;
1366 };
1367 
1369 FSDK_DEFINE_ARRAY(AnnotArray, Annot)
1370 
1371 
1372 class ShadingColor FS_FINAL : public Object {
1373  public:
1380  ShadingColor(ARGB firstcolor, ARGB secondcolor)
1381  : first_color(firstcolor)
1382  , second_color(secondcolor) {}
1383 
1386  : first_color(0xFFFFFFFF)
1387  , second_color(0xFFFFFFFF) {}
1388 
1394  ShadingColor(const ShadingColor& shading_color)
1395  : first_color(shading_color.first_color)
1396  , second_color(shading_color.second_color) {}
1397 
1405  ShadingColor& operator = (const ShadingColor& shading_color) {
1406  this->first_color = shading_color.first_color;
1407  this->second_color = shading_color.second_color;
1408  return *this;
1409  }
1410 
1418  bool operator == (const ShadingColor& shading_color) const {
1419  return (first_color == shading_color.first_color && second_color == shading_color.second_color);
1420  }
1421 
1429  bool operator != (const ShadingColor& shading_color) const {
1430  return (first_color != shading_color.first_color || second_color != shading_color.second_color);
1431  }
1432 
1441  void Set(ARGB firstcolor, ARGB secondcolor) {
1442  this->first_color = firstcolor;
1443  this->second_color = secondcolor;
1444  }
1445 
1450 };
1451 
1462  public:
1468  virtual void Release() = 0;
1477  virtual String GetProviderID() {
1478  return String();
1479  }
1489  return String();
1490  }
1500  virtual bool HasIcon(Annot::Type annot_type, const char* icon_name) {
1501  return false;
1502  }
1513  virtual bool CanChangeColor(Annot::Type annot_type, const char* icon_name) {
1514  return false;
1515  }
1516 #ifndef __EMSCRIPTEN_RENDER__
1517 
1527  virtual PDFPage GetIcon(Annot::Type annot_type, const char* icon_name, ARGB color);
1528 #endif
1529 
1543  virtual bool GetShadingColor(Annot::Type annot_type, const char* icon_name,
1544  RGB referenced_color, int shading_index, ShadingColor& out_shading_color) {
1545  return false;
1546  }
1557  virtual float GetDisplayWidth(Annot::Type annot_type, const char* icon_name) {
1558  return 0.0f;
1559  }
1570  virtual float GetDisplayHeight(Annot::Type annot_type, const char* icon_name) {
1571  return 0.0f;
1572  }
1573 
1574  protected:
1575  ~IconProviderCallback() {}
1576 };
1577 
1578 class Markup;
1580 FSDK_DEFINE_ARRAY(MarkupArray, Markup)
1581 
1582 
1600 class Markup : public Annot {
1601  public:
1607  typedef enum _StateModel {
1609  e_StateModelMarked = 1,
1611  e_StateModelReview = 2
1612  } StateModel;
1613 
1619  typedef enum _State {
1624  e_StateMarked = 1,
1629  e_StateUnmarked = 2,
1634  e_StateAccepted = 3,
1639  e_StateRejected = 4,
1644  e_StateCancelled = 5,
1649  e_StateCompleted = 6,
1654  e_StateNone = 7
1655  } State;
1656 
1662  typedef enum _EndingStyle {
1664  e_EndingStyleNone = 0,
1666  e_EndingStyleSquare = 1,
1668  e_EndingStyleCircle = 2,
1670  e_EndingStyleDiamond = 3,
1672  e_EndingStyleOpenArrow = 4,
1678  e_EndingStyleClosedArrow = 5,
1680  e_EndingStyleButt = 6,
1682  e_EndingStyleROpenArrow = 7,
1684  e_EndingStyleRClosedArrow = 8,
1686  e_EndingStyleSlash = 9
1687  } EndingStyle;
1688 
1694  typedef enum _MeasureType {
1696  e_MeasureTypeX = 0,
1698  e_MeasureTypeY = 1,
1700  e_MeasureTypeD = 2,
1702  e_MeasureTypeA = 3,
1704  e_MeasureTypeT = 4,
1706  e_MeasureTypeS = 5
1707  } MeasureType;
1708 
1709 
1715  explicit Markup(const Annot& annot);
1716  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1717  explicit Markup(FS_HANDLE handle);
1719  Markup() {}
1720 
1722  ~Markup() {}
1723 
1741  Popup GetPopup();
1758  void SetPopup(const Popup& popup);
1764  WString GetTitle() const;
1772  void SetTitle(const WString& title);
1778  WString GetSubject() const;
1786  void SetSubject(const WString& subject);
1795  float GetOpacity() const;
1808  void SetOpacity(float opacity);
1830  String GetIntent() const;
1866  void SetIntent(const String& intent);
1873  DateTime GetCreationDateTime() const;
1881  void SetCreationDateTime(const DateTime& date_time);
1887  int GetReplyCount();
1896  Note GetReply(int index) const;
1902  Note AddReply();
1913  bool RemoveReply(int index);
1919  bool RemoveAllReplies();
1920 
1937  bool IsGrouped();
1938 
1957  Markup GetGroupHeader();
1958 
1975  MarkupArray GetGroupElements();
1976 
1992  bool Ungroup();
1993 
2015  int GetStateAnnotCount(StateModel model);
2016 
2041  Note GetStateAnnot(StateModel model, int index);
2042 
2095  Note AddStateAnnot(StateModel model, State state);
2096 
2106  bool RemoveAllStateAnnots();
2107 
2108 };
2109 
2132 class Note FS_FINAL : public Markup {
2133  public:
2135  Note() {}
2141  explicit Note(const Annot& annot);
2142  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
2143  explicit Note(FS_HANDLE handle);
2145  ~Note() {}
2146 
2159  bool GetOpenStatus() const;
2174  void SetOpenStatus(bool status);
2186  String GetIconName() const;
2204  void SetIconName(const char* icon_name);
2214  Markup GetReplyTo();
2221  bool IsStateAnnot();
2222 
2235 
2247  State GetState();
2248 
2271  void SetState(State state);
2272 
2273 };
2274 
2286 class TextMarkup: public Markup {
2287  public:
2295  explicit TextMarkup(const Annot& annot);
2298 
2333  void SetQuadPoints(const QuadPointsArray& quad_points_array);
2334 };
2335 
2352 class Highlight FS_FINAL : public TextMarkup {
2353  public:
2361  explicit Highlight(const Annot& annot);
2364 };
2365 
2382 class Underline FS_FINAL : public TextMarkup {
2383  public:
2391  explicit Underline(const Annot& annot);
2394 };
2395 
2412 class StrikeOut FS_FINAL : public TextMarkup {
2413  public:
2421  explicit StrikeOut(const Annot& annot);
2424 };
2425 
2442 class Squiggly FS_FINAL : public TextMarkup {
2443  public:
2451  explicit Squiggly(const Annot& annot);
2454 };
2455 
2469 class Link FS_FINAL : public Annot {
2470  public:
2472  Link() {}
2478  explicit Link(const Annot& annot);
2479  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
2480  explicit Link(FS_HANDLE handle);
2482  ~Link() {}
2483 
2516  void SetQuadPoints(const QuadPointsArray& quad_points_array);
2517 
2526 
2537 
2545 
2560  void SetAction(const actions::Action& action);
2561 
2567  bool RemoveAction();
2568 };
2569 
2584 class Square FS_FINAL : public Markup {
2585  public:
2587  Square() {}
2593  explicit Square(const Annot& annot);
2595  ~Square() {}
2596 
2603  RGB GetFillColor() const;
2604 
2612  void SetFillColor(RGB fill_color);
2613 
2623  RectF GetInnerRect() const;
2635  void SetInnerRect(const RectF& inner_rect);
2636 };
2637 
2652 class Circle FS_FINAL : public Markup {
2653  public:
2655  Circle() {}
2661  explicit Circle(const Annot& annot);
2663  ~Circle() {}
2664 
2671  RGB GetFillColor() const;
2672 
2683  void SetFillColor(RGB fill_color);
2684 
2694  RectF GetInnerRect() const;
2695 
2709  void SetInnerRect(const RectF& inner_rect);
2710 };
2711 
2731 class FreeText FS_FINAL : public Markup {
2732  public:
2740  explicit FreeText(const Annot& annot);
2743 
2754  RGB GetFillColor() const;
2768  void SetFillColor(RGB fill_color);
2769 
2779 
2793  void SetAlignment(common::Alignment alignment);
2794 
2805  RectF GetInnerRect() const;
2806 
2821  void SetInnerRect(const RectF& inner_rect);
2822 
2832 
2855  bool SetDefaultAppearance(const DefaultAppearance& default_ap);
2856 
2868 
2883  void SetCalloutLineEndingStyle(EndingStyle ending_style);
2884 
2899 
2922  void SetCalloutLinePoints(const PointFArray& point_array);
2923 
2936  void SetTextMatrix(const Matrix& text_matrix);
2937 
2946  Matrix GetTextMatrix() const;
2947 
2955 
2970  void SetRotation(common::Rotation rotation);
2971 
2984  void Rotate(common::Rotation rotation);
2985 
2986 };
2987 
3006 class Line FS_FINAL : public Markup {
3007  public:
3013  typedef enum _CapPos {
3018  } CapPos;
3019 
3020 
3022  Line() {}
3028  explicit Line(const Annot& annot);
3030  ~Line() {}
3031 
3053  void SetLineStartStyle(EndingStyle ending_style);
3062  EndingStyle GetLineEndStyle() const;
3075  void SetLineEndStyle(EndingStyle ending_style);
3076 
3087  RGB GetStyleFillColor() const;
3088 
3102  void SetStyleFillColor(RGB color);
3103 
3112  PointF GetStartPoint() const;
3125  void SetStartPoint(const PointF& point);
3126 
3135  PointF GetEndPoint() const;
3148  void SetEndPoint(const PointF& point);
3149 
3158  bool HasCaption() const;
3171  void EnableCaption(bool cap);
3172 
3200  void SetCaptionPositionType(CapPos cap_position);
3213  Offset GetCaptionOffset() const;
3229  void SetCaptionOffset(const Offset& offset);
3230 
3245  float GetLeaderLineLength() const;
3263  void SetLeaderLineLength(float length);
3273  float GetLeaderLineExtensionLength() const;
3286  void SetLeaderLineExtensionLength(float extension_length);
3287 
3298  float GetLeaderLineOffset() const;
3312  void SetLeaderLineOffset(float offset);
3313 
3327  void SetMeasureRatio(const String& ratio);
3328 
3339 
3350 
3363  void SetMeasureUnit(MeasureType measure_type, const String& unit);
3364 
3376  String GetMeasureUnit(MeasureType measure_type);
3377 
3389  WString GetMeasureUnitW(MeasureType measure_type);
3390 
3403  void SetMeasureConversionFactor(MeasureType measure_type, float factor);
3404 
3416  float GetMeasureConversionFactor(MeasureType measure_type);
3417 };
3418 
3436 class Ink FS_FINAL : public Markup {
3437  public:
3439  Ink() {}
3445  explicit Ink(const Annot& annot);
3447  ~Ink() {}
3475 
3508  void SetInkList(const common::Path& ink_list);
3509 };
3510 
3535 class Stamp FS_FINAL : public Markup {
3536  public:
3538  Stamp() {}
3544  explicit Stamp(const Annot& annot);
3545 #ifndef __EMSCRIPTEN_RENDER__
3546 
3547  ~Stamp();
3548 #endif
3549 
3560  String GetIconName() const;
3583  void SetIconName(const char* icon_name);
3594  void SetBitmap(const common::Bitmap& bitmap);
3595 
3618  void SetImage(const common::Image& image, int frame_index, int compress);
3619 
3630  void SetRotation(int angle);
3631 
3637  int GetRotation();
3638 
3648  void Rotate(int angle);
3649 };
3650 
3663 class Screen FS_FINAL : public Annot {
3664  public:
3666  Screen() {}
3672  explicit Screen(const Annot& annot);
3674  virtual ~Screen() {}
3675 
3698  void SetImage(const common::Image& image, int frame_index, int compress);
3699 
3709 
3717 
3730  void SetRotation(common::Rotation rotate);
3731 
3739 
3748  float GetOpacity() const;
3761  void SetOpacity(float opacity);
3762 
3768  WString GetTitle() const;
3776  void SetTitle(const WString& title);
3777 
3811  void SetAction(const actions::Action& action);
3820  void RemoveAction();
3821 };
3822 
3841 class Polygon FS_FINAL : public Markup {
3842  public:
3844  Polygon() {}
3850  explicit Polygon(const Annot& annot);
3861  RGB GetFillColor() const;
3862 
3874  void SetFillColor(RGB fill_color);
3875 
3885 
3897  void SetVertexes(const PointFArray& vertexes);
3898 
3912  void SetMeasureRatio(const String& ratio);
3913 
3924 
3935 
3948  void SetMeasureUnit(MeasureType measure_type, const String& unit);
3949 
3961  String GetMeasureUnit(MeasureType measure_type);
3962 
3974  WString GetMeasureUnitW(MeasureType measure_type);
3975 
3988  void SetMeasureConversionFactor(MeasureType measure_type, float factor);
3989 
4001  float GetMeasureConversionFactor(MeasureType measure_type);
4002 };
4003 
4023 class PolyLine FS_FINAL : public Markup {
4024  public:
4032  explicit PolyLine(const Annot& annot);
4045  RGB GetStyleFillColor() const;
4057  void SetStyleFillColor(RGB fill_color);
4058 
4068 
4080  void SetVertexes(const PointFArray& vertexes);
4103  void SetLineStartStyle(EndingStyle starting_style);
4112  EndingStyle GetLineEndStyle() const;
4126  void SetLineEndStyle(EndingStyle ending_style);
4127 
4141  void SetMeasureRatio(const String& ratio);
4142 
4153 
4164 
4177  void SetMeasureUnit(MeasureType measure_type, const String& unit);
4178 
4190  String GetMeasureUnit(MeasureType measure_type);
4191 
4203  WString GetMeasureUnitW(MeasureType measure_type);
4204 
4217  void SetMeasureConversionFactor(MeasureType measure_type, float factor);
4218 
4230  float GetMeasureConversionFactor(MeasureType measure_type);
4231 };
4232 
4245 class Caret FS_FINAL : public Markup {
4246  public:
4248  Caret() {}
4254  explicit Caret(const Annot& annot);
4256  ~Caret() {}
4257 
4267  RectF GetInnerRect() const;
4281  void SetInnerRect(const RectF& inner_rect);
4282 };
4283 
4296 class FileAttachment FS_FINAL : public Markup {
4297  public:
4305  explicit FileAttachment(const Annot& annot);
4308 
4316  bool SetFileSpec(const FileSpec& file_spec);
4317 
4325 
4336  String GetIconName() const;
4337 
4353  void SetIconName(const char* icon_name);
4354 };
4355 
4365 class Popup FS_FINAL : public Annot {
4366  public:
4368  Popup() {}
4374  explicit Popup(const Annot& annot);
4375  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
4376  explicit Popup(FS_HANDLE handle);
4378  ~Popup() {}
4379 
4392  bool GetOpenStatus() const;
4407  void SetOpenStatus(bool status);
4408 
4416  Markup GetParent();
4417 };
4418 #ifndef __FSDK_NO_PSINK__
4419 
4437 class PSInk FS_FINAL : public Annot {
4438  public:
4440  PSInk() {}
4446  explicit PSInk(const Annot& annot);
4447  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
4448  explicit PSInk(FS_HANDLE handle);
4450  ~PSInk() {}
4451 };
4452 #endif
4453 
4465 class Widget FS_FINAL : public Annot {
4466  public:
4468  Widget() {}
4474  explicit Widget(const Annot& annot);
4475  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
4476  explicit Widget(FS_HANDLE handle);
4477 #ifndef __EMSCRIPTEN_RENDER__
4478 
4479  ~Widget();
4480 #endif
4481 
4487 
4494 
4505 
4518 
4529 
4553  void SetAction(const actions::Action& action);
4554 
4563  void RemoveAction();
4564 
4576  bool HasMKEntry(MKEntry mk_entry);
4588  void RemoveMKEntry(MKEntry mk_entry);
4614  void SetMKRotation(common::Rotation rotation);
4625  RGB GetMKBorderColor() const;
4636  void SetMKBorderColor(RGB color);
4647  RGB GetMKBackgroundColor() const;
4658  void SetMKBackgroundColor(RGB color);
4672  WString GetMKNormalCaption() const;
4686  void SetMKNormalCaption(const wchar_t* caption);
4701  WString GetMKRolloverCaption() const;
4702 
4717  void SetMKRolloverCaption(const wchar_t* caption);
4718 
4732  WString GetMKDownCaption() const;
4733 
4747  void SetMKDownCaption(const wchar_t* caption);
4748 
4762 
4776  void SetMKNormalIconBitmap(const common::Bitmap& bitmap);
4777 
4793  void SetMKNormalIconImage(const common::Image& image, int frame_index);
4794 
4809 
4824  void SetMKRolloverIconBitmap(const common::Bitmap& bitmap);
4825 
4842  void SetMKRolloverIconImage(const common::Image& image, int frame_index);
4843 
4857 
4871  void SetMKDownIconBitmap(const common::Bitmap& bitmap);
4872 
4888  void SetMKDownIconImage(const common::Image& image, int frame_index);
4889 
4903  IconFit GetMKIconFit() const;
4921  void SetMKIconFit(const IconFit& icon_fit);
4922 
4937 
4954 
4962  void SetAppearanceState(const String& appearance_state);
4963 
4969  String GetAppearanceState() const;
4970 
4977 
4978 #ifdef _SUPPORTWEBSDK_
4979  //Set push button icon form icon stream. stream is from doc::createIcon.
4980  //face: 0: normal, 1: down, 2: roller
4981  void SetButtonIcon(objects::PDFStream* icon, int face);
4982 #endif
4983 };
4984 
5001 class Redact FS_FINAL : public Markup {
5002  public:
5004  Redact() {}
5010  explicit Redact(const Annot& annot);
5011  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
5012  explicit Redact(FS_HANDLE handle);
5013 #ifndef __EMSCRIPTEN_RENDER__
5014 
5015  ~Redact();
5016 #endif
5017 
5031 
5050  void SetQuadPoints(const QuadPointsArray& quad_points_array);
5051 
5058  RGB GetFillColor() const;
5066  void SetFillColor(RGB fill_color);
5067 
5074  RGB GetApplyFillColor() const;
5075 
5083  void SetApplyFillColor(RGB fill_color);
5084 
5090  WString GetOverlayText() const;
5091 
5099  void SetOverlayText(const WString& overlay_text);
5100 
5110 
5124 
5134 
5157  bool SetDefaultAppearance(const DefaultAppearance& default_ap);
5158 
5170  bool Apply();
5171 };
5172 
5182 class Sound FS_FINAL : public Markup{
5183  public:
5189  typedef enum _SampleEncodingFormat {
5199 
5200 
5202  Sound() {}
5203 
5209  explicit Sound(const Annot& annot);
5210 
5211  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
5212  explicit Sound(FS_HANDLE handle);
5213 
5214 #ifndef __EMSCRIPTEN_RENDER__
5215 
5216  ~Sound();
5217 #endif
5218 
5231 
5237  float GetSamplingRate() const;
5238 
5244  int GetChannelCount() const;
5245 
5251  int GetBits() const;
5252 
5260 
5266  String GetCompressionFormat() const;
5267 
5281  FileSpec GetFileSpec() const;
5282 };
5283 
5284 } // namespace annots
5285 } // namespace pdf
5286 } // namespace foxit
5287 
5288 #endif // FS_ANNOT_H_
5289 
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:1461
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:3030
Square()
Constructor.
Definition: fs_annot.h:2587
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:2742
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:1619
Definition: fs_annot.h:1372
Definition: fs_annot.h:2286
Definition: fs_annot.h:2382
~Popup()
Destructor.
Definition: fs_annot.h:4378
String GetAppearanceState() const
Get the annotation's appearance state, which selects the applicable appearance stream from an appeara...
Definition: fs_annot.h:3663
Redact()
Constructor.
Definition: fs_annot.h:5004
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
bool HasProperty(Property property) const
Whether current annotation has the specified annotation's property.
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:4296
Markup()
Constructor.
Definition: fs_annot.h:1719
PDFPage GetPage() const
Get the related PDF page.
WString GetContent() const
Get content.
Twos-complement values.
Definition: fs_annot.h:5193
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:5191
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:2415
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:4026
ARGB first_color
First color used for shading. Format: 0xAARRGGBB.
Definition: fs_annot.h:1447
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:1369
void SetOverlayText(const WString &overlay_text)
Set the overlay text.
Screen()
Constructor.
Definition: fs_annot.h:3666
Sound()
Constructor.
Definition: fs_annot.h:5202
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
Definition: fs_basictypes.h:432
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:2363
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:1543
virtual String GetProviderVersion()
A callback function used to get provider version.
Definition: fs_annot.h:1488
Definition: fs_annot.h:2584
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:1694
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:1600
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:4256
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:2385
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
WString GetMeasureUnitW(MeasureType measure_type)
Get the label (in Unicode string) for displaying the units for measuring.
void SetMKDict(pdf::objects::PDFDictionary *dict)
Set the appearance characteristics dictionary (known as "MK" dictionary as well).
Definition: fs_annot.h:4465
RGB GetFillColor() const
Get fill color.
Definition: fs_annot.h:3841
WIDE STRING CLASS.
Definition: fx_string.h:1452
void SetOpenStatus(bool status)
Set open status.
Definition: fs_annot.h:2132
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
WString GetMeasureUnitW(MeasureType measure_type)
Get the label (in Unicode string) for displaying the units for measuring.
bool IsEmpty() const
Check whether current object is empty or not.
virtual ~Screen()
Destructor.
Definition: fs_annot.h:3674
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:2423
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:4034
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:1394
Annotation property: border color.
Definition: fs_annot.h:938
Widget()
Constructor.
Definition: fs_annot.h:4468
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.
WString GetMeasureRatioW()
Get the scale ratio string for measuring.
Definition: fs_pdfform.h:1103
Highlight()
Constructor.
Definition: fs_annot.h:2355
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:2393
Definition: fs_annot.h:3535
Definition: fs_annot.h:3015
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:5001
FreeText()
Constructor.
Definition: fs_annot.h:2734
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:1380
Border style: Solid.
Definition: fs_annot.h:214
~Note()
Destructor.
Definition: fs_annot.h:2145
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
Annotation's rollover appearance.
Definition: fs_annot.h:1034
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:1449
μ-law-encoded samples
Definition: fs_annot.h:5195
void SetMeasureRatio(const String &ratio)
Set the scale ratio string for measuring.
Definition: fs_annot.h:2652
Highlighting mode: Invert, which is to invert the contents of the annotation rectangle.
Definition: fs_annot.h:915
Line()
Constructor.
Definition: fs_annot.h:3022
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:2655
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:1441
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 operator !=(const QuadPoints &quad_points) const
Not equal operator.
Definition: fs_annot.h:501
WString GetMeasureRatioW()
Get the scale ratio Unicode string for measuring.
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:2412
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:4368
Definition: fs_annot.h:4245
Definition: fs_annot.h:4437
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:1607
void SetQuadPoints(const QuadPointsArray &quad_points_array)
Set quadrilaterals.
~Squiggly()
Destructor.
Definition: fs_annot.h:2453
void SetAction(const actions::Action &action)
Set action.
~Polygon()
Destructor.
Definition: fs_annot.h:3852
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:1982
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:1662
Definition: fs_annot.h:3436
RGB GetMKBorderColor() const
Get the border color in the MK dictionary.
Caret()
Constructor.
Definition: fs_annot.h:4248
ScaleWayType
Enumeration for the type of icon scaling way.
Definition: fs_annot.h:546
bool operator !=(const BorderInfo &border_info) const
Not equal operator.
Definition: fs_annot.h:343
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:3447
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.
WString GetMeasureUnitW(MeasureType measure_type)
Get the label for displaying the units for measuring.
Definition: fs_annot.h:3017
Rollover icon entry. "RI" in MK dictionary.
Definition: fs_annot.h:983
void RemoveAction()
Remove action.
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:342
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:1580
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:596
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:3439
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:362
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:2731
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:399
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:2289
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:1513
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:4299
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:5197
~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:3844
Annotation type: sound annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:802
bool operator !=(const Annot &other) const
Not equal operator.
Annotation type: strikeout annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:790
Definition: fs_common.h:1418
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:344
Icon fit information entry. "IF" in MK dictionary.
Definition: fs_annot.h:993
PSInk()
Constructor.
Definition: fs_annot.h:4440
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:1500
Annotation type: underline annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:786
~PSInk()
Destructor.
Definition: fs_annot.h:4450
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:2445
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.
bool operator !=(const DefaultAppearance &default_appearance) const
Not equal operator.
Definition: fs_annot.h:140
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:2595
Definition: fs_annot.h:4365
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:2663
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:4023
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:1076
PointFArray GetVertexes()
Get vertexes.
SampleEncodingFormat
Enumeration for encoding format of sound sample data.
Definition: fs_annot.h:5189
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:3006
RGB GetFillColor() const
Get fill color.
void SetRotation(int angle)
Set rotation angle (in clockwise).
~FileAttachment()
Destructor.
Definition: fs_annot.h:4307
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:2442
String GetIconName() const
Get icon name.
WString GetMeasureRatioW()
Get the scale ratio Unicode string for measuring.
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:1557
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:1570
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:3013
Indicates property text size of pdf::DefaultAppearance is meaningful.
Definition: fs_annot.h:64
Note()
Constructor.
Definition: fs_annot.h:2135
Stamp()
Constructor.
Definition: fs_annot.h:3538
ShadingColor()
Constructor.
Definition: fs_annot.h:1385
virtual String GetProviderID()
A callback function used to get provider ID.
Definition: fs_annot.h:1477
~Markup()
Destructor.
Definition: fs_annot.h:1722
void SetCaptionOffset(const Offset &offset)
Set caption offset values.
Definition: fs_annot.h:2352
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:2297
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:5182
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:771
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