public class UnitsOfMeasurement extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DPI |
static DecimalFormat |
format2DP |
Constructor and Description |
---|
UnitsOfMeasurement() |
Modifier and Type | Method and Description |
---|---|
static int |
combineColors(int fgColor,
int bgColor,
int pctFg) |
static int |
inchToTwip(float inch) |
static double |
inchToTwipDouble(double inch)
Convert an inches value to twips and return as a double.
|
static int |
mmToTwip(float mm) |
static int |
pointToTwip(float point) |
static int |
pxToTwip(float px) |
static double |
pxToTwipDouble(double px)
Convert a pixel value to twips and return as a double.
|
static String |
rgbTripleToHex(float red,
float green,
float blue) |
static String |
toHexColor(int color) |
static String |
twipToBest(int leftL)
1440 twip = 1 inch;Try to guess whether inches or mm looks nicer
|
static long |
twipToEMU(double twips) |
static float |
twipToInch(int twip) |
static float |
twipToMm(int twip) |
static float |
twipToPoint(int twip) |
public static final DecimalFormat format2DP
public static final int DPI
public static long twipToEMU(double twips)
public static int inchToTwip(float inch)
public static float twipToInch(int twip)
public static float twipToMm(int twip)
public static int mmToTwip(float mm)
public static float twipToPoint(int twip)
public static int pointToTwip(float point)
public static int pxToTwip(float px)
public static double inchToTwipDouble(double inch)
public static double pxToTwipDouble(double px)
public static String twipToBest(int leftL)
left
- public static String rgbTripleToHex(float red, float green, float blue)
public static String toHexColor(int color)
public static int combineColors(int fgColor, int bgColor, int pctFg)
Copyright © 2007-2019. All Rights Reserved.