Package com.pdftools.geometry.units
Class Resolution
- java.lang.Object
-
- com.pdftools.geometry.units.Resolution
-
public class Resolution extends java.lang.ObjectThe 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 SizecalculateSize(Size pixels)Calculate the physical size of an object, e.g.booleanequals(java.lang.Object obj)doublegetXDpi()GetsxDpidoublegetYDpi()GetsyDpiinthashCode()voidsetXDpi(double xDpi)SetsxDpivoidsetYDpi(double yDpi)SetsyDpijava.lang.StringtoString()
-
-
-
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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-