Package com.luciad.text
Class TextStyle
java.lang.Object
com.luciad.text.TextStyle
- All Implemented Interfaces:
AutoCloseable
This class contains styling properties to determine how text is painted.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A builder class for creating text styles. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected void
finalize()
Returns the identifier of the font used for text rendering.long
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).android.graphics.Color
Returns the color of the halo (outline) around text.double
Returns the size of the halo (outline) around text in pixels.android.graphics.Color
Returns the text color.static TextStyle.Builder
Creates a new builder for creating aTextStyle
.
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
newBuilder
Creates a new builder for creating aTextStyle
.- Returns:
- a new builder for creating a
TextStyle
.
-
asBuilder
-
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
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
@NotNull public android.graphics.Color getTextColor()Returns the text color.- Returns:
- the text color.
-
getHaloWidth
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
@NotNull public android.graphics.Color getHaloColor()Returns the color of the halo (outline) around text.- Returns:
- the color of the halo (outline) around text.
-