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 
82  : flags(flags)
83  , font(font)
86 
89  : flags(0)
90  , text_size(0)
91  , text_color(0x000000) {}
92 
98  DefaultAppearance(const DefaultAppearance& default_appearance)
99  : flags(default_appearance.flags)
100  , font(default_appearance.font)
101  , text_size(default_appearance.text_size)
102  , text_color(default_appearance.text_color) {}
103 
111  DefaultAppearance& operator = (const DefaultAppearance& default_appearance) {
112  flags = default_appearance.flags;
113  font = default_appearance.font;
114  text_size = default_appearance.text_size;
115  text_color = default_appearance.text_color;
116  return *this;
117  }
118 
126  bool operator == (const DefaultAppearance& default_appearance) const {
127  return (flags == default_appearance.flags && font == default_appearance.font &&
128  fabs(text_size-default_appearance.text_size) <= FLT_EPSILON &&
129  text_color == default_appearance.text_color);
130  }
131 
139  bool operator != (const DefaultAppearance& default_appearance) const {
140  return (flags != default_appearance.flags || font != default_appearance.font ||
141  fabs(text_size - default_appearance.text_size) > FLT_EPSILON ||
142  text_color != default_appearance.text_color);
143  }
144 
162  this->flags = flags;
163  this->font = font;
164  this->text_size = text_size;
165  this->text_color = text_color;
166  }
167 
187  float text_size;
194 };
198 namespace annots {
200 class BorderInfo FS_FINAL : public Object {
201  public:
207  typedef enum _Style {
209  e_Solid = 0,
216  e_Dashed = 1,
236  e_Inset = 4,
244  } Style;
245 
246 
264  BorderInfo(float width, Style style, float intensity, float dash_phase, const FloatArray& dashes) {
265  this->width = width;
266  this->style = style;
267  this->cloud_intensity = intensity;
268  this->dash_phase = dash_phase;
269  this->dashes = dashes;
270  }
271 
274  : width(1.0f)
276  , cloud_intensity(0)
277  , dash_phase(0) {}
278 
281 
287  BorderInfo(const BorderInfo& border_info) {
288  this->width = border_info.width;
289  this->style = border_info.style;
290  this->cloud_intensity = border_info.cloud_intensity;
291  this->dash_phase = border_info.dash_phase;
292  this->dashes = border_info.dashes;
293  }
294 
302  BorderInfo& operator = (const BorderInfo& border_info) {
303  this->width = border_info.width;
304  this->style = border_info.style;
305  this->cloud_intensity = border_info.cloud_intensity;
306  this->dash_phase = border_info.dash_phase;
307  this->dashes = border_info.dashes;
308  return *this;
309  }
310 
318  bool operator == (const BorderInfo& border_info) const {
319  if (fabs(width - border_info.width) > FLT_EPSILON || style != border_info.style ||
320  fabs(cloud_intensity - border_info.cloud_intensity) > FLT_EPSILON ||
321  fabs(dash_phase - border_info.dash_phase) > FLT_EPSILON ||
322  dashes.GetSize() != border_info.dashes.GetSize())
323  return false;
324  for (int i=0; i<dashes.GetSize(); i++) {
325  if (fabs(dashes[i]-border_info.dashes[i])>FLT_EPSILON)
326  return false;
327  }
328  return true;
329  }
330 
338  bool operator != (const BorderInfo& border_info) const{
339  if (fabs(width - border_info.width) > FLT_EPSILON || style != border_info.style ||
340  fabs(cloud_intensity - border_info.cloud_intensity) > FLT_EPSILON ||
341  fabs(dash_phase - border_info.dash_phase) > FLT_EPSILON ||
342  dashes.GetSize() != border_info.dashes.GetSize())
343  return true;
344  for (int i=0; i<dashes.GetSize(); i++) {
345  if (fabs(dashes[i]-border_info.dashes[i])>FLT_EPSILON)
346  return true;
347  }
348  return false;
349  }
350 
370  void Set(float width, Style style, float intensity, float dash_phase, const FloatArray& dashes) {
371  this->width = width;
372  this->style = style;
373  this->cloud_intensity = intensity;
374  this->dash_phase = dash_phase;
375  this->dashes = dashes;
376  }
377 
383  float width;
384 
390 
403 
409  float dash_phase;
410 
418 };
419 
430 class QuadPoints FS_FINAL : public Object {
431  public:
440  QuadPoints(const PointF& first, const PointF& second, const PointF& third, const PointF& fourth) {
441  this->first = first;
442  this->second = second;
443  this->third = third;
444  this->fourth = fourth;
445  }
446 
449 
455  QuadPoints(const QuadPoints& quad_points) {
456  first = quad_points.first;
457  second = quad_points.second;
458  third = quad_points.third;
459  fourth = quad_points.fourth;
460  }
461 
469  QuadPoints& operator = (const QuadPoints& quad_points) {
470  first = quad_points.first;
471  second = quad_points.second;
472  third = quad_points.third;
473  fourth = quad_points.fourth;
474  return *this;
475  }
476 
484  bool operator == (const QuadPoints& quad_points) const {
485  return (first == quad_points.first && second == quad_points.second &&
486  third == quad_points.third && fourth == quad_points.fourth);
487  }
488 
496  bool operator != (const QuadPoints& quad_points) const {
497  return (first != quad_points.first || second != quad_points.second ||
498  third != quad_points.third || fourth != quad_points.fourth);
499  }
500 
511  void Set(const PointF& first, const PointF& second, const PointF& third, const PointF& fourth) {
512  this->first = first;
513  this->second = second;
514  this->third = third;
515  this->fourth = fourth;
516  }
517 
526 };
527 
529 FSDK_DEFINE_ARRAY(QuadPointsArray, QuadPoints)
530 
531 
535 class IconFit FS_FINAL : public Object {
536  public:
541  typedef enum _ScaleWayType {
543  e_ScaleWayAlways = 1,
545  e_ScaleWayBigger = 2,
547  e_ScaleWaySmaller = 3,
549  e_ScaleWayNever = 4
550  } ScaleWayType;
551 
552 
555  : scale_way_type((ScaleWayType)0)
556  , is_proportional_scaling(false)
557  , horizontal_fraction(0)
558  , vertical_fraction(0)
559  , fit_bounds(false) {}
560 
584  IconFit(ScaleWayType type, bool is_proportional_scaling, float horizontal_fraction,
585  float vertical_fraction, bool fit_bounds)
586  : scale_way_type(type)
587  , is_proportional_scaling(is_proportional_scaling)
588  , horizontal_fraction(horizontal_fraction)
589  , vertical_fraction(vertical_fraction)
590  , fit_bounds(fit_bounds) {}
591 
597  IconFit(const IconFit& icon_fit)
598  : scale_way_type(icon_fit.scale_way_type)
599  , is_proportional_scaling(icon_fit.is_proportional_scaling)
600  , horizontal_fraction(icon_fit.horizontal_fraction)
601  , vertical_fraction(icon_fit.vertical_fraction)
602  , fit_bounds(icon_fit.fit_bounds) {}
603 
611  IconFit& operator = (const IconFit& icon_fit) {
612  scale_way_type = icon_fit.scale_way_type;
613  is_proportional_scaling = icon_fit.is_proportional_scaling;
614  horizontal_fraction = icon_fit.horizontal_fraction;
615  vertical_fraction = icon_fit.vertical_fraction;
616  fit_bounds = icon_fit.fit_bounds;
617  return *this;
618  }
619 
627  bool operator == (const IconFit& icon_fit) const {
628  return (scale_way_type == icon_fit.scale_way_type &&
629  is_proportional_scaling == icon_fit.is_proportional_scaling &&
630  fabs(horizontal_fraction - icon_fit.horizontal_fraction) <= FLT_EPSILON &&
631  fabs(vertical_fraction - icon_fit.vertical_fraction) <= FLT_EPSILON &&
632  fit_bounds == icon_fit.fit_bounds);
633  }
634 
642  bool operator != (const IconFit& icon_fit) const {
643  return (scale_way_type != icon_fit.scale_way_type ||
644  is_proportional_scaling != icon_fit.is_proportional_scaling ||
645  fabs(horizontal_fraction - icon_fit.horizontal_fraction) > FLT_EPSILON ||
646  fabs(vertical_fraction - icon_fit.vertical_fraction) > FLT_EPSILON ||
647  fit_bounds != icon_fit.fit_bounds);
648  }
649 
675  void Set(ScaleWayType type, bool is_proportional_scaling, float horizontal_fraction,
676  float vertical_fraction, bool fit_bounds) {
677  this->scale_way_type = type;
678  this->is_proportional_scaling = is_proportional_scaling;
679  this->horizontal_fraction = horizontal_fraction;
680  this->vertical_fraction = vertical_fraction;
681  this->fit_bounds = fit_bounds;
682  }
683 
715 };
716 
749 class Annot : public Base {
750  public:
756  typedef enum _Type {
763  e_Note = 1,
765  e_Link = 2,
769  e_Line = 4,
771  e_Square = 5,
773  e_Circle = 6,
787  e_Stamp = 13,
789  e_Caret = 14,
791  e_Ink = 15,
793  e_PSInk = 16,
797  e_Sound = 18,
799  e_Movie = 19,
804  e_Widget = 20,
806  e_Screen = 21,
810  e_TrapNet = 23,
814  e_3D = 25,
816  e_Popup = 26,
818  e_Redact = 27
819  } Type;
820 
826  typedef enum _Flags {
833  e_FlagInvisible = 0x0001,
839  e_FlagHidden = 0x0002,
847  e_FlagPrint = 0x0004,
854  e_FlagNoZoom = 0x0008,
861  e_FlagNoRotate = 0x0010,
869  e_FlagNoView = 0x0020,
878  e_FlagReadOnly = 0x0040,
885  e_FlagLocked = 0x0080,
899  } Flags;
900 
906  typedef enum _HighlightingMode {
918 
924  typedef enum _Property {
940  } Property;
941 
947  typedef enum _MKEntry {
996  } MKEntry;
997 
1003  typedef enum _MKIconCaptionRelation {
1019 
1025  typedef enum _AppearanceType {
1032  } AppearanceType;
1033 
1034 
1035  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1036  explicit Annot(FS_HANDLE handle);
1044  Annot(const PDFPage& page, objects::PDFDictionary* annot_dict);
1045 #ifndef __EMSCRIPTEN_RENDER__
1046 
1051  Annot(const Annot& annot);
1052 #endif
1053 
1054  Annot() {}
1055 #ifndef __EMSCRIPTEN_RENDER__
1056 
1063  Annot& operator = (const Annot& annot);
1064 #endif
1065 
1072  bool operator ==(const Annot& other) const;
1080  bool operator != (const Annot& other) const;
1081 #ifndef __EMSCRIPTEN_RENDER__
1082 
1083  virtual ~Annot();
1084 #endif
1085 
1092  bool IsEmpty() const;
1093 
1099  PDFPage GetPage() const;
1106  bool IsMarkup() const;
1112  Type GetType() const;
1118  int GetIndex() const;
1124  WString GetContent() const;
1138  void SetContent(const WString& content);
1145  DateTime GetModifiedDateTime() const;
1153  void SetModifiedDateTime(const DateTime& date_time);
1160  uint32 GetFlags() const;
1169  void SetFlags(uint32 flags);
1175  WString GetUniqueID() const;
1183  void SetUniqueID(const WString& unique_id);
1190  RectF GetRect() const;
1191 
1204  Matrix GetDisplayMatrix(const Matrix& page_display_matrix);
1205 
1215  bool Move(const RectF& rect);
1232  BorderInfo GetBorderInfo() const;
1250  void SetBorderInfo(const BorderInfo& border);
1259  RGB GetBorderColor() const;
1271  void SetBorderColor(RGB color);
1284  bool ResetAppearanceStream();
1300  RectI GetDeviceRect(const Matrix& matrix);
1324  bool RemoveProperty(Property property);
1325 
1332 
1348  objects::PDFStream* GetAppearanceStream(AppearanceType type, const char* appearance_state = "") const;
1349 };
1350 
1352 FSDK_DEFINE_ARRAY(AnnotArray, Annot)
1353 
1354 
1355 class ShadingColor FS_FINAL : public Object {
1356  public:
1363  ShadingColor(ARGB firstcolor, ARGB secondcolor)
1364  : first_color(firstcolor)
1365  , second_color(secondcolor) {}
1366 
1369  : first_color(0xFFFFFFFF)
1370  , second_color(0xFFFFFFFF) {}
1371 
1377  ShadingColor(const ShadingColor& shading_color)
1378  : first_color(shading_color.first_color)
1379  , second_color(shading_color.second_color) {}
1380 
1388  ShadingColor& operator = (const ShadingColor& shading_color) {
1389  this->first_color = shading_color.first_color;
1390  this->second_color = shading_color.second_color;
1391  return *this;
1392  }
1393 
1401  bool operator == (const ShadingColor& shading_color) const {
1402  return (first_color == shading_color.first_color && second_color == shading_color.second_color);
1403  }
1404 
1412  bool operator != (const ShadingColor& shading_color) const {
1413  return (first_color != shading_color.first_color || second_color != shading_color.second_color);
1414  }
1415 
1424  void Set(ARGB firstcolor, ARGB secondcolor) {
1425  this->first_color = firstcolor;
1426  this->second_color = secondcolor;
1427  }
1428 
1433 };
1434 
1445  public:
1451  virtual void Release() = 0;
1460  virtual String GetProviderID() {
1461  return String();
1462  }
1472  return String();
1473  }
1483  virtual bool HasIcon(Annot::Type annot_type, const char* icon_name) {
1484  return false;
1485  }
1496  virtual bool CanChangeColor(Annot::Type annot_type, const char* icon_name) {
1497  return false;
1498  }
1499 #ifndef __EMSCRIPTEN_RENDER__
1500 
1510  virtual PDFPage GetIcon(Annot::Type annot_type, const char* icon_name, ARGB color);
1511 #endif
1512 
1526  virtual bool GetShadingColor(Annot::Type annot_type, const char* icon_name,
1527  RGB referenced_color, int shading_index, ShadingColor& out_shading_color) {
1528  return false;
1529  }
1540  virtual float GetDisplayWidth(Annot::Type annot_type, const char* icon_name) {
1541  return 0.0f;
1542  }
1553  virtual float GetDisplayHeight(Annot::Type annot_type, const char* icon_name) {
1554  return 0.0f;
1555  }
1556 
1557  protected:
1558  ~IconProviderCallback() {}
1559 };
1560 
1561 class Markup;
1563 FSDK_DEFINE_ARRAY(MarkupArray, Markup)
1564 
1565 
1583 class Markup : public Annot {
1584  public:
1590  typedef enum _StateModel {
1592  e_StateModelMarked = 1,
1594  e_StateModelReview = 2
1595  } StateModel;
1596 
1602  typedef enum _State {
1607  e_StateMarked = 1,
1612  e_StateUnmarked = 2,
1617  e_StateAccepted = 3,
1622  e_StateRejected = 4,
1627  e_StateCancelled = 5,
1632  e_StateCompleted = 6,
1637  e_StateNone = 7
1638  } State;
1639 
1645  typedef enum _EndingStyle {
1647  e_EndingStyleNone = 0,
1649  e_EndingStyleSquare = 1,
1651  e_EndingStyleCircle = 2,
1653  e_EndingStyleDiamond = 3,
1655  e_EndingStyleOpenArrow = 4,
1661  e_EndingStyleClosedArrow = 5,
1663  e_EndingStyleButt = 6,
1665  e_EndingStyleROpenArrow = 7,
1667  e_EndingStyleRClosedArrow = 8,
1669  e_EndingStyleSlash = 9
1670  } EndingStyle;
1671 
1677  typedef enum _MeasureType {
1679  e_MeasureTypeX = 0,
1681  e_MeasureTypeY = 1,
1683  e_MeasureTypeD = 2,
1685  e_MeasureTypeA = 3,
1687  e_MeasureTypeT = 4,
1689  e_MeasureTypeS = 5
1690  } MeasureType;
1691 
1692 
1698  explicit Markup(const Annot& annot);
1699  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1700  explicit Markup(FS_HANDLE handle);
1702  Markup() {}
1703 
1705  ~Markup() {}
1706 
1724  Popup GetPopup();
1741  void SetPopup(const Popup& popup);
1747  WString GetTitle() const;
1755  void SetTitle(const WString& title);
1761  WString GetSubject() const;
1769  void SetSubject(const WString& subject);
1778  float GetOpacity() const;
1791  void SetOpacity(float opacity);
1813  String GetIntent() const;
1849  void SetIntent(const String& intent);
1856  DateTime GetCreationDateTime() const;
1864  void SetCreationDateTime(const DateTime& date_time);
1870  int GetReplyCount();
1879  Note GetReply(int index) const;
1885  Note AddReply();
1896  bool RemoveReply(int index);
1902  bool RemoveAllReplies();
1903 
1920  bool IsGrouped();
1921 
1940  Markup GetGroupHeader();
1941 
1958  MarkupArray GetGroupElements();
1959 
1975  bool Ungroup();
1976 
1998  int GetStateAnnotCount(StateModel model);
1999 
2024  Note GetStateAnnot(StateModel model, int index);
2025 
2078  Note AddStateAnnot(StateModel model, State state);
2079 
2089  bool RemoveAllStateAnnots();
2090 
2091 };
2092 
2115 class Note FS_FINAL : public Markup {
2116  public:
2118  Note() {}
2124  explicit Note(const Annot& annot);
2125  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
2126  explicit Note(FS_HANDLE handle);
2128  ~Note() {}
2129 
2142  bool GetOpenStatus() const;
2157  void SetOpenStatus(bool status);
2169  String GetIconName() const;
2187  void SetIconName(const char* icon_name);
2197  Markup GetReplyTo();
2204  bool IsStateAnnot();
2205 
2218 
2230  State GetState();
2231 
2254  void SetState(State state);
2255 
2256 };
2257 
2269 class TextMarkup: public Markup {
2270  public:
2278  explicit TextMarkup(const Annot& annot);
2281 
2316  void SetQuadPoints(const QuadPointsArray& quad_points_array);
2317 };
2318 
2335 class Highlight FS_FINAL : public TextMarkup {
2336  public:
2344  explicit Highlight(const Annot& annot);
2347 };
2348 
2365 class Underline FS_FINAL : public TextMarkup {
2366  public:
2374  explicit Underline(const Annot& annot);
2377 };
2378 
2395 class StrikeOut FS_FINAL : public TextMarkup {
2396  public:
2404  explicit StrikeOut(const Annot& annot);
2407 };
2408 
2425 class Squiggly FS_FINAL : public TextMarkup {
2426  public:
2434  explicit Squiggly(const Annot& annot);
2437 };
2438 
2452 class Link FS_FINAL : public Annot {
2453  public:
2455  Link() {}
2461  explicit Link(const Annot& annot);
2462  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
2463  explicit Link(FS_HANDLE handle);
2465  ~Link() {}
2466 
2499  void SetQuadPoints(const QuadPointsArray& quad_points_array);
2500 
2509 
2520 
2528 
2543  void SetAction(const actions::Action& action);
2544 
2550  bool RemoveAction();
2551 };
2552 
2567 class Square FS_FINAL : public Markup {
2568  public:
2570  Square() {}
2576  explicit Square(const Annot& annot);
2578  ~Square() {}
2579 
2586  RGB GetFillColor() const;
2587 
2595  void SetFillColor(RGB fill_color);
2596 
2606  RectF GetInnerRect() const;
2618  void SetInnerRect(const RectF& inner_rect);
2619 };
2620 
2635 class Circle FS_FINAL : public Markup {
2636  public:
2638  Circle() {}
2644  explicit Circle(const Annot& annot);
2646  ~Circle() {}
2647 
2654  RGB GetFillColor() const;
2655 
2666  void SetFillColor(RGB fill_color);
2667 
2677  RectF GetInnerRect() const;
2678 
2692  void SetInnerRect(const RectF& inner_rect);
2693 };
2694 
2714 class FreeText FS_FINAL : public Markup {
2715  public:
2723  explicit FreeText(const Annot& annot);
2726 
2737  RGB GetFillColor() const;
2751  void SetFillColor(RGB fill_color);
2752 
2762 
2776  void SetAlignment(common::Alignment alignment);
2777 
2788  RectF GetInnerRect() const;
2789 
2804  void SetInnerRect(const RectF& inner_rect);
2805 
2815 
2838  bool SetDefaultAppearance(const DefaultAppearance& default_ap);
2839 
2851 
2866  void SetCalloutLineEndingStyle(EndingStyle ending_style);
2867 
2882 
2905  void SetCalloutLinePoints(const PointFArray& point_array);
2906 
2919  void SetTextMatrix(const Matrix& text_matrix);
2920 
2929  Matrix GetTextMatrix() const;
2930 
2938 
2953  void SetRotation(common::Rotation rotation);
2954 
2967  void Rotate(common::Rotation rotation);
2968 
2969 };
2970 
2989 class Line FS_FINAL : public Markup {
2990  public:
2996  typedef enum _CapPos {
3001  } CapPos;
3002 
3003 
3005  Line() {}
3011  explicit Line(const Annot& annot);
3013  ~Line() {}
3014 
3036  void SetLineStartStyle(EndingStyle ending_style);
3045  EndingStyle GetLineEndStyle() const;
3058  void SetLineEndStyle(EndingStyle ending_style);
3059 
3070  RGB GetStyleFillColor() const;
3071 
3085  void SetStyleFillColor(RGB color);
3086 
3095  PointF GetStartPoint() const;
3108  void SetStartPoint(const PointF& point);
3109 
3118  PointF GetEndPoint() const;
3131  void SetEndPoint(const PointF& point);
3132 
3141  bool HasCaption() const;
3154  void EnableCaption(bool cap);
3155 
3183  void SetCaptionPositionType(CapPos cap_position);
3196  Offset GetCaptionOffset() const;
3212  void SetCaptionOffset(const Offset& offset);
3213 
3228  float GetLeaderLineLength() const;
3246  void SetLeaderLineLength(float length);
3256  float GetLeaderLineExtensionLength() const;
3269  void SetLeaderLineExtensionLength(float extension_length);
3270 
3281  float GetLeaderLineOffset() const;
3295  void SetLeaderLineOffset(float offset);
3296 
3310  void SetMeasureRatio(const String& ratio);
3311 
3322 
3335  void SetMeasureUnit(MeasureType measure_type, const String& unit);
3336 
3348  String GetMeasureUnit(MeasureType measure_type);
3349 
3362  void SetMeasureConversionFactor(MeasureType measure_type, float factor);
3363 
3375  float GetMeasureConversionFactor(MeasureType measure_type);
3376 };
3377 
3395 class Ink FS_FINAL : public Markup {
3396  public:
3398  Ink() {}
3404  explicit Ink(const Annot& annot);
3406  ~Ink() {}
3434 
3467  void SetInkList(const common::Path& ink_list);
3468 };
3469 
3494 class Stamp FS_FINAL : public Markup {
3495  public:
3497  Stamp() {}
3503  explicit Stamp(const Annot& annot);
3504 #ifndef __EMSCRIPTEN_RENDER__
3505 
3506  ~Stamp();
3507 #endif
3508 
3519  String GetIconName() const;
3542  void SetIconName(const char* icon_name);
3553  void SetBitmap(const common::Bitmap& bitmap);
3554 
3577  void SetImage(const common::Image& image, int frame_index, int compress);
3578 
3589  void SetRotation(int angle);
3590 
3596  int GetRotation();
3597 
3607  void Rotate(int angle);
3608 };
3609 
3622 class Screen FS_FINAL : public Annot {
3623  public:
3625  Screen() {}
3631  explicit Screen(const Annot& annot);
3633  virtual ~Screen() {}
3634 
3657  void SetImage(const common::Image& image, int frame_index, int compress);
3658 
3668 
3676 
3689  void SetRotation(common::Rotation rotate);
3690 
3698 
3707  float GetOpacity() const;
3720  void SetOpacity(float opacity);
3721 
3727  WString GetTitle() const;
3735  void SetTitle(const WString& title);
3736 
3770  void SetAction(const actions::Action& action);
3779  void RemoveAction();
3780 };
3781 
3800 class Polygon FS_FINAL : public Markup {
3801  public:
3803  Polygon() {}
3809  explicit Polygon(const Annot& annot);
3820  RGB GetFillColor() const;
3821 
3833  void SetFillColor(RGB fill_color);
3834 
3844 
3856  void SetVertexes(const PointFArray& vertexes);
3857 
3871  void SetMeasureRatio(const String& ratio);
3872 
3883 
3896  void SetMeasureUnit(MeasureType measure_type, const String& unit);
3897 
3909  String GetMeasureUnit(MeasureType measure_type);
3910 
3923  void SetMeasureConversionFactor(MeasureType measure_type, float factor);
3924 
3936  float GetMeasureConversionFactor(MeasureType measure_type);
3937 };
3938 
3958 class PolyLine FS_FINAL : public Markup {
3959  public:
3967  explicit PolyLine(const Annot& annot);
3980  RGB GetStyleFillColor() const;
3992  void SetStyleFillColor(RGB fill_color);
3993 
4003 
4015  void SetVertexes(const PointFArray& vertexes);
4038  void SetLineStartStyle(EndingStyle starting_style);
4047  EndingStyle GetLineEndStyle() const;
4061  void SetLineEndStyle(EndingStyle ending_style);
4062 
4076  void SetMeasureRatio(const String& ratio);
4077 
4088 
4101  void SetMeasureUnit(MeasureType measure_type, const String& unit);
4102 
4114  String GetMeasureUnit(MeasureType measure_type);
4115 
4128  void SetMeasureConversionFactor(MeasureType measure_type, float factor);
4129 
4141  float GetMeasureConversionFactor(MeasureType measure_type);
4142 };
4143 
4156 class Caret FS_FINAL : public Markup {
4157  public:
4159  Caret() {}
4165  explicit Caret(const Annot& annot);
4167  ~Caret() {}
4168 
4178  RectF GetInnerRect() const;
4192  void SetInnerRect(const RectF& inner_rect);
4193 };
4194 
4207 class FileAttachment FS_FINAL : public Markup {
4208  public:
4216  explicit FileAttachment(const Annot& annot);
4219 
4227  bool SetFileSpec(const FileSpec& file_spec);
4228 
4236 
4247  String GetIconName() const;
4248 
4264  void SetIconName(const char* icon_name);
4265 };
4266 
4276 class Popup FS_FINAL : public Annot {
4277  public:
4279  Popup() {}
4285  explicit Popup(const Annot& annot);
4286  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
4287  explicit Popup(FS_HANDLE handle);
4289  ~Popup() {}
4290 
4303  bool GetOpenStatus() const;
4318  void SetOpenStatus(bool status);
4319 };
4320 #ifndef __FSDK_NO_PSINK__
4321 
4339 class PSInk FS_FINAL : public Annot {
4340  public:
4342  PSInk() {}
4348  explicit PSInk(const Annot& annot);
4349  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
4350  explicit PSInk(FS_HANDLE handle);
4352  ~PSInk() {}
4353 };
4354 #endif
4355 
4367 class Widget FS_FINAL : public Annot {
4368  public:
4370  Widget() {}
4376  explicit Widget(const Annot& annot);
4377  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
4378  explicit Widget(FS_HANDLE handle);
4379 #ifndef __EMSCRIPTEN_RENDER__
4380 
4381  ~Widget();
4382 #endif
4383 
4389 
4396 
4407 
4420 
4431 
4455  void SetAction(const actions::Action& action);
4456 
4465  void RemoveAction();
4466 
4478  bool HasMKEntry(MKEntry mk_entry);
4490  void RemoveMKEntry(MKEntry mk_entry);
4516  void SetMKRotation(common::Rotation rotation);
4527  RGB GetMKBorderColor() const;
4538  void SetMKBorderColor(RGB color);
4549  RGB GetMKBackgroundColor() const;
4560  void SetMKBackgroundColor(RGB color);
4574  WString GetMKNormalCaption() const;
4588  void SetMKNormalCaption(const wchar_t* caption);
4603  WString GetMKRolloverCaption() const;
4604 
4619  void SetMKRolloverCaption(const wchar_t* caption);
4620 
4634  WString GetMKDownCaption() const;
4635 
4649  void SetMKDownCaption(const wchar_t* caption);
4650 
4664 
4678  void SetMKNormalIconBitmap(const common::Bitmap& bitmap);
4679 
4695  void SetMKNormalIconImage(const common::Image& image, int frame_index);
4696 
4711 
4726  void SetMKRolloverIconBitmap(const common::Bitmap& bitmap);
4727 
4744  void SetMKRolloverIconImage(const common::Image& image, int frame_index);
4745 
4759 
4773  void SetMKDownIconBitmap(const common::Bitmap& bitmap);
4774 
4790  void SetMKDownIconImage(const common::Image& image, int frame_index);
4791 
4805  IconFit GetMKIconFit() const;
4823  void SetMKIconFit(const IconFit& icon_fit);
4824 
4839 
4856 
4864  void SetAppearanceState(const String& appearance_state);
4865 
4871  String GetAppearanceState() const;
4872 
4879 
4880 #ifdef _SUPPORTWEBSDK_
4881  //Set push button icon form icon stream. stream is from doc::createIcon.
4882  //face: 0: normal, 1: down, 2: roller
4883  void SetButtonIcon(objects::PDFStream* icon, int face);
4884 #endif
4885 };
4886 
4903 class Redact FS_FINAL : public Markup {
4904  public:
4906  Redact() {}
4912  explicit Redact(const Annot& annot);
4913  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
4914  explicit Redact(FS_HANDLE handle);
4915 #ifndef __EMSCRIPTEN_RENDER__
4916 
4917  ~Redact();
4918 #endif
4919 
4933 
4952  void SetQuadPoints(const QuadPointsArray& quad_points_array);
4953 
4960  RGB GetFillColor() const;
4968  void SetFillColor(RGB fill_color);
4969 
4976  RGB GetApplyFillColor() const;
4977 
4985  void SetApplyFillColor(RGB fill_color);
4986 
4992  WString GetOverlayText() const;
4993 
5001  void SetOverlayText(const WString& overlay_text);
5002 
5012 
5026 
5036 
5059  bool SetDefaultAppearance(const DefaultAppearance& default_ap);
5060 
5072  bool Apply();
5073 };
5074 
5084 class Sound FS_FINAL : public Markup{
5085  public:
5091  typedef enum _SampleEncodingFormat {
5101 
5102 
5104  Sound() {}
5105 
5111  explicit Sound(const Annot& annot);
5112 
5113  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
5114  explicit Sound(FS_HANDLE handle);
5115 
5116 #ifndef __EMSCRIPTEN_RENDER__
5117 
5118  ~Sound();
5119 #endif
5120 
5133 
5139  float GetSamplingRate() const;
5140 
5146  int GetChannelCount() const;
5147 
5153  int GetBits() const;
5154 
5162 
5168  String GetCompressionFormat() const;
5169 
5183  FileSpec GetFileSpec() const;
5184 };
5185 
5186 } // namespace annots
5187 } // namespace pdf
5188 } // namespace foxit
5189 
5190 #endif // FS_ANNOT_H_
5191 
FloatArray dashes
A dash array that represents the dash patterns.
Definition: fs_annot.h:417
Annotation flag: read only.
Definition: fs_annot.h:878
void SetFillColor(RGB fill_color)
Set fill color.
Definition: fs_annot.h:1444
WString GetUniqueID() const
Get unique ID.
StateModel GetStateModel()
Get the state model.
Rollover caption entry. "RC" in MK dictionary.
Definition: fs_annot.h:963
~Line()
Destructor.
Definition: fs_annot.h:3013
Square()
Constructor.
Definition: fs_annot.h:2570
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:2725
IconFit()
Constructor.
Definition: fs_annot.h:554
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:1602
Definition: fs_annot.h:1355
Definition: fs_annot.h:2269
Definition: fs_annot.h:2365
~Popup()
Destructor.
Definition: fs_annot.h:4289
String GetAppearanceState() const
Get the annotation's appearance state, which selects the applicable appearance stream from an appeara...
Definition: fs_annot.h:3622
Redact()
Constructor.
Definition: fs_annot.h:4906
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:511
Definition: fs_image.h:36
MKIconCaptionRelation
Enumeration for icon and caption relative position in annotation's MK dictionary.
Definition: fs_annot.h:1003
Annotation type: squiggly annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:783
Annotation flag: no view.
Definition: fs_annot.h:869
RectF GetInnerRect() const
Get the inner rectangle.
void SetMeasureConversionFactor(MeasureType measure_type, float factor)
Set the conversion factor for measuring.
Definition: fs_annot.h:4207
Markup()
Constructor.
Definition: fs_annot.h:1702
PDFPage GetPage() const
Get the related PDF page.
WString GetContent() const
Get content.
Twos-complement values.
Definition: fs_annot.h:5095
Annotation type: file attachment annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:795
Annot()
Constructor.
Definition: fs_annot.h:1054
QuadPointsArray GetQuadPoints() const
Get quadrilaterals.
Unspecified or unsigned values in the range 0 to (2^B - 1).
Definition: fs_annot.h:5093
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:983
Markup GetReplyTo()
Get the markup annotation, which current note annotation is in reply to.
float width
Border width, in points.
Definition: fs_annot.h:383
Annotation type: free text annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:767
State GetState()
Get the state.
StrikeOut()
Constructor.
Definition: fs_annot.h:2398
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:816
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:3961
ARGB first_color
First color used for shading. Format: 0xAARRGGBB.
Definition: fs_annot.h:1430
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:1352
void SetOverlayText(const WString &overlay_text)
Set the overlay text.
Screen()
Constructor.
Definition: fs_annot.h:3625
Sound()
Constructor.
Definition: fs_annot.h:5104
IconFit(ScaleWayType type, bool is_proportional_scaling, float horizontal_fraction, float vertical_fraction, bool fit_bounds)
Constructor, with parameters.
Definition: fs_annot.h:584
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:995
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:535
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:847
bool operator!=(const BorderInfo &border_info) const
Not equal operator.
Definition: fs_annot.h:338
Definition: fs_basictypes.h:408
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:287
Definition: fs_annot.h:200
Style
Enumeration for PDF annotation border style.
Definition: fs_annot.h:207
bool HasMKEntry(MKEntry mk_entry)
Check if a specified entry exists in the MK dictionary.
~Highlight()
Destructor.
Definition: fs_annot.h:2346
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:1526
virtual String GetProviderVersion()
A callback function used to get provider version.
Definition: fs_annot.h:1471
Definition: fs_annot.h:2567
No caption; icon only.
Definition: fs_annot.h:1007
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:1677
Annotation type: unknown.
Definition: fs_annot.h:758
Caption above the icon.
Definition: fs_annot.h:1011
DefaultAppearance GetDefaultAppearance()
Get default appearance data.
Type
Enumeration for PDF annotation type.
Definition: fs_annot.h:756
Annotation type: redact annotation.
Definition: fs_annot.h:818
void SetIconName(const char *icon_name)
Set icon name.
Definition: fs_annot.h:1583
int GetSize() const
Get the number of elements in the array.
Definition: fx_basic.h:1350
void SetIconName(const char *icon_name)
Set icon name.
Annotation's normal appearance.
Definition: fs_annot.h:1027
Definition: fs_annot.h:529
Flags
Enumeration for PDF annotation flags.
Definition: fs_annot.h:826
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:98
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:771
float cloud_intensity
Intensity of the cloudy effect.
Definition: fs_annot.h:402
~Caret()
Destructor.
Definition: fs_annot.h:4167
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:2368
void SetMKIconCaptionRelation(MKIconCaptionRelation relation)
Set the relation of icon and caption in the MK dictionary.
Annotation property: creation date.
Definition: fs_annot.h:931
void Set(float width, Style style, float intensity, float dash_phase, const FloatArray &dashes)
Set value.
Definition: fs_annot.h:370
void SetMKDict(pdf::objects::PDFDictionary *dict)
Set the appearance characteristics dictionary (known as "MK" dictionary as well).
Definition: fs_annot.h:4367
RGB GetFillColor() const
Get fill color.
Definition: fs_annot.h:3800
WIDE STRING CLASS.
Definition: fx_string.h:1459
void SetOpenStatus(bool status)
Set open status.
Definition: fs_annot.h:2115
void SetAlignment(common::Alignment alignment)
Set alignment value.
Annotation type: movie annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:799
Annotation property: modified date.
Definition: fs_annot.h:926
actions::Action GetAction()
Get action.
DateTime GetModifiedDateTime() const
Get last modified date time.
Normal icon entry. "I" in MK dictionary.
Definition: fs_annot.h:973
bool IsEmpty() const
Check whether current object is empty or not.
virtual ~Screen()
Destructor.
Definition: fs_annot.h:3633
void SetIconName(const char *icon_name)
Set icon name.
Caption below the icon.
Definition: fs_annot.h:1009
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:318
FileSpec GetFileSpec()
Get the file specification.
Annotation flag: no rotate.
Definition: fs_annot.h:861
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:806
bool operator==(const QuadPoints &quad_points) const
Equal operator.
Definition: fs_annot.h:484
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:2406
ScaleWayType scale_way_type
The circumstances under which the icon should be scaled inside the annotation rectangle....
Definition: fs_annot.h:688
~PolyLine()
Destructor.
Definition: fs_annot.h:3969
DefaultAppearance()
Constructor.
Definition: fs_annot.h:88
Annotation property: fill color.
Definition: fs_annot.h:939
DefaultAppearance(uint32 flags, const common::Font &font, float text_size, RGB text_color)
Constructor, with parameters.
Definition: fs_annot.h:81
ShadingColor(const ShadingColor &shading_color)
Constructor, with another shading color object.
Definition: fs_annot.h:1377
Annotation property: border color.
Definition: fs_annot.h:933
Widget()
Constructor.
Definition: fs_annot.h:4370
float vertical_fraction
The vertical fraction of left-over space to allocate at the left and bottom of the icon.
Definition: fs_annot.h:707
void SetAction(const actions::Action &action)
Set action.
Definition: fs_pdfform.h:1075
Highlight()
Constructor.
Definition: fs_annot.h:2338
float horizontal_fraction
The horizontal fraction of left-over space to allocate at the left and bottom of the icon.
Definition: fs_annot.h:702
Indicates property text color of pdf::DefaultAppearance is meaningful.
Definition: fs_annot.h:62
Annotation flag: toggle no view.
Definition: fs_annot.h:891
void SetFillColor(RGB fill_color)
Set fill color.
~Underline()
Destructor.
Definition: fs_annot.h:2376
Definition: fs_annot.h:3494
Definition: fs_annot.h:2998
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:4903
FreeText()
Constructor.
Definition: fs_annot.h:2717
BorderInfo & operator=(const BorderInfo &border_info)
Assign operator.
Definition: fs_annot.h:302
void Set(ScaleWayType type, bool is_proportional_scaling, float horizontal_fraction, float vertical_fraction, bool fit_bounds)
Set value.
Definition: fs_annot.h:675
ShadingColor(ARGB firstcolor, ARGB secondcolor)
Constructor, with parameters.
Definition: fs_annot.h:1363
Border style: Solid.
Definition: fs_annot.h:209
~Note()
Destructor.
Definition: fs_annot.h:2128
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:854
bool operator!=(const DefaultAppearance &default_appearance) const
Not equal operator.
Definition: fs_annot.h:139
Annotation's rollover appearance.
Definition: fs_annot.h:1029
bool operator!=(const Annot &other) const
Not equal operator.
IconFit(const IconFit &icon_fit)
Constructor, with another icon fit object.
Definition: fs_annot.h:597
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:947
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:1031
uint32 flags
Flags to indicate which properties of default appearance are meaningful.
Definition: fs_annot.h:175
ARGB second_color
Second color used for shading. Format: 0xAARRGGBB.
Definition: fs_annot.h:1432
μ-law-encoded samples
Definition: fs_annot.h:5097
void SetMeasureRatio(const String &ratio)
Set the scale ratio string for measuring.
Definition: fs_annot.h:2635
Highlighting mode: Invert, which is to invert the contents of the annotation rectangle.
Definition: fs_annot.h:910
Line()
Constructor.
Definition: fs_annot.h:3005
PointF GetEndPoint() const
Get the end point.
Annotation type: polygon annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:775
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:229
int GetChannelCount() const
Get the count of sound channels.
Circle()
Constructor.
Definition: fs_annot.h:2638
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:912
common::Font font
A font for default appearance. It should be a valid font object when it is useful.
Definition: fs_annot.h:181
void Set(ARGB firstcolor, ARGB secondcolor)
Set value.
Definition: fs_annot.h:1424
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:697
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:2395
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:525
Popup()
Constructor.
Definition: fs_annot.h:4279
Definition: fs_annot.h:4156
Definition: fs_annot.h:4339
Annot & operator=(const Annot &annot)
Assign operator.
Annotation type: widget annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:804
Annotation type: note annotation, which is just "Text" annotation - one of standard annotation in <PD...
Definition: fs_annot.h:763
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:1590
void SetQuadPoints(const QuadPointsArray &quad_points_array)
Set quadrilaterals.
~Squiggly()
Destructor.
Definition: fs_annot.h:2436
void SetAction(const actions::Action &action)
Set action.
~Polygon()
Destructor.
Definition: fs_annot.h:3811
Annotation type: ink annotation. One of standard annotation in <PDF reference 1.7>.
Definition: fs_annot.h:791
Annotation type: link annotation. One of standard annotation in <PDF reference 1.7>.
Definition: fs_annot.h:765
Border color entry. "BC" in MK dictionary.
Definition: fs_annot.h:951
bool fit_bounds
A boolean value that indicates whether to scale button appearance to fit fully within bounds or not.
Definition: fs_annot.h:714
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:521
DefAPFlags
Enumeration for default appearance flags.
Definition: fs_annot.h:58
RGB GetFillColor() const
Get fill color.
Definition: fs_common.h:1876
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:1645
Definition: fs_annot.h:3395
RGB GetMKBorderColor() const
Get the border color in the MK dictionary.
Caret()
Constructor.
Definition: fs_annot.h:4159
ScaleWayType
Enumeration for the type of icon scaling way.
Definition: fs_annot.h:541
Annotation flag: locked.
Definition: fs_annot.h:885
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:3406
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:793
QuadPoints & operator=(const QuadPoints &quad_points)
Assign operator.
Definition: fs_annot.h:469
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:3000
Rollover icon entry. "RI" in MK dictionary.
Definition: fs_annot.h:978
void RemoveAction()
Remove action.
bool operator!=(const QuadPoints &quad_points) const
Not equal operator.
Definition: fs_annot.h:496
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:222
Property
Enumeration for some PDF annotation property.
Definition: fs_annot.h:924
Annotation flag: invisible.
Definition: fs_annot.h:833
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:810
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:440
Matrix GetTextMatrix() const
Get matrix in default appearance data for text in current free text annotation.
Definition: fs_annot.h:1563
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:590
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:777
Ink()
Constructor.
Definition: fs_annot.h:3398
Caption overlaid directly on the icon.
Definition: fs_annot.h:1017
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:523
float text_size
Text size for default appearance. It should be above 0 when it is useful.
Definition: fs_annot.h:187
Definition: fs_annot.h:2714
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:916
FileSpec GetFileSpec() const
Get the file specification object which represents an external sound file.
Definition: fs_basictypes.h:375
Annotation type: printer's mark annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:808
TextMarkup()
Constructor.
Definition: fs_annot.h:2272
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:908
Caption to the right of the icon.
Definition: fs_annot.h:1013
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:1496
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:111
void SetOpacity(float opacity)
Set opacity value.
PointF first
First point of quadrilateral, in PDF coordinate system.
Definition: fs_annot.h:519
HighlightingMode
Enumeration for PDF annotation highlighting mode.
Definition: fs_annot.h:906
void SetRotation(common::Rotation rotation)
Set rotation value (in clockwise).
FileAttachment()
Constructor.
Definition: fs_annot.h:4210
Annotation type: highlight annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:779
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:5099
~BorderInfo()
Destructor.
Definition: fs_annot.h:280
Definition: fs_annot.h:749
QuadPoints(const QuadPoints &quad_points)
Constructor, with another quadrilateral points object.
Definition: fs_annot.h:455
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:3803
Annotation type: sound annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:797
Annotation type: strikeout annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:785
Definition: fs_common.h:1312
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:988
PSInk()
Constructor.
Definition: fs_annot.h:4342
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:1483
Annotation type: underline annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:781
~PSInk()
Destructor.
Definition: fs_annot.h:4352
Definition: fs_action.h:418
RGB text_color
Text color for default appearance. Format: 0xRRGGBB.
Definition: fs_annot.h:193
Rotation entry. "R" in MK dictionary.
Definition: fs_annot.h:949
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:769
Squiggly()
Constructor.
Definition: fs_annot.h:2428
bool operator==(const DefaultAppearance &default_appearance) const
Equal operator.
Definition: fs_annot.h:126
Border style: Cloudy.
Definition: fs_annot.h:243
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:1025
Indicates property font of pdf::DefaultAppearance is meaningful.
Definition: fs_annot.h:60
float dash_phase
Dash phase.
Definition: fs_annot.h:409
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:389
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:789
~Square()
Destructor.
Definition: fs_annot.h:2578
Definition: fs_annot.h:4276
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:814
bool SetDefaultAppearance(const DefaultAppearance &default_ap)
Set default appearance data.
Border style: Inset.
Definition: fs_annot.h:236
No icon; captin only.
Definition: fs_annot.h:1005
void SetBorderInfo(const BorderInfo &border)
Set border information.
~Circle()
Destructor.
Definition: fs_annot.h:2646
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:3958
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:273
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:812
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:1056
PointFArray GetVertexes()
Get vertexes.
SampleEncodingFormat
Enumeration for encoding format of sound sample data.
Definition: fs_annot.h:5091
void Set(uint32 flags, const common::Font &font, float text_size, RGB text_color)
Set value.
Definition: fs_annot.h:161
void SetMeasureUnit(MeasureType measure_type, const String &unit)
Set the label for displaying the units for measuring.
Definition: fs_annot.h:2989
RGB GetFillColor() const
Get fill color.
void SetRotation(int angle)
Set rotation angle (in clockwise).
~FileAttachment()
Destructor.
Definition: fs_annot.h:4218
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:430
RGB GetBorderColor() const
Get border color.
Definition: fs_annot.h:2425
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:1540
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:1553
Annotation type: circle annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:773
WString GetTitle() const
Get title of current screen annotation.
Caption to the left of the icon.
Definition: fs_annot.h:1015
void SetInnerRect(const RectF &inner_rect)
Set the inner rectangle.
CapPos
Enumeration for the position type of caption.
Definition: fs_annot.h:2996
Indicates property text size of pdf::DefaultAppearance is meaningful.
Definition: fs_annot.h:64
Note()
Constructor.
Definition: fs_annot.h:2118
Stamp()
Constructor.
Definition: fs_annot.h:3497
ShadingColor()
Constructor.
Definition: fs_annot.h:1368
virtual String GetProviderID()
A callback function used to get provider ID.
Definition: fs_annot.h:1460
~Markup()
Destructor.
Definition: fs_annot.h:1705
void SetCaptionOffset(const Offset &offset)
Set caption offset values.
Definition: fs_annot.h:2335
Normal caption entry. "CA" in MK dictionary.
Definition: fs_annot.h:958
Down caption (or alternate caption) entry. "AC" in MK dictionary.
Definition: fs_annot.h:968
String GetMeasureUnit(MeasureType measure_type)
Get the label for displaying the units for measuring.
~TextMarkup()
Destructor.
Definition: fs_annot.h:2280
Background color entry. "BG" in MK dictionary.
Definition: fs_annot.h:953
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:448
Annotation flag: locked contents.
Definition: fs_annot.h:898
Annotation type: stamp annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:787
Definition: fs_image.h:430
Annotation flag: hidden.
Definition: fs_annot.h:839
Definition: fs_annot.h:5084
Border style: Dashed.
Definition: fs_annot.h:216
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:766
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:914
BorderInfo(float width, Style style, float intensity, float dash_phase, const FloatArray &dashes)
Constructor, with parameters.
Definition: fs_annot.h:264