My Project
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);
1050  Annot(const Annot& annot);
1052  Annot() {}
1060  Annot& operator = (const Annot& annot);
1068  bool operator ==(const Annot& other) const;
1076  bool operator != (const Annot& other) const;
1077 
1079  virtual ~Annot();
1080 
1088  bool IsEmpty() const;
1089 
1095  PDFPage GetPage() const;
1102  bool IsMarkup() const;
1108  Type GetType() const;
1114  int GetIndex() const;
1120  WString GetContent() const;
1134  void SetContent(const WString& content);
1141  DateTime GetModifiedDateTime() const;
1149  void SetModifiedDateTime(const DateTime& date_time);
1156  uint32 GetFlags() const;
1165  void SetFlags(uint32 flags);
1171  WString GetUniqueID() const;
1179  void SetUniqueID(const WString& unique_id);
1186  RectF GetRect() const;
1196  bool Move(const RectF& rect);
1209  BorderInfo GetBorderInfo() const;
1223  void SetBorderInfo(const BorderInfo& border);
1232  RGB GetBorderColor() const;
1244  void SetBorderColor(RGB color);
1257  bool ResetAppearanceStream();
1277  RectI GetDeviceRect(bool is_transform_icon, const Matrix& matrix);
1301  bool RemoveProperty(Property property);
1302 
1309 
1325  objects::PDFStream* GetAppearanceStream(AppearanceType type, const char* appearance_state = "") const;
1326 };
1327 
1329 FSDK_DEFINE_ARRAY(AnnotArray, Annot)
1330 
1331 
1332 class ShadingColor FS_FINAL : public Object {
1333  public:
1340  ShadingColor(ARGB firstcolor, ARGB secondcolor)
1341  : first_color(firstcolor)
1342  , second_color(secondcolor) {}
1343 
1346  : first_color(0xFFFFFFFF)
1347  , second_color(0xFFFFFFFF) {}
1348 
1354  ShadingColor(const ShadingColor& shading_color)
1355  : first_color(shading_color.first_color)
1356  , second_color(shading_color.second_color) {}
1357 
1365  ShadingColor& operator = (const ShadingColor& shading_color) {
1366  this->first_color = shading_color.first_color;
1367  this->second_color = shading_color.second_color;
1368  return *this;
1369  }
1370 
1378  bool operator == (const ShadingColor& shading_color) const {
1379  return (first_color == shading_color.first_color && second_color == shading_color.second_color);
1380  }
1381 
1389  bool operator != (const ShadingColor& shading_color) const {
1390  return (first_color != shading_color.first_color || second_color != shading_color.second_color);
1391  }
1392 
1401  void Set(ARGB firstcolor, ARGB secondcolor) {
1402  this->first_color = firstcolor;
1403  this->second_color = secondcolor;
1404  }
1405 
1410 };
1411 
1422  public:
1428  virtual void Release() = 0;
1437  virtual String GetProviderID() {
1438  return String();
1439  }
1449  return String();
1450  }
1460  virtual bool HasIcon(Annot::Type annot_type, const char* icon_name) {
1461  return false;
1462  }
1473  virtual bool CanChangeColor(Annot::Type annot_type, const char* icon_name) {
1474  return false;
1475  }
1486  virtual PDFPage GetIcon(Annot::Type annot_type, const char* icon_name, ARGB color);
1501  virtual bool GetShadingColor(Annot::Type annot_type, const char* icon_name,
1502  RGB referenced_color, int shading_index, ShadingColor& out_shading_color) {
1503  return false;
1504  }
1518  virtual float GetDisplayWidth(Annot::Type annot_type, const char* icon_name) {
1519  return 0.0f;
1520  }
1534  virtual float GetDisplayHeight(Annot::Type annot_type, const char* icon_name) {
1535  return 0.0f;
1536  }
1537 
1538  protected:
1539  ~IconProviderCallback() {}
1540 };
1541 
1542 class Markup;
1544 FSDK_DEFINE_ARRAY(MarkupArray, Markup)
1545 
1546 
1564 class Markup : public Annot {
1565  public:
1571  typedef enum _StateModel {
1573  e_StateModelMarked = 1,
1575  e_StateModelReview = 2
1576  } StateModel;
1577 
1583  typedef enum _State {
1588  e_StateMarked = 1,
1593  e_StateUnmarked = 2,
1598  e_StateAccepted = 3,
1603  e_StateRejected = 4,
1608  e_StateCancelled = 5,
1613  e_StateCompleted = 6,
1618  e_StateNone = 7
1619  } State;
1620 
1626  typedef enum _EndingStyle {
1628  e_EndingStyleNone = 0,
1630  e_EndingStyleSquare = 1,
1632  e_EndingStyleCircle = 2,
1634  e_EndingStyleDiamond = 3,
1636  e_EndingStyleOpenArrow = 4,
1642  e_EndingStyleClosedArrow = 5,
1644  e_EndingStyleButt = 6,
1646  e_EndingStyleROpenArrow = 7,
1648  e_EndingStyleRClosedArrow = 8,
1650  e_EndingStyleSlash = 9
1651  } EndingStyle;
1652 
1653 
1659  explicit Markup(const Annot& annot);
1660  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1661  explicit Markup(FS_HANDLE handle);
1663  Markup() {}
1664 
1666  ~Markup() {}
1667 
1685  Popup GetPopup();
1702  void SetPopup(const Popup& popup);
1708  WString GetTitle() const;
1716  void SetTitle(const WString& title);
1722  WString GetSubject() const;
1730  void SetSubject(const WString& subject);
1739  float GetOpacity() const;
1752  void SetOpacity(float opacity);
1774  String GetIntent() const;
1810  void SetIntent(const String& intent);
1817  DateTime GetCreationDateTime() const;
1825  void SetCreationDateTime(const DateTime& date_time);
1831  int GetReplyCount();
1840  Note GetReply(int index) const;
1846  Note AddReply();
1857  bool RemoveReply(int index);
1863  bool RemoveAllReplies();
1864 
1881  bool IsGrouped();
1882 
1901  Markup GetGroupHeader();
1902 
1919  MarkupArray GetGroupElements();
1920 
1936  bool Ungroup();
1937 
1959  int GetStateAnnotCount(StateModel model);
1960 
1985  Note GetStateAnnot(StateModel model, int index);
1986 
2039  Note AddStateAnnot(StateModel model, State state);
2040 
2050  bool RemoveAllStateAnnots();
2051 
2052 };
2053 
2076 class Note FS_FINAL : public Markup {
2077  public:
2079  Note() {}
2085  explicit Note(const Annot& annot);
2086  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
2087  explicit Note(FS_HANDLE handle);
2089  ~Note() {}
2090 
2103  bool GetOpenStatus() const;
2118  void SetOpenStatus(bool status);
2130  String GetIconName() const;
2148  void SetIconName(const char* icon_name);
2158  Markup GetReplyTo();
2165  bool IsStateAnnot();
2166 
2179 
2191  State GetState();
2192 
2215  void SetState(State state);
2216 
2217 };
2218 
2230 class TextMarkup: public Markup {
2231  public:
2239  explicit TextMarkup(const Annot& annot);
2242 
2277  void SetQuadPoints(const QuadPointsArray& quad_points_array);
2278 };
2279 
2296 class Highlight FS_FINAL : public TextMarkup {
2297  public:
2305  explicit Highlight(const Annot& annot);
2308 };
2309 
2326 class Underline FS_FINAL : public TextMarkup {
2327  public:
2335  explicit Underline(const Annot& annot);
2338 };
2339 
2356 class StrikeOut FS_FINAL : public TextMarkup {
2357  public:
2365  explicit StrikeOut(const Annot& annot);
2368 };
2369 
2386 class Squiggly FS_FINAL : public TextMarkup {
2387  public:
2395  explicit Squiggly(const Annot& annot);
2398 };
2399 
2413 class Link FS_FINAL : public Annot {
2414  public:
2416  Link() {}
2422  explicit Link(const Annot& annot);
2423  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
2424  explicit Link(FS_HANDLE handle);
2426  ~Link() {}
2427 
2460  void SetQuadPoints(const QuadPointsArray& quad_points_array);
2461 
2470 
2481 
2489 
2504  void SetAction(const actions::Action& action);
2505 
2511  bool RemoveAction();
2512 };
2513 
2528 class Square FS_FINAL : public Markup {
2529  public:
2531  Square() {}
2537  explicit Square(const Annot& annot);
2539  ~Square() {}
2540 
2547  RGB GetFillColor() const;
2548 
2556  void SetFillColor(RGB fill_color);
2557 
2567  RectF GetInnerRect() const;
2579  void SetInnerRect(const RectF& inner_rect);
2580 };
2581 
2596 class Circle FS_FINAL : public Markup {
2597  public:
2599  Circle() {}
2605  explicit Circle(const Annot& annot);
2607  ~Circle() {}
2608 
2615  RGB GetFillColor() const;
2616 
2627  void SetFillColor(RGB fill_color);
2628 
2638  RectF GetInnerRect() const;
2639 
2653  void SetInnerRect(const RectF& inner_rect);
2654 };
2655 
2675 class FreeText FS_FINAL : public Markup {
2676  public:
2684  explicit FreeText(const Annot& annot);
2687 
2698  RGB GetFillColor() const;
2712  void SetFillColor(RGB fill_color);
2713 
2723 
2737  void SetAlignment(common::Alignment alignment);
2738 
2749  RectF GetInnerRect() const;
2750 
2765  void SetInnerRect(const RectF& inner_rect);
2766 
2776 
2799  bool SetDefaultAppearance(const DefaultAppearance& default_ap);
2800 
2812 
2827  void SetCalloutLineEndingStyle(EndingStyle ending_style);
2828 
2843 
2866  void SetCalloutLinePoints(const PointFArray& point_array);
2867 
2880  void SetTextMatrix(const Matrix& text_matrix);
2881 
2890  Matrix GetTextMatrix() const;
2891 };
2892 
2911 class Line FS_FINAL : public Markup {
2912  public:
2918  typedef enum _CapPos {
2923  } CapPos;
2924 
2925 
2927  Line() {}
2933  explicit Line(const Annot& annot);
2935  ~Line() {}
2936 
2958  void SetLineStartStyle(EndingStyle ending_style);
2967  EndingStyle GetLineEndStyle() const;
2980  void SetLineEndStyle(EndingStyle ending_style);
2981 
2992  RGB GetStyleFillColor() const;
2993 
3007  void SetStyleFillColor(RGB color);
3008 
3017  PointF GetStartPoint() const;
3030  void SetStartPoint(const PointF& point);
3031 
3040  PointF GetEndPoint() const;
3053  void SetEndPoint(const PointF& point);
3054 
3063  bool HasCaption() const;
3076  void EnableCaption(bool cap);
3077 
3105  void SetCaptionPositionType(CapPos cap_position);
3118  Offset GetCaptionOffset() const;
3134  void SetCaptionOffset(const Offset& offset);
3135 
3150  float GetLeaderLineLength() const;
3168  void SetLeaderLineLength(float length);
3178  float GetLeaderLineExtensionLength() const;
3191  void SetLeaderLineExtensionLength(float extension_length);
3192 
3203  float GetLeaderLineOffset() const;
3217  void SetLeaderLineOffset(float offset);
3218 
3232  void SetMeasureRatio(const String& ratio);
3254  void SetMeasureUnit(int measure_type, const String& unit);
3265  String GetMeasureUnit(int measure_type);
3277  void SetMeasureConversionFactor(int measure_type, float factor);
3288  float GetMeasureConversionFactor(int measure_type);
3289 };
3290 
3308 class Ink FS_FINAL : public Markup {
3309  public:
3311  Ink() {}
3317  explicit Ink(const Annot& annot);
3319  ~Ink() {}
3347 
3380  void SetInkList(const common::Path& ink_list);
3381 };
3382 
3407 class Stamp FS_FINAL : public Markup {
3408  public:
3410  Stamp() {}
3416  explicit Stamp(const Annot& annot);
3418  ~Stamp();
3430  String GetIconName() const;
3453  void SetIconName(const char* icon_name);
3464  void SetBitmap(const common::Bitmap& bitmap);
3465 
3488  void SetImage(const common::Image& image, int frame_index, int compress);
3489 };
3490 
3503 class Screen FS_FINAL : public Annot {
3504  public:
3506  Screen() {}
3512  explicit Screen(const Annot& annot);
3514  virtual ~Screen() {}
3515 
3538  void SetImage(const common::Image& image, int frame_index, int compress);
3539 
3549 
3557 
3570  void SetRotation(common::Rotation rotate);
3571 
3579 
3588  float GetOpacity() const;
3601  void SetOpacity(float opacity);
3602 
3608  WString GetTitle() const;
3616  void SetTitle(const WString& title);
3617 
3651  void SetAction(const actions::Action& action);
3660  void RemoveAction();
3661 };
3662 
3681 class Polygon FS_FINAL : public Markup {
3682  public:
3684  Polygon() {}
3690  explicit Polygon(const Annot& annot);
3701  RGB GetFillColor() const;
3702 
3714  void SetFillColor(RGB fill_color);
3715 
3725 
3737  void SetVertexes(const PointFArray& vertexes);
3738 };
3739 
3759 class PolyLine FS_FINAL : public Markup {
3760  public:
3768  explicit PolyLine(const Annot& annot);
3781  RGB GetStyleFillColor() const;
3793  void SetStyleFillColor(RGB fill_color);
3794 
3804 
3816  void SetVertexes(const PointFArray& vertexes);
3839  void SetLineStartStyle(EndingStyle starting_style);
3848  EndingStyle GetLineEndStyle() const;
3862  void SetLineEndStyle(EndingStyle ending_style);
3863 };
3864 
3877 class Caret FS_FINAL : public Markup {
3878  public:
3880  Caret() {}
3886  explicit Caret(const Annot& annot);
3888  ~Caret() {}
3889 
3899  RectF GetInnerRect() const;
3913  void SetInnerRect(const RectF& inner_rect);
3914 };
3915 
3928 class FileAttachment FS_FINAL : public Markup {
3929  public:
3937  explicit FileAttachment(const Annot& annot);
3940 
3948  bool SetFileSpec(const FileSpec& file_spec);
3949 
3957 
3968  String GetIconName() const;
3969 
3985  void SetIconName(const char* icon_name);
3986 };
3987 
3997 class Popup FS_FINAL : public Annot {
3998  public:
4000  Popup() {}
4006  explicit Popup(const Annot& annot);
4007  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
4008  explicit Popup(FS_HANDLE handle);
4010  ~Popup() {}
4011 
4024  bool GetOpenStatus() const;
4039  void SetOpenStatus(bool status);
4040 };
4059 class PSInk FS_FINAL : public Annot {
4060  public:
4062  PSInk() {}
4068  explicit PSInk(const Annot& annot);
4069  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
4070  explicit PSInk(FS_HANDLE handle);
4072  ~PSInk() {}
4073 };
4074 
4087 class Widget FS_FINAL : public Annot {
4088  public:
4090  Widget() {}
4096  explicit Widget(const Annot& annot);
4097  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
4098  explicit Widget(FS_HANDLE handle);
4100  ~Widget();
4107 
4114 
4125 
4138 
4149 
4173  void SetAction(const actions::Action& action);
4174 
4183  void RemoveAction();
4184 
4196  bool HasMKEntry(MKEntry mk_entry);
4208  void RemoveMKEntry(MKEntry mk_entry);
4234  void SetMKRotation(common::Rotation rotation);
4245  RGB GetMKBorderColor() const;
4256  void SetMKBorderColor(RGB color);
4267  RGB GetMKBackgroundColor() const;
4278  void SetMKBackgroundColor(RGB color);
4292  WString GetMKNormalCaption() const;
4306  void SetMKNormalCaption(const wchar_t* caption);
4321  WString GetMKRolloverCaption() const;
4336  void SetMKRolloverCaption(const wchar_t* caption);
4350  WString GetMKDownCaption() const;
4364  void SetMKDownCaption(const wchar_t* caption);
4391  void SetMKNormalIconBitmap(const common::Bitmap& bitmap);
4407  void SetMKNormalIconImage(const common::Image& image, int frame_index);
4436  void SetMKRolloverIconBitmap(const common::Bitmap& bitmap);
4453  void SetMKRolloverIconImage(const common::Image& image, int frame_index);
4480  void SetMKDownIconBitmap(const common::Bitmap& bitmap);
4496  void SetMKDownIconImage(const common::Image& image, int frame_index);
4510  IconFit GetMKIconFit() const;
4526  void SetMKIconFit(const IconFit& icon_fit);
4527 
4556 
4557 };
4558 
4575 class Redact FS_FINAL : public Markup {
4576  public:
4578  Redact() {}
4584  explicit Redact(const Annot& annot);
4585  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
4586  explicit Redact(FS_HANDLE handle);
4588  ~Redact();
4589 
4596  RGB GetFillColor() const;
4604  void SetFillColor(RGB fill_color);
4605 
4612  RGB GetApplyFillColor() const;
4613 
4621  void SetApplyFillColor(RGB fill_color);
4622 };
4623 } // namespace annots
4624 } // namespace pdf
4625 } // namespace foxit
4626 
4627 #endif // FS_ANNOT_H_
4628 
Annotation type: caret annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:789
Definition: fs_annot.h:3503
Annotation type: sound annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:797
~FileAttachment()
Destructor.
Definition: fs_annot.h:3939
Definition: fs_annot.h:3997
Annotation type: strikeout annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:785
RectI GetDeviceRect(bool is_transform_icon, const Matrix &matrix)
Get annotation rectangle in device coordinate system.
RGB GetFillColor() const
Get fill color.
Definition: fs_pdfform.h:1061
Definition: fs_annot.h:1332
RGB GetStyleFillColor() const
Get fill color for some line ending styles.
Annotation type: watermark annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:812
void SetInnerRect(const RectF &inner_rect)
Set the inner rectangle.
EndingStyle GetLineEndStyle() const
Get line ending style of the end point.
void SetMKNormalIconBitmap(const common::Bitmap &bitmap)
Set a bitmap as normal icon in the MK dictionary.
void SetLeaderLineExtensionLength(float extension_length)
Set the length of leader line extension.
objects::PDFDictionary * GetDict() const
Get annotation's dictionary object.
Markup GetReplyTo()
Get the markup annotation, which current note annotation is in reply to.
~Note()
Destructor.
Definition: fs_annot.h:2089
Caption above the icon.
Definition: fs_annot.h:1011
FileAttachment()
Constructor.
Definition: fs_annot.h:3931
int GetSize() const
Get the number of elements in the array.
Definition: fx_basic.h:1350
bool operator !=(const Annot &other) const
Not equal operator.
Annotation type: redact annotation.
Definition: fs_annot.h:818
ShadingColor()
Constructor.
Definition: fs_annot.h:1345
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:216
void SetMKDownCaption(const wchar_t *caption)
Set the down caption string in the MK dictionary.
int GetIndex() const
Get the index of current annotation in the page which current annotation belongs to.
Annotation type: square annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:771
RectF GetInnerRect() const
Get the inner rectangle.
void SetMKIconFit(const IconFit &icon_fit)
Set the icon fit information in the MK dictionary.
Definition: fs_filespec.h:38
WString GetMKRolloverCaption() const
Get the rollover caption string in the MK dictionary.
void SetIconName(const char *icon_name)
Set icon name.
Definition: fs_annot.h:2076
Circle()
Constructor.
Definition: fs_annot.h:2599
Type GetType() const
Get actual annotation type of current annotation.
~Popup()
Destructor.
Definition: fs_annot.h:4010
~Underline()
Destructor.
Definition: fs_annot.h:2337
String GetIconName() const
Get icon name.
PointF third
Third point of quadrilateral, in PDF coordinate system.
Definition: fs_annot.h:523
void SetIconName(const char *icon_name)
Set icon name.
Background color entry. "BG" in MK dictionary.
Definition: fs_annot.h:953
Definition: fs_action.h:417
void SetModifiedDateTime(const DateTime &date_time)
Set last modified date time.
Definition: fs_basictypes.h:375
Annotation type: 3D annotation. One of standard annotation in <PDF reference 1.7>.
Definition: fs_annot.h:814
RectF GetRect() const
Get rectangle, in PDF coordinate system.
Annotation flag: locked contents.
Definition: fs_annot.h:898
Definition: fs_annot.h:749
Annotation flag: hidden.
Definition: fs_annot.h:839
void SetInnerRect(const RectF &inner_rect)
Set the inner rectangle.
No icon; captin only.
Definition: fs_annot.h:1005
void SetState(State state)
Set the state.
void Set(float width, Style style, float intensity, float dash_phase, const FloatArray &dashes)
Set value.
Definition: fs_annot.h:370
Annotation's rollover appearance.
Definition: fs_annot.h:1029
Caption below the icon.
Definition: fs_annot.h:1009
void SetLeaderLineOffset(float offset)
Set the length of leader line offset.
bool is_proportional_scaling
A boolean value which indicates whether use proportional scaling or not.
Definition: fs_annot.h:697
bool ResetAppearanceStream()
Reset appearance stream.
RGB GetFillColor() const
Get fill color.
~Highlight()
Destructor.
Definition: fs_annot.h:2307
PointFArray GetVertexes()
Get vertexes.
Highlighting mode: Push, which is to display the annotation's down appearance, if any.
Definition: fs_annot.h:914
bool IsStateAnnot()
Check if current note annotation is used as a state annotation.
EndingStyle GetLineStartStyle() const
Get line ending style of the start point.
Definition: fs_annot.h:2296
CFX_Object Object
Object type.
Definition: fs_basictypes.h:219
bool IsMarkup() const
Check if current annotation is a markup annotation.
Annotation type: screen annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:806
void SetImage(const common::Image &image, int frame_index, int compress)
Set image to current screen annotation, with a specified frame index.
Widget()
Constructor.
Definition: fs_annot.h:4090
bool GetOpenStatus() const
Get open status.
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
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.
Highlight()
Constructor.
Definition: fs_annot.h:2299
Annotation property: fill color.
Definition: fs_annot.h:939
void SetCalloutLineEndingStyle(EndingStyle ending_style)
Set line ending style of the start point in a callout line.
void SetUniqueID(const WString &unique_id)
Set unique ID.
Square()
Constructor.
Definition: fs_annot.h:2531
void SetMKDict(pdf::objects::PDFDictionary *dict)
Set the appearance characteristics dictionary (known as "MK" dictionary as well).
void SetFillColor(RGB fill_color)
Set fill color.
void SetEndPoint(const PointF &point)
Set the end point.
Caption to the left of the icon.
Definition: fs_annot.h:1015
BorderInfo & operator=(const BorderInfo &border_info)
Assign operator.
Definition: fs_annot.h:302
Annotation flag: toggle no view.
Definition: fs_annot.h:891
actions::Action GetAction()
Get action.
void SetMKRotation(common::Rotation rotation)
Set the rotation value in the MK dictionary.
void SetLineStartStyle(EndingStyle ending_style)
Set line ending style of the start point.
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:1518
virtual String GetProviderVersion()
A callback function used to get provider version.
Definition: fs_annot.h:1448
void SetAlignment(common::Alignment alignment)
Set alignment value.
State
Enumeration for markup annotation's state.
Definition: fs_annot.h:1583
~PolyLine()
Destructor.
Definition: fs_annot.h:3770
IconFit(ScaleWayType type, bool is_proportional_scaling, float horizontal_fraction, float vertical_fraction, bool fit_bounds)
Constructor, with parameters.
Definition: fs_annot.h:584
void SetCaptionPositionType(CapPos cap_position)
Set the position type of caption.
Definition: fs_annot.h:2386
void SetContent(const WString &content)
Set content.
String GetMeasureUnit(int measure_type)
Get the label for displaying the units for measuring.
pdf::objects::PDFDictionary * GetMKDict() const
Get the appearance characteristics dictionary (known as "MK" dictionary as well).
Annotation flag: no zoom.
Definition: fs_annot.h:854
Header file for common definitions and classes.
~TextMarkup()
Destructor.
Definition: fs_annot.h:2241
void SetBitmap(const common::Bitmap &bitmap)
Set bitmap to current stamp annotation.
virtual ~Annot()
Destructor.
EndingStyle GetCalloutLineEndingStyle() const
Get line ending style of the start point in a callout line.
Definition: fs_annot.h:2528
Screen()
Constructor.
Definition: fs_annot.h:3506
bool operator !=(const QuadPoints &quad_points) const
Not equal operator.
Definition: fs_annot.h:496
ARGB second_color
Second color used for shading. Format: 0xAARRGGBB.
Definition: fs_annot.h:1409
Border style: Cloudy.
Definition: fs_annot.h:243
Annotation type: pop-up annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:816
float GetLeaderLineExtensionLength() const
Get the length of leader line extension.
Annotation type: free text annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:767
Border style: Solid.
Definition: fs_annot.h:209
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
Definition: fs_annot.h:2326
Alignment
Enumeration for alignment (horizontal).
Definition: fs_common.h:239
PolyLine()
Constructor.
Definition: fs_annot.h:3762
float GetLeaderLineOffset() const
Get the length of leader line offset.
Definition: fs_annot.h:3407
void Set(const PointF &first, const PointF &second, const PointF &third, const PointF &fourth)
Set value.
Definition: fs_annot.h:511
bool HasCaption() const
Check whether the content of current line annotation should be replicated as a caption in the appeara...
Highlighting mode: Invert, which is to invert the contents of the annotation rectangle.
Definition: fs_annot.h:910
void SetMeasureUnit(int measure_type, const String &unit)
Set the label for displaying the units for measuring.
~Circle()
Destructor.
Definition: fs_annot.h:2607
Border color entry. "BC" in MK dictionary.
Definition: fs_annot.h:951
uint32 GetFlags() const
Get annotation flags.
Header file for file operation related definitions and functions.
Indicates property font of pdf::DefaultAppearance is meaningful.
Definition: fs_annot.h:60
ShadingColor(ARGB firstcolor, ARGB secondcolor)
Constructor, with parameters.
Definition: fs_annot.h:1340
void SetInnerRect(const RectF &inner_rect)
Set the inner rectangle.
void SetMKRolloverCaption(const wchar_t *caption)
Set the rollover caption string in the MK dictionary.
Definition: fs_annot.h:4087
void Set(ARGB firstcolor, ARGB secondcolor)
Set value.
Definition: fs_annot.h:1401
uint32 ARGB
ARGB color type, 32 bits, ((b) | ((g) << 8) | ((r) << 16)) | ((a) << 24)
Definition: fs_basictypes.h:212
WString GetUniqueID() const
Get unique ID.
IconFit()
Constructor.
Definition: fs_annot.h:554
common::Bitmap GetMKNormalIconBitmap()
Get the normal icon bitmap in the MK dictionary.
Border style: Dashed.
Definition: fs_annot.h:216
bool SetDefaultAppearance(const DefaultAppearance &default_ap)
Set default appearance data.
Annotation flag: print.
Definition: fs_annot.h:847
void SetBorderColor(RGB color)
Set border color.
Annotation flag: no view.
Definition: fs_annot.h:869
Matrix GetTextMatrix() const
Get matrix in default appearance data for text in current free text annotation.
Offset GetCaptionOffset() const
Get caption offset values.
~PSInk()
Destructor.
Definition: fs_annot.h:4072
Definition: fs_annot.h:2922
PSInk()
Constructor.
Definition: fs_annot.h:4062
Markup()
Constructor.
Definition: fs_annot.h:1663
ARGB first_color
First color used for shading. Format: 0xAARRGGBB.
Definition: fs_annot.h:1407
StateModel GetStateModel()
Get the state model.
No caption; icon only.
Definition: fs_annot.h:1007
RGB GetMKBorderColor() const
Get the border color in the MK dictionary.
Definition: fs_common.h:1467
Annotation type: file attachment annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:795
RectF GetInnerRect() const
Get the inner rectangle.
virtual ~Screen()
Destructor.
Definition: fs_annot.h:3514
Annotation type: note annotation, which is just "Text" annotation - one of standard annotation in <PD...
Definition: fs_annot.h:763
bool GetOpenStatus() const
Get open status.
Annotation type: unknown.
Definition: fs_annot.h:758
Stamp()
Constructor.
Definition: fs_annot.h:3410
ShadingColor(const ShadingColor &shading_color)
Constructor, with another shading color object.
Definition: fs_annot.h:1354
Annotation flag: invisible.
Definition: fs_annot.h:833
Definition: fs_annot.h:2356
Definition: fs_annot.h:2675
Definition: fs_annot.h:1564
Definition: fs_annot.h:3308
Caret()
Constructor.
Definition: fs_annot.h:3880
FloatArray dashes
A dash array that represents the dash patterns.
Definition: fs_annot.h:417
Line()
Constructor.
Definition: fs_annot.h:2927
PointF GetEndPoint() const
Get the end point.
DefaultAppearance(const DefaultAppearance &default_appearance)
Constructor, with another default appearance object.
Definition: fs_annot.h:98
Definition: fs_annot.h:2596
Icon and caption relation entry. "TP" in MK dictionary.
Definition: fs_annot.h:995
DefAPFlags
Enumeration for default appearance flags.
Definition: fs_annot.h:58
void SetInkList(const common::Path &ink_list)
Set ink list data.
WString GetMKNormalCaption() const
Get the normal caption string in the MK dictionary.
Definition: fs_annot.h:4575
Annotation flag: locked.
Definition: fs_annot.h:885
ScaleWayType scale_way_type
The circumstances under which the icon should be scaled inside the annotation rectangle....
Definition: fs_annot.h:688
void SetVertexes(const PointFArray &vertexes)
Set vertexes.
void SetHighlightingMode(HighlightingMode mode)
Set highlighting mode.
PointF first
First point of quadrilateral, in PDF coordinate system.
Definition: fs_annot.h:519
Caption overlaid directly on the icon.
Definition: fs_annot.h:1017
Annotation property: modified date.
Definition: fs_annot.h:926
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:1473
Normal icon entry. "I" in MK dictionary.
Definition: fs_annot.h:973
void SetTitle(const WString &title)
Set title of current screen annotation.
void SetLineEndStyle(EndingStyle ending_style)
Set line ending style of the end point.
BorderInfo(float width, Style style, float intensity, float dash_phase, const FloatArray &dashes)
Constructor, with parameters.
Definition: fs_annot.h:264
AppearanceType
Enumeration for the type of annotation's appearance.
Definition: fs_annot.h:1025
Rollover icon entry. "RI" in MK dictionary.
Definition: fs_annot.h:978
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:1501
Highlighting mode: Toggle. This is only useful for widget annotation.
Definition: fs_annot.h:916
Definition: fs_pdfform.h:145
void RemoveAction()
Remove action.
Highlighting mode: No highlighting.
Definition: fs_annot.h:908
Annotation flag: no rotate.
Definition: fs_annot.h:861
interform::Control GetControl()
Get associated form control.
BYTE STRING CLASS.
Definition: fx_string.h:317
void SetMeasureConversionFactor(int measure_type, float factor)
Set the conversion factor for measuring.
void SetLineStartStyle(EndingStyle starting_style)
Set line ending style of the start point.
String GetMeasureRatio()
Get the scale ratio string for measuring.
RectF GetInnerRect() const
Get the inner rectangle.
Definition: fs_annot.h:1329
void SetBorderInfo(const BorderInfo &border)
Set border information.
Property
Enumeration for some PDF annotation property.
Definition: fs_annot.h:924
void SetVertexes(const PointFArray &vertexes)
Set vertexes.
DefaultAppearance()
Constructor.
Definition: fs_annot.h:88
PDFPage GetPage() const
Get the related PDF page.
void SetOpenStatus(bool status)
Set open status.
QuadPoints(const QuadPoints &quad_points)
Constructor, with another quadrilateral points object.
Definition: fs_annot.h:455
PointF fourth
Fourth point of quadrilateral, in PDF coordinate system.
Definition: fs_annot.h:525
DefaultAppearance(uint32 flags, const common::Font &font, float text_size, RGB text_color)
Constructor, with parameters.
Definition: fs_annot.h:81
Annotation's normal appearance.
Definition: fs_annot.h:1027
Annotation type: highlight annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:779
Border style: Underline.
Definition: fs_annot.h:222
IconFit GetMKIconFit() const
Get the icon fit information in the MK dictionary.
actions::Action GetAction()
Get action.
void SetLineEndStyle(EndingStyle ending_style)
Set line ending style of the end point.
void SetRotation(common::Rotation rotate)
Set the rotation of the image used for the appearance of current screen annotation.
Polygon()
Constructor.
Definition: fs_annot.h:3684
BorderInfo()
Constructor.
Definition: fs_annot.h:273
StateModel
Enumeration for markup annotation's state model.
Definition: fs_annot.h:1571
bool SetFileSpec(const FileSpec &file_spec)
Set a file specification, which should specify an embedded file.
Definition: fx_coordinates.h:30
FileSpec GetFileSpec()
Get the file specification.
RGB GetBorderColor() const
Get border color.
Annotation type: movie annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:799
Rotation
Enumeration for rotation.
Definition: fs_common.h:221
Annotation type: underline annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:781
EndingStyle
Enumeration for line ending style.
Definition: fs_annot.h:1626
Definition: fs_annot.h:200
float GetOpacity() const
Get opacity value.
void RemoveAction()
Remove action.
bool HasMKEntry(MKEntry mk_entry)
Check if a specified entry exists in the MK dictionary.
interform::Field GetField()
Get associated form field.
~Caret()
Destructor.
Definition: fs_annot.h:3888
void SetAction(const actions::Action &action)
Set action.
void SetFillColor(RGB fill_color)
Set fill color.
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
RGB GetStyleFillColor() const
Get fill color for ending styles.
BorderInfo GetBorderInfo() const
Get border information.
void SetApplyFillColor(RGB fill_color)
Set the filling color which is used for rollover appearance and will be used after redaction is appli...
objects::PDFDictionary * GetOptionalContent() const
Get the PDF dictionary of annotation's optional content.
~Squiggly()
Destructor.
Definition: fs_annot.h:2397
bool IsEmpty() const
Check whether current object is empty or not.
Header file for PDF object related definitions and classes.
uint32 flags
Flags to indicate which properties of default appearance are meaningful.
Definition: fs_annot.h:175
void SetCalloutLinePoints(const PointFArray &point_array)
Set points for callout line.
Annotation type: polygon annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:775
Annotation property: border color.
Definition: fs_annot.h:933
void SetMKDownIconBitmap(const common::Bitmap &bitmap)
Set the down icon bitmap in the MK dictionary.
bool RemoveProperty(Property property)
Remove a specified annotation's property.
void SetMKNormalCaption(const wchar_t *caption)
Set the normal caption string in the MK dictionary.
StrikeOut()
Constructor.
Definition: fs_annot.h:2359
Foxit namespace.
Definition: fs_connectedpdf.h:26
void SetImage(const common::Image &image, int frame_index, int compress)
Set image to current stamp annotation, with a specified frame index.
Highlighting mode: Outline, which is to invert the annotation's border.
Definition: fs_annot.h:912
Underline()
Constructor.
Definition: fs_annot.h:2329
void SetOpacity(float opacity)
Set opacity value.
WString GetTitle() const
Get title of current screen annotation.
void SetMKIconCaptionRelation(MKIconCaptionRelation relation)
Set the relation of icon and caption in the MK dictionary.
common::Bitmap GetMKDownIconBitmap()
Get the down icon bitmap in the MK dictionary.
void SetMKBackgroundColor(RGB color)
Set the background color in the MK dictionary.
Indicates property text size of pdf::DefaultAppearance is meaningful.
Definition: fs_annot.h:64
common::Font font
A font for default appearance. It should be a valid font object when it is useful.
Definition: fs_annot.h:181
FreeText()
Constructor.
Definition: fs_annot.h:2678
void SetStartPoint(const PointF &point)
Set the start point.
DefaultAppearance GetDefaultAppearance()
Get default appearance data.
bool operator==(const QuadPoints &quad_points) const
Equal operator.
Definition: fs_annot.h:484
Icon fit information entry. "IF" in MK dictionary.
Definition: fs_annot.h:988
~StrikeOut()
Destructor.
Definition: fs_annot.h:2367
RGB GetFillColor() const
Get fill color.
RGB GetFillColor() const
Get fill color.
virtual String GetProviderID()
A callback function used to get provider ID.
Definition: fs_annot.h:1437
ScaleWayType
Enumeration for the type of icon scaling way.
Definition: fs_annot.h:541
Rotation entry. "R" in MK dictionary.
Definition: fs_annot.h:949
Definition: fs_annot.h:430
common::Bitmap GetMKRolloverIconBitmap()
Get the rollover icon bitmap in the MK dictionary.
Header file for image and bitmap related definitions and classes.
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:1534
DateTime GetModifiedDateTime() const
Get last modified date time.
PointF second
Second point of quadrilateral, in PDF coordinate system.
Definition: fs_annot.h:521
Definition: fs_annot.h:4059
void Set(ScaleWayType type, bool is_proportional_scaling, float horizontal_fraction, float vertical_fraction, bool fit_bounds)
Set value.
Definition: fs_annot.h:675
Indicates property text color of pdf::DefaultAppearance is meaningful.
Definition: fs_annot.h:62
Definition: fs_annot.h:3877
RectF GetInnerRect() const
Get the inner rectangle.
void SetMKBorderColor(RGB color)
Set the border color in the MK dictionary.
void SetStyleFillColor(RGB color)
Set fill color for ending styles.
Definition: fs_pdfobject.h:763
Annotation type: circle annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:773
Annotation type: line annotation. One of standard annotation in <PDF reference 1.7>.
Definition: fs_annot.h:769
Annotation's down appearance.
Definition: fs_annot.h:1031
bool operator !=(const BorderInfo &border_info) const
Not equal operator.
Definition: fs_annot.h:338
MKIconCaptionRelation GetMKIconCaptionRelation() const
Get the relation of icon and caption in the MK dictionary.
MKIconCaptionRelation
Enumeration for icon and caption relative position in annotation's MK dictionary.
Definition: fs_annot.h:1003
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
Down caption (or alternate caption) entry. "AC" in MK dictionary.
Definition: fs_annot.h:968
void SetLeaderLineLength(float length)
Set the length of leader line.
void SetMKDownIconImage(const common::Image &image, int frame_index)
Set an image with specified frame index as down icon in the MK dictionary.
Normal caption entry. "CA" in MK dictionary.
Definition: fs_annot.h:958
Annotation type: ink annotation. One of standard annotation in <PDF reference 1.7>.
Definition: fs_annot.h:791
IconFit(const IconFit &icon_fit)
Constructor, with another icon fit object.
Definition: fs_annot.h:597
Definition: fs_annot.h:2230
bool operator==(const BorderInfo &border_info) const
Equal operator.
Definition: fs_annot.h:318
WString GetContent() const
Get content.
~FreeText()
Destructor.
Definition: fs_annot.h:2686
Annotation type: stamp annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:787
RGB GetFillColor() const
Get fill color.
EndingStyle GetLineEndStyle() const
Get line ending style of the end point.
float GetMeasureConversionFactor(int measure_type)
Get the conversion factor for measuring.
bool Move(const RectF &rect)
Move current annotation to a new position, specified by a new rectangle in PDF coordinate system.
void Set(uint32 flags, const common::Font &font, float text_size, RGB text_color)
Set value.
Definition: fs_annot.h:161
PointFArray GetCalloutLinePoints() const
Get a point of callout line points.
Definition: fx_coordinates.h:763
float cloud_intensity
Intensity of the cloudy effect.
Definition: fs_annot.h:402
float text_size
Text size for default appearance. It should be above 0 when it is useful.
Definition: fs_annot.h:187
RGB text_color
Text color for default appearance. Format: 0xRRGGBB.
Definition: fs_annot.h:193
void SetFillColor(RGB fill_color)
Set fill color.
uint32 RGB
RGB color type, 24 bits, ((b) | ((g) << 8) | ((r) << 16)))
Definition: fs_basictypes.h:214
Annotation flag: read only.
Definition: fs_annot.h:878
Popup()
Constructor.
Definition: fs_annot.h:4000
void SetMeasureRatio(const String &ratio)
Set the scale ratio string for measuring.
Definition: fs_annot.h:1421
Border style: Beveled.
Definition: fs_annot.h:229
Annotation type: widget annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:804
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:1460
Definition: fs_pdfpage.h:307
QuadPointsArray GetQuadPoints() const
Get quadrilaterals.
~Markup()
Destructor.
Definition: fs_annot.h:1666
void SetStyleFillColor(RGB fill_color)
Set fill color for some line ending styles.
EndingStyle GetLineStartStyle() const
Get line ending style of the start point.
common::Rotation GetMKRotation() const
Get the rotation value in the MK dictionary.
void SetInnerRect(const RectF &inner_rect)
Set the inner rectangle.
virtual void Release()=0
A callback function used to release current callback object itself.
RGB GetApplyFillColor() const
Get the filling color which is used for rollover appearance and will be used after redaction is appli...
TextMarkup()
Constructor.
Definition: fs_annot.h:2233
String GetIconName() const
Get icon name.
CapPos
Enumeration for the position type of caption.
Definition: fs_annot.h:2918
void SetMKRolloverIconBitmap(const common::Bitmap &bitmap)
Set the rollover icon bitmap in the MK dictionary.
Annotation type: link annotation. One of standard annotation in <PDF reference 1.7>.
Definition: fs_annot.h:765
void SetOpenStatus(bool status)
Set open status.
Annotation type: trap network annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:810
void SetCaptionOffset(const Offset &offset)
Set caption offset values.
HighlightingMode GetHighlightingMode()
Get highlighting mode.
Annot & operator=(const Annot &annot)
Assign operator.
Definition: fs_image.h:426
PointF GetStartPoint() const
Get the start point.
Definition: fs_annot.h:1544
Annotation type: squiggly annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:783
Type
Enumeration for PDF annotation type.
Definition: fs_annot.h:756
void SetFillColor(RGB fill_color)
Set fill color.
QuadPoints(const PointF &first, const PointF &second, const PointF &third, const PointF &fourth)
Constructor, with parameters.
Definition: fs_annot.h:440
void SetFlags(uint32 flags)
Set annotation flags.
objects::PDFStream * GetAppearanceStream(AppearanceType type, const char *appearance_state="") const
Get annotation's appearance stream with specified type and state.
Annotation type: pressure sensitive ink annotation.
Definition: fs_annot.h:793
void SetAction(const actions::Action &action)
Set action.
Definition: fx_coordinates.h:594
Annot()
Constructor.
Definition: fs_annot.h:1052
void RemoveMKEntry(MKEntry mk_entry)
Remove a specified entry from the MK dictionary.
Definition: fs_common.h:1188
void SetMKRolloverIconImage(const common::Image &image, int frame_index)
Set an image with specified frame index as rollover icon in the MK dictionary.
Down icon (or alternate icon) entry. "IX" in MK dictionary.
Definition: fs_annot.h:983
Annotation type: printer's mark annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:808
float dash_phase
Dash phase.
Definition: fs_annot.h:409
QuadPoints & operator=(const QuadPoints &quad_points)
Assign operator.
Definition: fs_annot.h:469
Definition: fx_coordinates.h:1053
Caption to the right of the icon.
Definition: fs_annot.h:1013
RGB GetMKBackgroundColor() const
Get the background color in the MK dictionary.
Rollover caption entry. "RC" in MK dictionary.
Definition: fs_annot.h:963
bool operator==(const Annot &other) const
Equal operator.
bool operator !=(const DefaultAppearance &default_appearance) const
Not equal operator.
Definition: fs_annot.h:139
DefaultAppearance & operator=(const DefaultAppearance &default_appearance)
Assign operator.
Definition: fs_annot.h:111
WString GetMKDownCaption() const
Get the down caption string in the MK dictionary.
PointFArray GetVertexes()
Get vertexes.
QuadPoints()
Constructor.
Definition: fs_annot.h:448
void SetFillColor(RGB fill_color)
Set fill color.
Squiggly()
Constructor.
Definition: fs_annot.h:2389
void SetTextMatrix(const Matrix &text_matrix)
Set matrix in default appearance data for text in current free text annotation.
~Polygon()
Destructor.
Definition: fs_annot.h:3692
Definition: fs_annot.h:3759
Definition: fs_annot.h:51
Definition: fs_pdfobject.h:385
Border style: Inset.
Definition: fs_annot.h:236
WIDE STRING CLASS.
Definition: fx_string.h:1470
void EnableCaption(bool cap)
Set the flag which is used to decide whether the content of current line annotation should be replica...
CFX_ByteString String
Byte string.
Definition: fs_basictypes.h:223
Definition: fs_annot.h:2911
Definition: fs_image.h:36
float width
Border width, in points.
Definition: fs_annot.h:383
Annotation type: polyline annotation. One of standard annotation in <PDF reference 1....
Definition: fs_annot.h:777
~BorderInfo()
Destructor.
Definition: fs_annot.h:280
~Ink()
Destructor.
Definition: fs_annot.h:3319
BorderInfo(const BorderInfo &border_info)
Constructor, with another border information object.
Definition: fs_annot.h:287
Definition: fs_annot.h:3681
Style
Enumeration for PDF annotation border style.
Definition: fs_annot.h:207
float GetLeaderLineLength() const
Get the length of leader line.
FX_UINT32 uint32
32-bit unsigned integer.
Definition: fs_basictypes.h:198
common::Alignment GetAlignment() const
Get alignment value.
void SetMKNormalIconImage(const common::Image &image, int frame_index)
Set an image with specified frame index as normal icon in the MK dictionary.
void SetQuadPoints(const QuadPointsArray &quad_points_array)
Set quadrilaterals.
common::Rotation GetRotation()
Get the rotation of the image used for the appearance of current screen annotation.
Definition: fs_annot.h:529
String GetIconName() const
Get icon name.
Definition: fs_basictypes.h:342
Flags
Enumeration for PDF annotation flags.
Definition: fs_annot.h:826
~Line()
Destructor.
Definition: fs_annot.h:2935
State GetState()
Get the state.
void SetIconName(const char *icon_name)
Set icon name.
Definition: fs_annot.h:535
bool operator==(const DefaultAppearance &default_appearance) const
Equal operator.
Definition: fs_annot.h:126
Note()
Constructor.
Definition: fs_annot.h:2079
Ink()
Constructor.
Definition: fs_annot.h:3311
HighlightingMode
Enumeration for PDF annotation highlighting mode.
Definition: fs_annot.h:906
CapPos GetCaptionPositionType() const
Get the position type of caption.
Definition: fs_annot.h:2920
Annotation property: creation date.
Definition: fs_annot.h:931
Definition: fs_annot.h:3928
Redact()
Constructor.
Definition: fs_annot.h:4578
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
common::Path GetInkList()
Get ink list data.
~Square()
Destructor.
Definition: fs_annot.h:2539

Foxit Software Corporation Logo
@2019 Foxit Software Incorporated. All rights reserved.