Package com.oorian.css.units
Class Pt
java.lang.Object
com.oorian.css.units.Units
com.oorian.css.units.Pt
CSS pt (point) unit value.
The pt unit is an absolute-length unit equal to one point, a traditional printing unit. In CSS, 1pt equals 1/72nd of an inch or approximately 1.33px. Points are commonly used for specifying font sizes in print media.
Usage:
Units size = new Pt(12);
element.setFontSize(new Pt(14));
element.setLineHeight(new Pt(16));
- Since:
- 2016
- Version:
- 1.0
- Author:
- Marvin P. Warble Jr.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the CSS string representation of this point value.
-
Constructor Details
-
Pt
public Pt(float value) Constructs a Pt unit with the specified value.- Parameters:
value- the point value
-
-
Method Details
-
sizeToString
Returns the CSS string representation of this point value.- Specified by:
sizeToStringin classUnits- Returns:
- the CSS value string (e.g., "12pt")
-