org.odftoolkit.odfdom.dom.util
Class OdfUnitConverter
java.lang.Object
org.odftoolkit.odfdom.dom.util.OdfUnitConverter
public class OdfUnitConverter
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DPI
public static final double DPI
- See Also:
- Constant Field Values
CENTIMETER_IN_MM
public static final double CENTIMETER_IN_MM
- See Also:
- Constant Field Values
INCH_IN_MM
public static final double INCH_IN_MM
- See Also:
- Constant Field Values
DIDOT_POINT_IN_MM
public static final double DIDOT_POINT_IN_MM
- See Also:
- Constant Field Values
PICA_IN_MM
public static final double PICA_IN_MM
- See Also:
- Constant Field Values
POINT_IN_MM
public static final double POINT_IN_MM
- See Also:
- Constant Field Values
TWIP_IN_MM
public static final double TWIP_IN_MM
- See Also:
- Constant Field Values
PIXEL_IN_MM
public static final double PIXEL_IN_MM
- See Also:
- Constant Field Values
OdfUnitConverter
public OdfUnitConverter()
mapUnitToCm
public static String mapUnitToCm(String length)
- Parameters:
length - The value to be mapped
- Returns:
- The converted value
mapColorFromRgbToHex
public static String mapColorFromRgbToHex(String colorValue)
- Value have to be trimmed (no spaces around) and lower caser
- Parameters:
colorValue - The color to be converted
- Returns:
- the converted color
getMeasureValue
public static final int getMeasureValue(String measure)
- Get a 1/100th millimeter value from the measure string
getMeasureString
public static final String getMeasureString(int measure)
- returns the xml value string for the given measure (position,distance,length)
- Parameters:
measure - in 1/100th mm
- Returns:
- odf convorm measure string using cm as unit
Copyright © 2009. All Rights Reserved.