FillPaint

class FillPaint(color: StyleValue<Color> = StyleValue.Constant(Color.Red), var pattern: StyleValue<String>? = null, var opacity: StyleValue<Double> = StyleValue.Constant(1.0), var eventEmitter: LayerEventEmitter? = null, var sortKey: StyleValue<String>? = null, var sortDirection: SortDirection = SortDirection.ASCENDING) : Paint

Polygon fill color, optional pattern, opacity, and sort key. Used by FillLayerPaint and as the fill block on CircleLayerPaint / SymbolLayerPaint.

Constructors

Link copied to clipboard
constructor(color: StyleValue<Color> = StyleValue.Constant(Color.Red), pattern: StyleValue<String>? = null, opacity: StyleValue<Double> = StyleValue.Constant(1.0), eventEmitter: LayerEventEmitter? = null, sortKey: StyleValue<String>? = null, sortDirection: SortDirection = SortDirection.ASCENDING)

Properties

Link copied to clipboard

Fill color (fill-color); may be a constant or a data-driven StyleValue.Expression.

Link copied to clipboard
Link copied to clipboard

Whether color has been assigned after this paint was constructed, i.e. by the host app rather than by the built-in layer configuration.

Link copied to clipboard

Fill alpha in [0.0, 1.0] (fill-opacity).

Link copied to clipboard

Optional fill-pattern image id (fill-pattern).

Link copied to clipboard

Ignored when sortKey is null. Default matches Mapbox ascending.

Link copied to clipboard

Feature property key used for draw order (Apple/JS fill.sortKey). String form is a dotted property path (e.g. "period.range.minTimestamp"); numeric StyleValue forms emit Mapbox fill-sort-key on the Style JSON path.

Functions

Link copied to clipboard
fun copy(color: StyleValue<Color> = this.color, pattern: StyleValue<String>? = this.pattern, opacity: StyleValue<Double> = this.opacity, eventEmitter: LayerEventEmitter? = this.eventEmitter, sortKey: StyleValue<String>? = this.sortKey, sortDirection: SortDirection = this.sortDirection): FillPaint

Custom copy function to replicate data class behavior. Use this to create a new instance with specific property changes.