public final class Size extends Object
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
SizeUnits |
getUnits() |
double |
getValue() |
int |
hashCode() |
boolean |
isAbsolute()
Return whether or not this Size is an absolute value or a relative value.
|
double |
pixels()
A convenience method for calling
pixels(1) |
double |
pixels(double multiplier)
If size is not an absolute size, return the product of multiplier
and value.
|
double |
pixels(double multiplier,
Font font)
Convert this size into pixels
|
double |
pixels(Font font)
If size is not an absolute size, return the product of font size in pixels
and value.
|
double |
points(double multiplier,
Font font)
Convert this size into points
|
double |
points(Font font)
Convert this size into Points units, a Point is 1/72 of a inch
|
String |
toString() |
public Size(double value, SizeUnits units)
public double getValue()
public SizeUnits getUnits()
public boolean isAbsolute()
public double points(Font font)
public double points(double multiplier, Font font)
multiplier
- The multiplier for PERCENTAGE sizesfont
- The font for EM sizespublic double pixels(double multiplier, Font font)
multiplier
- The multiplier for PERCENTAGE sizesfont
- The font for EM sizespublic double pixels(Font font)
public double pixels(double multiplier)
public double pixels()
pixels(1)
Copyright © 2020. All rights reserved.