Foxit PDF SDK
fs_snappointmgr.h
Go to the documentation of this file.
1 
15 #ifndef FS_SNAPPOINTMGR_H_
16 #define FS_SNAPPOINTMGR_H_
17 
18 #include "common/fs_common.h"
19 #include "pdf/fs_pdfpage.h"
20 
26 namespace foxit {
30 namespace pdf {
36 class SnappedPoint FS_FINAL : public Base {
37  public:
43  typedef enum _SnappedPointType {
55 
56 
57  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
58  explicit SnappedPoint(FS_HANDLE handle = NULL);
59 
61  ~SnappedPoint();
62 
68  SnappedPoint(const SnappedPoint& other);
76  SnappedPoint& operator=(const SnappedPoint& other);
77 
86  bool operator==(const SnappedPoint& other) const;
95  bool operator!=(const SnappedPoint& other) const;
96 
104  bool IsEmpty() const;
105 
113 
121  PointF GetPoint();
122 };
123 
127 class SnapPointMgr FS_FINAL : public Base {
128  public:
134  typedef enum _SnapPointFlags {
136  e_FlagEndpoint = 0x0001,
138  e_FlagMidpoint = 0x0002,
143  } SnapPointFlags;
144 
145 
151  explicit SnapPointMgr(const PDFPage& page);
152 
158  SnapPointMgr(const SnapPointMgr& other);
166  SnapPointMgr& operator = (const SnapPointMgr& other);
167 
175  bool operator == (const SnapPointMgr& other) const;
183  bool operator != (const SnapPointMgr& other) const;
184 
192  bool IsEmpty() const;
193 
195  ~SnapPointMgr();
196 
204  void Reload();
205 
216  SnappedPoint GetSnappedPointAtPos(const PointF& position, foxit::uint32 flags);
217 
218  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
219  explicit SnapPointMgr(FS_HANDLE handle = NULL);
220 };
221 } // namespace pdf
222 } // namespace foxit
223 #endif // FS_SNAPPOINTMGR_H_
224 
SnappedPointType
Enumeration for snapped point type.
Definition: fs_snappointmgr.h:43
SnapPointFlags
Enumeration for snapping point flags which are used to specify what kind of point in a path is to be ...
Definition: fs_snappointmgr.h:134
PointF GetPoint()
Get the point value.
SnappedPointType GetType()
Get the snapped point type.
If set, that means to get the endpoint of a path.
Definition: fs_snappointmgr.h:136
Snapped point type: intersection point, which means the snapped point is the intersection of two inte...
Definition: fs_snappointmgr.h:51
Definition: fx_coordinates.h:30
SnapPointMgr(const PDFPage &page)
Constructor, from a parsed PDF page object.
bool operator !=(const SnapPointMgr &other) const
Not equal operator.
Snapped point type: nearest point, which means the snapped point is the nearest point (which is in a ...
Definition: fs_snappointmgr.h:53
SnappedPoint & operator=(const SnappedPoint &other)
Assign operator.
If set, that means to get the midpoint for two endpoints of a path.
Definition: fs_snappointmgr.h:138
If set, that means to get the nearest point (which is in a path) to the specified point.
Definition: fs_snappointmgr.h:142
This means the snapped point is invalid.
Definition: fs_snappointmgr.h:45
bool operator==(const SnappedPoint &other) const
Equal operator.
bool operator==(const SnapPointMgr &other) const
Equal operator.
SnappedPoint GetSnappedPointAtPos(const PointF &position, foxit::uint32 flags)
Get the snapped point information at/around a specified position in PDF coordinate system.
FX_UINT32 uint32
32-bit unsigned integer.
Definition: fs_basictypes.h:196
Definition: fs_pdfpage.h:411
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:214
Header file for common definitions and classes.
If set, that means to get the intersection of two intersecting paths.
Definition: fs_snappointmgr.h:140
Definition: fs_snappointmgr.h:36
Snapped point type: endpoint, which means the snapped point is an endpoint of a path.
Definition: fs_snappointmgr.h:47
Definition: fs_basictypes.h:407
bool IsEmpty() const
Check whether current object is empty or not.
Header file for PDF page related definitions and classes.
Foxit namespace.
Definition: fs_taggedpdf.h:27
~SnappedPoint()
Destructor.
~SnapPointMgr()
Destructor.
SnapPointMgr & operator=(const SnapPointMgr &other)
Assign operator.
#define NULL
The null-pointer value.
Definition: fx_system.h:780
void Reload()
Reload current manager.
bool operator!=(const SnappedPoint &other) const
Not equal operator.
bool IsEmpty() const
Check whether current object is empty or not.
Definition: fs_snappointmgr.h:127
Snapped point type: midpoint, which means the snapped point is the midpoint for two endpoints of a pa...
Definition: fs_snappointmgr.h:49