Foxit PDF SDK

Public Member Functions | Static Public Attributes | List of all members
com.foxit.sdk.pdf.SnapPointMgr Class Reference
Inheritance diagram for com.foxit.sdk.pdf.SnapPointMgr:

## 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...
synchronized void | delete ()
| Clean up related C++ resources immediately. 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. 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] | page | A 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] | other | Another snap point manager object.

## Member Function Documentation

## ◆ delete()

synchronized void com.foxit.sdk.pdf.SnapPointMgr.delete | ( |  | ) |

Clean up related C++ resources immediately.

Returns
  None.

Note
  Once this function is called, current object cannot be used anymore.

Reimplemented from com.foxit.sdk.common.Base.

## ◆ 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.

Parameters

  [in] | position | A specified position, in PDF coordinate system.
  [in] | flags | Flags 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.