Foxit PDF SDK
foxit::pdf::SnapPointMgr类 参考
类 foxit::pdf::SnapPointMgr 继承关系图:
foxit::Base

Public 类型

enum  SnapPointFlags { e_FlagEndpoint = 0x0001, e_FlagMidpoint = 0x0002, e_FlagIntersectionPoint = 0x0004, e_FlagNearestPoint = 0x0008 }
 用于指定路径中要捕捉的点类型的捕捉点标志枚举。 更多...
 

Public 成员函数

 SnapPointMgr (const PDFPage &page)
 构造函数,从解析的PDF页面对象创建。 更多...
 
 SnapPointMgr (const SnapPointMgr &other)
 构造函数,使用另一个捕捉点管理器对象。 更多...
 
 ~SnapPointMgr ()
 析构函数。
 
SnappedPoint GetSnappedPointAtPos (const PointF &position, foxit::uint32 flags)
 PDF坐标系统中指定位置处/周围获取捕捉点信息。 更多...
 
bool IsEmpty () const
 检查当前对象是否为空。 更多...
 
bool operator != (const SnapPointMgr &other) const
 不相等操作符。 更多...
 
SnapPointMgroperator= (const SnapPointMgr &other)
 赋值操作符。 更多...
 
bool operator== (const SnapPointMgr &other) const
 相等操作符。 更多...
 
void Reload ()
 重新加载当前管理器。 更多...
 
- Public 成员函数 继承自 foxit::Base
FS_HANDLE Handle () const
 获取当前对象的句柄。 更多...
 

详细描述

此类表示捕捉点的管理器。此类可用于使用指定的捕捉标志在路径中捕捉点。

成员枚举类型说明

◆ SnapPointFlags

用于指定路径中要捕捉的点类型的捕捉点标志枚举。

此枚举的值可以单独使用或组合使用。

枚举值
e_FlagEndpoint 

如果设置,表示获取路径的端点。

e_FlagMidpoint 

如果设置,表示获取路径两个端点的中点。

e_FlagIntersectionPoint 

如果设置,表示获取两个相交路径的交点。

e_FlagNearestPoint 

如果设置,表示获取距离指定点最近的点(在路径中)。

构造及析构函数说明

◆ SnapPointMgr() [1/2]

foxit::pdf::SnapPointMgr::SnapPointMgr ( const PDFPage page)
explicit

构造函数,从解析的PDF页面对象创建。

参数
[in]page有效的PDF页面对象。此页面应已被解析。

◆ SnapPointMgr() [2/2]

foxit::pdf::SnapPointMgr::SnapPointMgr ( const SnapPointMgr other)

构造函数,使用另一个捕捉点管理器对象。

参数
[in]other另一个捕捉点管理器对象。

成员函数说明

◆ GetSnappedPointAtPos()

SnappedPoint foxit::pdf::SnapPointMgr::GetSnappedPointAtPos ( const PointF position,
foxit::uint32  flags 
)

PDF坐标系统中指定位置处/周围获取捕捉点信息。

参数
[in]positionPDF坐标系统中的指定位置。
[in]flags捕捉点的标志。请参考从SnapPointMgr::e_FlagEndpoint开始的值, 这应该是这些值中的一个或它们的组合。
返回
捕捉点信息。如果返回的捕捉点对象的SnappedPoint::IsEmpty函数返回值为true, 则表示没有合适的点可以捕捉。

◆ IsEmpty()

bool foxit::pdf::SnapPointMgr::IsEmpty ( ) const

检查当前对象是否为空。

当当前对象为空时,表示当前对象无用。

返回
true表示当前对象为空,false表示不为空。

◆ operator !=()

bool foxit::pdf::SnapPointMgr::operator != ( const SnapPointMgr other) const

不相等操作符。

参数
[in]other另一个捕捉点管理器对象。此函数将检查当前对象是否不等于此对象。
返回
true表示不相等,false表示相等。

◆ operator=()

SnapPointMgr& foxit::pdf::SnapPointMgr::operator= ( const SnapPointMgr other)

赋值操作符。

参数
[in]other另一个捕捉点管理器对象,其值将被赋给当前对象。
返回
对当前对象自身的引用。

◆ operator==()

bool foxit::pdf::SnapPointMgr::operator== ( const SnapPointMgr other) const

相等操作符。

参数
[in]other另一个捕捉点管理器对象。此函数将检查当前对象是否等于此对象。
返回
true表示相等,false表示不相等。

◆ Reload()

void foxit::pdf::SnapPointMgr::Reload ( )

重新加载当前管理器。

当相关PDF页面中的任何路径被修改后,应该调用此函数。

返回
无。