public class

GeometryCollection

extends Object
java.lang.Object
   ↳ com.pdftron.pdf.GeometryCollection

Class Overview

The class GeometryCollection. A Preprocessed PDF geometry collection

Summary

Nested Classes
class GeometryCollection.SnappingMode  
Public Constructors
GeometryCollection(long impl_ptr)
Public Methods
long __GetHandle()
void destroy()
Frees the native memory of the object.
Point snapToNearest(double x, double y, int mode)
return the point within the collection which is closest to the queried point.
Point snapToNearestPixel(double x, double y, double dpi, int mode)
return the point within the collection which is closest to the queried point.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public GeometryCollection (long impl_ptr)

Public Methods

public long __GetHandle ()

public void destroy ()

Frees the native memory of the object. This can be explicity called to control the deallocation of native memory and avoid situations where the garbage collector does not free the object in a timely manner.

public Point snapToNearest (double x, double y, int mode)

return the point within the collection which is closest to the queried point. All values are in the page coordinate space.

Parameters
x -- the x coordinate to snap, in page coordinates
y -- the y coordinate to snap, in page coordinates
mode -- a combination of flags from the SnappingMode enumeration
Returns
  • a point within the collection, closest to the queried point. If the collection is empty, the queried point will be returned unchanged

public Point snapToNearestPixel (double x, double y, double dpi, int mode)

return the point within the collection which is closest to the queried point. All values are in the page coordinate space.

Parameters
x -- the x coordinate to snap
y -- the y coordinate to snap
dpi -- the resolution of the rendered page, in pixels per inch
mode -- a combination of flags from the SnappingMode enumeration
Returns
  • a point within the collection, closest to the queried point. If the collection is empty, the queried point will be returned unchanged