TextPaint

data class TextPaint(var allowOverlap: StyleValue<Boolean> = StyleValue.Constant(false), var value: StyleValue<String>, var size: StyleValue<Double>? = null, var font: StyleValue<List<String>>? = null, var weight: StyleValue<String>? = null, var color: StyleValue<Color> = StyleValue.Constant(Color.Black), var outlineColor: StyleValue<Color>? = null, var opacity: StyleValue<Double> = StyleValue.Constant(1.0), var align: StyleValue<TextJustification> = StyleValue.Constant(TextJustification.CENTER), var transform: StyleValue<TextTransform> = StyleValue.Constant(TextTransform.NONE), var anchor: StyleValue<Anchor> = StyleValue.Constant(Anchor.CENTER), var offset: StyleValue<AnchorOffset> = StyleValue.Constant(AnchorOffset(0.0, 0.0)), var padding: StyleValue<Double> = StyleValue.Constant(0.0), var rotation: StyleValue<Double> = StyleValue.Constant(0.0), var letterSpacing: StyleValue<Double>? = null, var lineHeight: StyleValue<Double>? = null, var maxWidth: StyleValue<Double>? = null) : Paint

Text styling for symbol layers (Mapbox text-* properties). Multiple TextPaint entries on SymbolLayerPaint.text become stacked labels.

Constructors

Link copied to clipboard
constructor(allowOverlap: StyleValue<Boolean> = StyleValue.Constant(false), value: StyleValue<String>, size: StyleValue<Double>? = null, font: StyleValue<List<String>>? = null, weight: StyleValue<String>? = null, color: StyleValue<Color> = StyleValue.Constant(Color.Black), outlineColor: StyleValue<Color>? = null, opacity: StyleValue<Double> = StyleValue.Constant(1.0), align: StyleValue<TextJustification> = StyleValue.Constant(TextJustification.CENTER), transform: StyleValue<TextTransform> = StyleValue.Constant(TextTransform.NONE), anchor: StyleValue<Anchor> = StyleValue.Constant(Anchor.CENTER), offset: StyleValue<AnchorOffset> = StyleValue.Constant(AnchorOffset(0.0, 0.0)), padding: StyleValue<Double> = StyleValue.Constant(0.0), rotation: StyleValue<Double> = StyleValue.Constant(0.0), letterSpacing: StyleValue<Double>? = null, lineHeight: StyleValue<Double>? = null, maxWidth: StyleValue<Double>? = null)

Properties

Link copied to clipboard
Link copied to clipboard

text-allow-overlap.

Link copied to clipboard

text-anchor.

Link copied to clipboard

text-color.

Link copied to clipboard

Font stack (text-font).

Link copied to clipboard

text-letter-spacing.

Link copied to clipboard

text-line-height.

Link copied to clipboard

text-max-width.

Link copied to clipboard

text-offset.

Link copied to clipboard

text-opacity.

Link copied to clipboard

Halo color (text-halo-color).

Link copied to clipboard

Collision padding.

Link copied to clipboard

text-rotate.

Link copied to clipboard

Font size in pixels (text-size).

Link copied to clipboard

text-transform.

Link copied to clipboard

Label string or expression (text-field).

Link copied to clipboard

Font weight hint (serialized where supported).