Class PhysicalScale
- java.lang.Object
-
- org.apache.commons.imaging.formats.png.PhysicalScale
-
public class PhysicalScale extends java.lang.Object
Used to specify physical scale when reading or storing image information.
-
-
Field Summary
Fields Modifier and Type Field Description private double
horizontalUnitsPerPixel
private static int
METER_UNITS
private static int
RADIAN_UNITS
static PhysicalScale
UNDEFINED
private int
units
private double
verticalUnitsPerPixel
-
Constructor Summary
Constructors Modifier Constructor Description private
PhysicalScale(int units, double horizontalUnitsPerPixel, double verticalUnitsPerPixel)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PhysicalScale
createFromMeters(double x, double y)
static PhysicalScale
createFromRadians(double x, double y)
double
getHorizontalUnitsPerPixel()
double
getVerticalUnitsPerPixel()
boolean
isInMeters()
boolean
isInRadians()
-
-
-
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)
-
isInMeters
public boolean isInMeters()
-
isInRadians
public boolean isInRadians()
-
getHorizontalUnitsPerPixel
public double getHorizontalUnitsPerPixel()
-
getVerticalUnitsPerPixel
public double getVerticalUnitsPerPixel()
-
-