Class: GeometryCollection

Core.PDFNet. GeometryCollection


new GeometryCollection()

The class GeometryCollection. A Preprocessed PDF geometry collection

Extends

Members


<static> SnappingMode

Properties:
Name Type Description
e_DefaultSnapMode number
e_PointOnLine number
e_LineMidpoint number
e_LineIntersection number
e_PathEndpoint number

Methods


destroy()

Destructor
Inherited From:
Returns:
Type
Promise.<void>

snapToNearest(x, y, mode)

return the point within the collection which is closest to the queried point. All values are in the page coordinate space.
Parameters:
Name Type Description
x number - the x coordinate to snap, in page coordinates.
y number - the y coordinate to snap, in page coordinates.
mode number - a combination of flags from the SnappingMode enumeration.
Returns:
A promise that resolves to a point within the collection, closest to the queried point. If the collection is empty, the queried point will be returned unchanged.
Type
Promise.<Core.PDFNet.Point>

snapToNearestPixel(x, y, dpi, mode)

return the point within the collection which is closest to the queried point. All values are in the page coordinate space.
Parameters:
Name Type Description
x number - the x coordinate to snap.
y number - the y coordinate to snap.
dpi number - the resolution of the rendered page, in pixels per inch.
mode number - a combination of flags from the SnappingMode enumeration.
Returns:
A promise that resolves to a point within the collection, closest to the queried point. If the collection is empty, the queried point will be returned unchanged.
Type
Promise.<Core.PDFNet.Point>

takeOwnership()

Take the ownership of this object, so that PDFNet.runWithCleanup won't destroy this object.
Inherited From:
Returns:
Type
void