Package com.pdftools.geometry.units
Class Resolution
- java.lang.Object
-
- com.pdftools.geometry.units.Resolution
-
public class Resolution extends java.lang.Object
The resolution defines the spatial dot density, e.g. of images.
-
-
Constructor Summary
Constructors Constructor Description Resolution(double dpi)
Resolution(double xDpi, double yDpi)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Size
calculateSize(Size pixels)
Calculate the physical size of an object, e.g.boolean
equals(java.lang.Object obj)
double
getXDpi()
GetsxDpi
double
getYDpi()
GetsyDpi
int
hashCode()
void
setXDpi(double xDpi)
SetsxDpi
void
setYDpi(double yDpi)
SetsyDpi
java.lang.String
toString()
-
-
-
Method Detail
-
getXDpi
public double getXDpi()
GetsxDpi
-
setXDpi
public void setXDpi(double xDpi)
SetsxDpi
-
getYDpi
public double getYDpi()
GetsyDpi
-
setYDpi
public void setYDpi(double yDpi)
SetsyDpi
-
calculateSize
public Size calculateSize(Size pixels)
Calculate the physical size of an object, e.g. an image, at that resolution.- Parameters:
pixels
- The size of the image in pixels- Returns:
- The physical size
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-