BackgroundScope

Known direct subclasses
DrawStyleScope

This interface is deprecated. This scope type is being removed.

Known indirect subclasses
StyleScope

This interface is deprecated. This scope type is being removed.


An interface that introduces the background property to a Style receiver scope.

See also
StyleScope

Summary

Public functions

Unit
background(color: Color)

This function is deprecated. This scope type is being removed.

Cmn
Unit
background(value: Brush)

This function is deprecated. This scope type is being removed.

Cmn

Public functions

background

fun background(color: Color): Unit

Sets the background color of the component. If a ShapeScope.shape is applied, the background will fill that shape.

Setting a background color will override any previously set background brush.

This property is not inherited

Parameters
color: Color

The background color.

See also
shape
background

background

fun background(value: Brush): Unit

Sets the background of the component using a Brush. This allows for gradient backgrounds or other complex fills. If a ShapeScope.shape is applied, the background will fill that shape.

Setting a background brush will override any previously set background color.

This property is not inherited

Parameters
value: Brush

The brush to use for the background.

See also
shape
background