Foxit PDF SDK
fs_snappointmgr.h
浏览该文件的文档.
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 
85  bool operator==(const SnappedPoint& other) const;
93  bool operator!=(const SnappedPoint& other) const;
94 
102  bool IsEmpty() const;
103 
111 
119  PointF GetPoint();
120 };
121 
125 class SnapPointMgr FS_FINAL : public Base {
126  public:
132  typedef enum _SnapPointFlags {
134  e_FlagEndpoint = 0x0001,
136  e_FlagMidpoint = 0x0002,
141  } SnapPointFlags;
142 
143 
149  explicit SnapPointMgr(const PDFPage& page);
150 
156  SnapPointMgr(const SnapPointMgr& other);
164  SnapPointMgr& operator = (const SnapPointMgr& other);
165 
173  bool operator == (const SnapPointMgr& other) const;
181  bool operator != (const SnapPointMgr& other) const;
182 
190  bool IsEmpty() const;
191 
193  ~SnapPointMgr();
194 
202  void Reload();
203 
214  SnappedPoint GetSnappedPointAtPos(const PointF& position, foxit::uint32 flags);
215 
216  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
217  explicit SnapPointMgr(FS_HANDLE handle = NULL);
218 };
219 } // namespace pdf
220 } // namespace foxit
221 #endif // FS_SNAPPOINTMGR_H_
222 
SnappedPointType
捕捉点类型的枚举。
Definition: fs_snappointmgr.h:43
SnapPointFlags
用于指定路径中要捕捉的点类型的捕捉点标志枚举。
Definition: fs_snappointmgr.h:132
PointF GetPoint()
获取点值。
SnappedPointType GetType()
获取捕捉点类型。
如果设置,表示获取路径的端点。
Definition: fs_snappointmgr.h:134
捕捉点类型:交点,这表示捕捉点是两个相交路径的交点。
Definition: fs_snappointmgr.h:51
Definition: fx_coordinates.h:30
SnapPointMgr(const PDFPage &page)
构造函数,从解析的PDF页面对象创建。
bool operator !=(const SnapPointMgr &other) const
不相等操作符。
捕捉点类型:最近点,这表示捕捉点是距离指定点最近的点(在路径中)。
Definition: fs_snappointmgr.h:53
SnappedPoint & operator=(const SnappedPoint &other)
赋值操作符。
如果设置,表示获取路径两个端点的中点。
Definition: fs_snappointmgr.h:136
如果设置,表示获取距离指定点最近的点(在路径中)。
Definition: fs_snappointmgr.h:140
这表示捕捉点无效。
Definition: fs_snappointmgr.h:45
bool operator==(const SnappedPoint &other) const
相等操作符。
bool operator==(const SnapPointMgr &other) const
相等操作符。
SnappedPoint GetSnappedPointAtPos(const PointF &position, foxit::uint32 flags)
在PDF坐标系统中指定位置处/周围获取捕捉点信息。
FX_UINT32 uint32
无符号 32 位整数。
Definition: fs_basictypes.h:196
Definition: fs_pdfpage.h:421
void * FS_HANDLE
句柄类型。
Definition: fs_basictypes.h:214
通用定义和类的头文件。
如果设置,表示获取两个相交路径的交点。
Definition: fs_snappointmgr.h:138
Definition: fs_snappointmgr.h:36
捕捉点类型:端点,这表示捕捉点是路径的端点。
Definition: fs_snappointmgr.h:47
Definition: fs_basictypes.h:449
bool IsEmpty() const
检查当前对象是否为空。
PDF页面相关定义和类的头文件。
Foxit命名空间。
Definition: fs_taggedpdf.h:27
~SnappedPoint()
析构函数。
~SnapPointMgr()
析构函数。
SnapPointMgr & operator=(const SnapPointMgr &other)
赋值操作符。
#define NULL
空指针值。
Definition: fx_system.h:792
void Reload()
重新加载当前管理器。
bool operator!=(const SnappedPoint &other) const
不相等操作符。
bool IsEmpty() const
检查当前对象是否为空。
Definition: fs_snappointmgr.h:125
捕捉点类型:中点,这表示捕捉点是路径两个端点的中点。
Definition: fs_snappointmgr.h:49