sdk-maps / com.tomtom.online.sdk.map.style.expression.textsettings / TextSettings / Builder

Builder

@Beta(2020, 12) open class Builder

Creates an instance of TextSettings.

Constructors

<init>

Builder()

Creates an instance of TextSettings.

Functions

build

open fun build(formattedText: FormattedText!): TextSettings!

Creates an instance of TextSettings with parameters set through withXXX methods.

withColor

open fun withColor(color: Expression!): TextSettings.Builder!

Sets the color of the text.

withFont

open fun withFont(font: Expression!): TextSettings.Builder!

Sets the font to use for all text sections. This setting might be overridden by individual FormatExpressionSection's parameters.

withLetterCaseTransform

open fun withLetterCaseTransform(letterCaseTransform: Expression!): TextSettings.Builder!

If an how letter case should be altered.

withLetterSpacing

open fun withLetterSpacing(letterSpacing: Expression!): TextSettings.Builder!

Sets the spacing between letters, in ems.

withMaxWidth

open fun withMaxWidth(maxWidth: Expression!): TextSettings.Builder!

Sets the maximum width of the text, in ems. Line breaking is done between words.

withOffset

open fun withOffset(offset: Expression!): TextSettings.Builder!

Sets the text offset in relation to the parent entity, in ems.

withRotationAngle

open fun withRotationAngle(rotationAngle: Expression!): TextSettings.Builder!

Sets the rotation angle of the text, in degrees.

withSize

open fun withSize(size: Expression!): TextSettings.Builder!

Sets the base text size to use for all text sections, in pixels. Individual FormatExpressionSections can use the scale parameter to scale the size of the text relative to this setting.

withSymbolAnchor

open fun withSymbolAnchor(symbolAnchor: Expression!): TextSettings.Builder!

Anchor determines which part of the text should be aligned with the parent entity.

withTextAlignment

open fun withTextAlignment(textAlignment: Expression!): TextSettings.Builder!

Sets the text alignment.