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
Nested ClassesModifier and TypeClassDescriptionstatic final classA builder class for creating text styles. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected voidfinalize()Returns the identifier of the font used for text rendering.longReturns 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.ColorReturns the color of the halo (outline) around text.doubleReturns the size of the halo (outline) around text in pixels.android.graphics.ColorReturns the text color.static TextStyle.BuilderCreates a new builder for creating aTextStyle.
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
closein 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.See
Fontsfor a list of possible font names.- 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.
-