Foxit PDF SDK
com.foxit.sdk.pdf.SnapPointMgr Class Reference
Inheritance diagram for com.foxit.sdk.pdf.SnapPointMgr:
com.foxit.sdk.common.Base

Public Member Functions

 SnapPointMgr (PDFPage page)
 Constructor, from a parsed PDF page object.
More...
 
 SnapPointMgr (SnapPointMgr other)
 Constructor, with another snap point manager object.
More...
 
SnappedPoint getSnappedPointAtPos (PointF position, int flags) throws com.foxit.sdk.PDFException
 Get the snapped point information at/around a specified position in [PDF coordinate system] (com.foxit.sdk.pdf.PDFPage).
More...
 
boolean isEmpty ()
 Check whether current object is empty or not.
More...
 
void reload () throws com.foxit.sdk.PDFException
 Reload current manager.
More...
 

Static Public Attributes

static final int e_FlagEndpoint = 0x0001
 If set, that means to get the endpoint of a path.

 
static final int e_FlagIntersectionPoint = 0x0004
 If set, that means to get the intersection of two intersecting paths.

 
static final int e_FlagMidpoint = 0x0002
 If set, that means to get the midpoint for two endpoints of a path.

 
static final int e_FlagNearestPoint = 0x0008
 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.

Constructor & Destructor Documentation

◆ SnapPointMgr() [1/2]

com.foxit.sdk.pdf.SnapPointMgr.SnapPointMgr ( PDFPage  page)

Constructor, from a parsed PDF page object.

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

◆ SnapPointMgr() [2/2]

com.foxit.sdk.pdf.SnapPointMgr.SnapPointMgr ( SnapPointMgr  other)

Constructor, with another snap point manager object.

Parameters
[in]otherAnother snap point manager object.

Member Function Documentation

◆ getSnappedPointAtPos()

SnappedPoint com.foxit.sdk.pdf.SnapPointMgr.getSnappedPointAtPos ( PointF  position,
int  flags 
) throws com.foxit.sdk.PDFException

Get the snapped point information at/around a specified position in [PDF coordinate system] (com.foxit.sdk.pdf.PDFPage).

Parameters
[in]positionA specified position, in PDF coordinate system.
[in]flagsFlags for snapping point. Please refer to values starting from com.foxit.sdk.pdf.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 SnappedPoint.isEmpty for the returned snapped point object is true, that means no suitable point can be snapped.

◆ isEmpty()

boolean com.foxit.sdk.pdf.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()

void com.foxit.sdk.pdf.SnapPointMgr.reload ( ) throws com.foxit.sdk.PDFException

Reload current manager.

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

Returns
None.