ForegroundScope

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 foreground property to a Style receiver scope.

See also
StyleScope

Summary

Public functions

Unit
foreground(value: Brush)

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

Cmn
Unit
foreground(value: Color)

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

Cmn

Public functions

foreground

fun foreground(value: Brush): Unit

Sets the foreground brush for the component. This can be used to overlay a color or gradient on top of the component's content. It is important that this brush be partially transparent (e.g. alpha less than 1.0) or it will obscure the content. If a ShapeScope.shape is applied, the foreground will fill that shape.

This property is not inherited

Parameters
value: Brush

The brush to use for the foreground.

foreground

fun foreground(value: Color): Unit

Sets the foreground color for the component. This can be used to overlay a color on top of the component's content. It is important that this brush be partially transparent (e.g. alpha less than 1.0) or it will obscure the content. If a ShapeScope.shape is applied, the foreground will fill that shape.

This property is not inherited

Parameters
value: Color

The brush to use for the foreground.