org.apache.xmlgraphics.util
public final class UnitConv extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static float |
IN2CM
conversion factory from centimeters to inches.
|
static float |
IN2MM
conversion factory from millimeters to inches.
|
static int |
IN2PT
conversion factory from inches to points.
|
Constructor and Description |
---|
UnitConv() |
Modifier and Type | Method and Description |
---|---|
static double |
in2mm(double in)
Converts inches (in) to millimeters (mm)
|
static double |
in2mpt(double in)
Converts inches (in) to millipoints (mpt)
|
static double |
in2pt(double in)
Converts inches (in) to points (pt)
|
static double |
mm2in(double mm)
Converts millimeters (mm) to inches (in)
|
static double |
mm2mpt(double mm)
Converts millimeters (mm) to millipoints (mpt)
|
static double |
mm2pt(double mm)
Converts millimeters (mm) to points (pt)
|
static double |
mm2px(double mm,
int resolution)
Converts millimeters (mm) to pixels (px)
|
static double |
mpt2in(double mpt)
Converts millipoints (mpt) to inches (in)
|
static double |
mpt2px(double mpt,
int resolution)
Converts millipoints (mpt) to pixels (px)
|
static double |
pt2mm(double pt)
Converts points (pt) to millimeters (mm)
|
public static final float IN2MM
public static final float IN2CM
public static final int IN2PT
public static double mm2pt(double mm)
mm
- the value in mmpublic static double mm2mpt(double mm)
mm
- the value in mmpublic static double pt2mm(double pt)
pt
- the value in ptpublic static double mm2in(double mm)
mm
- the value in mmpublic static double in2mm(double in)
in
- the value in inchespublic static double in2mpt(double in)
in
- the value in inchespublic static double in2pt(double in)
in
- the value in inchespublic static double mpt2in(double mpt)
mpt
- the value in mptpublic static double mm2px(double mm, int resolution)
mm
- the value in mmresolution
- the resolution in dpi (dots per inch)public static double mpt2px(double mpt, int resolution)
mpt
- the value in mptresolution
- the resolution in dpi (dots per inch)Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.