public final class DisplayUnitsConverter extends Object
The class contains the methods for converting values.
Modifier and Type | Method and Description |
---|---|
static float |
inchToPoint(float inches)
Converts inches to points.
|
static float |
millimeterToInch(float mm)
Converts millimeters to inches.
|
static float |
millimeterToPoint(float mm)
Converts millimeters to points.
|
static float |
pixelToPoint(int pixels,
float dpi)
Converts pixels to points at the specified pixel resolution.
|
static float |
pointToInch(float points)
Converts points to inches.
|
static int |
pointToPixel(float points,
float dpi)
Converts points to pixels at the specified pixel resolution.
|
public static int pointToPixel(float points, float dpi)
Converts points to pixels at the specified pixel resolution.
points
- The value to convert in points.dpi
- Screen resolution.int
.public static float pixelToPoint(int pixels, float dpi)
Converts pixels to points at the specified pixel resolution.
pixels
- The value to convert in pixels.dpi
- Screen resolution.int
.public static float inchToPoint(float inches)
Converts inches to points.
inches
- The value to convert in inches.float
.public static float pointToInch(float points)
Converts points to inches.
points
- The value to convert in points.float
.public static float millimeterToInch(float mm)
Converts millimeters to inches.
mm
- The value to convert in millimeters.float
.public static float millimeterToPoint(float mm)
Converts millimeters to points.
mm
- The value to convert in millimeters.float
.