Class Pt


public class Pt extends Units
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 Details

    • Pt

      public Pt(float value)
      Constructs a Pt unit with the specified value.
      Parameters:
      value - the point value
  • Method Details

    • sizeToString

      public String sizeToString()
      Returns the CSS string representation of this point value.
      Specified by:
      sizeToString in class Units
      Returns:
      the CSS value string (e.g., "12pt")