Class PhysicalScale
- java.lang.Object
-
- org.apache.commons.imaging.formats.png.PhysicalScale
-
public final class PhysicalScale extends java.lang.ObjectUsed to specify physical scale when reading or storing image information.
-
-
Field Summary
Fields Modifier and Type Field Description private doublehorizontalUnitsPerPixelprivate static intMETER_UNITSprivate static intRADIAN_UNITSstatic PhysicalScaleUNDEFINEDprivate intunitsprivate doubleverticalUnitsPerPixel
-
Constructor Summary
Constructors Modifier Constructor Description privatePhysicalScale(int units, double horizontalUnitsPerPixel, double verticalUnitsPerPixel)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PhysicalScalecreateFromMeters(double x, double y)static PhysicalScalecreateFromRadians(double x, double y)doublegetHorizontalUnitsPerPixel()doublegetVerticalUnitsPerPixel()booleanisInMeters()booleanisInRadians()
-
-
-
Field Detail
-
METER_UNITS
private static final int METER_UNITS
- See Also:
- Constant Field Values
-
RADIAN_UNITS
private static final int RADIAN_UNITS
- See Also:
- Constant Field Values
-
UNDEFINED
public static final PhysicalScale UNDEFINED
-
units
private final int units
-
horizontalUnitsPerPixel
private final double horizontalUnitsPerPixel
-
verticalUnitsPerPixel
private final double verticalUnitsPerPixel
-
-
Method Detail
-
createFromMeters
public static PhysicalScale createFromMeters(double x, double y)
-
createFromRadians
public static PhysicalScale createFromRadians(double x, double y)
-
getHorizontalUnitsPerPixel
public double getHorizontalUnitsPerPixel()
-
getVerticalUnitsPerPixel
public double getVerticalUnitsPerPixel()
-
isInMeters
public boolean isInMeters()
-
isInRadians
public boolean isInRadians()
-
-