Class TextStyle

java.lang.Object
com.luciad.text.TextStyle
All Implemented Interfaces:
AutoCloseable

public final class TextStyle extends Object implements AutoCloseable
This class contains styling properties to determine how text is painted.
  • Method Details Link icon

    • finalize Link icon

      protected void finalize()
      Overrides:
      finalize in class Object
    • close Link icon

      public void close()
      Specified by:
      close in interface AutoCloseable
    • newBuilder Link icon

      @NotNull public static TextStyle.Builder newBuilder()
      Creates a new builder for creating a TextStyle.
      Returns:
      a new builder for creating a TextStyle.
    • asBuilder Link icon

      @NotNull public TextStyle.Builder asBuilder()
      Creates a TextStyle builder that has all properties of this TextStyle.
      Returns:
      a TextStyle builder that has all properties of this TextStyle.
    • getFontName Link icon

      @NotNull public String getFontName()
      Returns the identifier of the font used for text rendering.

      Possible values: Serif, Sans, Arial Black, Arial Narrow, Calibri, Noto.

      Returns:
      the identifier of the font used for text rendering.
    • getFontSize Link icon

      public long getFontSize()
      Returns the font size in pixels, where a pixel is defined as 1/96th of 1 inch (https://www.w3.org/TR/css-values-4/#absolute-lengths).
      Returns:
      the font size in pixels, where a pixel is defined as 1/96th of 1 inch (https://www.w3.org/TR/css-values-4/#absolute-lengths).
    • getTextColor Link icon

      @NotNull public android.graphics.Color getTextColor()
      Returns the text color.
      Returns:
      the text color.
    • getHaloWidth Link icon

      public double getHaloWidth()
      Returns the size of the halo (outline) around text in pixels.

      If this value is equal to zero, no halo is drawn.

      Returns:
      the size of the halo (outline) around text in pixels.
    • getHaloColor Link icon

      @NotNull public android.graphics.Color getHaloColor()
      Returns the color of the halo (outline) around text.
      Returns:
      the color of the halo (outline) around text.