Foxit PDF SDK
FSDK.SnapPointMgr Class Reference

Public Member Functions

 constructor (page)
 Constructor, from a parsed PDF page object. More...
 
 GetSnappedPointAtPos (position, flags)
 Get the snapped point information at/around a specified position in PDF coordinate system. More...
 
 IsEmpty ()
 Check whether current object is empty or not. More...
 
 Reload ()
 Reload current manager. More...
 

Static Public Attributes

static e_FlagEndpoint
 Enumeration for snapping point flags which are used to specify what kind of point in a path is to be snapped. More...
 
static e_FlagIntersectionPoint
 If set, that means to get the intersection of two intersecting paths.
 
static e_FlagMidpoint
 If set, that means to get the midpoint for two endpoints of a path.
 
static e_FlagNearestPoint
 If set, that means to get the nearest point (which is in a path) to the specified point.
 

Detailed Description

This class represents a manager for snapping point. This class can be used to snap point in a path with specified snapping flags.

Member Function Documentation

◆ constructor()

FSDK.SnapPointMgr.constructor ( page  )

Constructor, from a parsed PDF page object.

Parameters
[in]pageA valid PDF page object. This page should has been parsed.

◆ GetSnappedPointAtPos()

FSDK.SnapPointMgr.GetSnappedPointAtPos ( position  ,
flags   
)

Get the snapped point information at/around a specified position in PDF coordinate system.

Parameters
[in]positionA specified position, in PDF coordinate system.
[in]flagsFlags for snapping point. Please refer to values starting from FSDK.SnapPointMgr.e_FlagEndpoint and this should be one or a combination of these values.
Returns
Information for a snapped point. If the return value of function FSDK.SnappedPoint.IsEmpty for the returned snapped point object is true, that means no suitable point can be snapped.

◆ IsEmpty()

FSDK.SnapPointMgr.IsEmpty ( )

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
true means current object is empty, while false means not.

◆ Reload()

FSDK.SnapPointMgr.Reload ( )

Reload current manager.

This function should be called after any path in related PDF page has been modified.

Returns
None.

Member Data Documentation

◆ e_FlagEndpoint

FSDK.SnapPointMgr.e_FlagEndpoint
static

Enumeration for snapping point flags which are used to specify what kind of point in a path is to be snapped.

Values of this enumeration can be used alone or in combination.

If set, that means to get the endpoint of a path.