|
fop 0.95 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.util.UnitConv
public final class UnitConv
Utility class for unit conversions.
Field Summary | |
---|---|
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 Summary | |
---|---|
UnitConv()
|
Method Summary | |
---|---|
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) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final float IN2MM
public static final float IN2CM
public static final int IN2PT
Constructor Detail |
---|
public UnitConv()
Method Detail |
---|
public static double mm2pt(double mm)
mm
- the value in mm
public static double mm2mpt(double mm)
mm
- the value in mm
public static double pt2mm(double pt)
pt
- the value in pt
public static double mm2in(double mm)
mm
- the value in mm
public static double in2mm(double in)
in
- the value in inches
public static double in2mpt(double in)
in
- the value in inches
public static double in2pt(double in)
in
- the value in inches
public static double mpt2in(double mpt)
mpt
- the value in mpt
public 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)
|
fop 0.95 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |