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 {
45 e_TypeNone = 0,
47 e_TypeEndpoint = 1,
49 e_TypeMidpoint = 2,
51 e_TypeIntersectionPoint = 3,
53 e_TypeNearestPoint = 4
54 } 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
112 SnappedPointType GetType();
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,
140 e_FlagIntersectionPoint = 0x0004,
142 e_FlagNearestPoint = 0x0008
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
foxit::pdf::SnapPointMgr::e_FlagIntersectionPoint
If set, that means to get the intersection of two intersecting paths.
Definition: fs_snappointmgr.h:140
foxit::pdf::SnappedPoint
Definition: fs_snappointmgr.h:36
foxit::pdf::SnappedPoint::e_TypeNearestPoint
Snapped point type: nearest point, which means the snapped point is the nearest point (which is in a ...
Definition: fs_snappointmgr.h:53
foxit::FS_HANDLE
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:213
foxit::pdf::SnapPointMgr::operator!=
bool operator!=(const SnapPointMgr &other) const
Not equal operator.
foxit::pdf::SnappedPoint::e_TypeNone
This means the snapped point is invalid.
Definition: fs_snappointmgr.h:45
foxit::pdf::SnappedPoint::operator==
bool operator==(const SnappedPoint &other) const
Equal operator.
fs_common.h
Header file for common definitions and classes.
foxit::pdf::SnapPointMgr::~SnapPointMgr
~SnapPointMgr()
Destructor.
foxit::pdf::SnappedPoint::e_TypeMidpoint
Snapped point type: midpoint, which means the snapped point is the midpoint for two endpoints of a pa...
Definition: fs_snappointmgr.h:49
foxit::pdf::SnapPointMgr::Reload
void Reload()
Reload current manager.
foxit::pdf::SnappedPoint::operator!=
bool operator!=(const SnappedPoint &other) const
Not equal operator.
foxit::pdf::SnapPointMgr
Definition: fs_snappointmgr.h:127
foxit::pdf::SnapPointMgr::IsEmpty
bool IsEmpty() const
Check whether current object is empty or not.
CFX_PSVTemplate
Definition: fx_coordinates.h:30
foxit::pdf::SnapPointMgr::e_FlagEndpoint
If set, that means to get the endpoint of a path.
Definition: fs_snappointmgr.h:136
foxit::pdf::SnappedPoint::e_TypeEndpoint
Snapped point type: endpoint, which means the snapped point is an endpoint of a path.
Definition: fs_snappointmgr.h:47
foxit::pdf::SnappedPoint::IsEmpty
bool IsEmpty() const
Check whether current object is empty or not.
fs_pdfpage.h
Header file for PDF page related definitions and classes.
foxit::pdf::SnapPointMgr::SnapPointFlags
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
foxit
Foxit namespace.
Definition: fs_taggedpdf.h:27
foxit::pdf::SnapPointMgr::GetSnappedPointAtPos
SnappedPoint GetSnappedPointAtPos(const PointF &position, foxit::uint32 flags)
Get the snapped point information at/around a specified position in PDF coordinate system.
foxit::pdf::SnapPointMgr::e_FlagMidpoint
If set, that means to get the midpoint for two endpoints of a path.
Definition: fs_snappointmgr.h:138
foxit::pdf::SnapPointMgr::e_FlagNearestPoint
If set, that means to get the nearest point (which is in a path) to the specified point.
Definition: fs_snappointmgr.h:142
foxit::pdf::SnapPointMgr::SnapPointMgr
SnapPointMgr(const PDFPage &page)
Constructor, from a parsed PDF page object.
NULL
#define NULL
The null-pointer value.
Definition: fx_system.h:792
foxit::pdf::SnappedPoint::GetType
SnappedPointType GetType()
Get the snapped point type.
foxit::pdf::PDFPage
Definition: fs_pdfpage.h:412
foxit::pdf::SnappedPoint::e_TypeIntersectionPoint
Snapped point type: intersection point, which means the snapped point is the intersection of two inte...
Definition: fs_snappointmgr.h:51
foxit::pdf::SnappedPoint::GetPoint
PointF GetPoint()
Get the point value.
foxit::pdf::SnappedPoint::operator=
SnappedPoint & operator=(const SnappedPoint &other)
Assign operator.
foxit::pdf::SnappedPoint::~SnappedPoint
~SnappedPoint()
Destructor.
foxit::pdf::SnapPointMgr::operator=
SnapPointMgr & operator=(const SnapPointMgr &other)
Assign operator.
foxit::pdf::SnapPointMgr::operator==
bool operator==(const SnapPointMgr &other) const
Equal operator.
foxit::pdf::SnappedPoint::SnappedPointType
SnappedPointType
Enumeration for snapped point type.
Definition: fs_snappointmgr.h:43
foxit::uint32
FX_UINT32 uint32
32-bit unsigned integer.
Definition: fs_basictypes.h:195
foxit::Base
Definition: fs_basictypes.h:451