Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface ITextStyle4

interface ITextStyle4
Extends ITextStyle3 Text Style v4 extends ITextStyle3 to support the foreground paint used to render glyphs.

Methods

getForegroundPaint()

IPaint? getForegroundPaint()
Returns the foreground paint set on the text style, if one has been explicitly set via ITextStyleBuilder4::foregroundPaint. Unlike ITextStyle::getColor which returns a simple Color, the foreground paint is a full IPaint which can carry any of the rendering attributes that IPaint supports. Note: setting a simple Color via ITextStyleBuilder::color does NOT populate the paint exposed here. Only an explicit call to ITextStyleBuilder4::foregroundPaint will produce a non-null value from this method.

Returns

IPaint? The return value is optional and might be absent. The foreground paint, or null if none was explicitly set.
Last modified on October 29, 2026