androidx.ink.brush.compose

Extension functions summary

Brush
Brush.copyWithComposeColor(
    color: Color,
    family: BrushFamily,
    size: Float,
    epsilon: Float
)

Creates a copy of this Brush and allows named properties to be altered while keeping the rest unchanged.

Brush
Brush.Companion.createWithComposeColor(
    family: BrushFamily,
    color: Color,
    size: Float,
    epsilon: Float
)

Returns a new Brush with the color specified by an androidx.compose.ui.graphics.Color value, which can encode several different color spaces. sRGB and Display P3 are supported; a color in any other color space will be converted to Display P3.

Brush.Builder

Set the color on a Brush.Builder as an androidx.compose.ui.graphics.Color value. sRGB and Display P3 are supported; a color in any other color space will be converted to Display P3.

Extension properties summary

Color

The brush color as an androidx.compose.ui.graphics.Color value, which can express colors in several different color spaces. sRGB and Display P3 are supported; a color in any other color space will be converted to Display P3.

Extension functions

copyWithComposeColor

fun Brush.copyWithComposeColor(
    color: Color,
    family: BrushFamily = this.family,
    size: Float = this.size,
    epsilon: Float = this.epsilon
): Brush

Creates a copy of this Brush and allows named properties to be altered while keeping the rest unchanged. The color is specified as an androidx.compose.ui.graphics.Color value, which can encode several different color spaces. sRGB and Display P3 are supported; a color in any other color space will be converted to Display P3.

createWithComposeColor

fun Brush.Companion.createWithComposeColor(
    family: BrushFamily,
    color: Color,
    size: Float,
    epsilon: Float
): Brush

Returns a new Brush with the color specified by an androidx.compose.ui.graphics.Color value, which can encode several different color spaces. sRGB and Display P3 are supported; a color in any other color space will be converted to Display P3.

setComposeColor

fun Brush.Builder.setComposeColor(color: Color): Brush.Builder

Set the color on a Brush.Builder as an androidx.compose.ui.graphics.Color value. sRGB and Display P3 are supported; a color in any other color space will be converted to Display P3.

Extension properties

val Brush.composeColorColor

The brush color as an androidx.compose.ui.graphics.Color value, which can express colors in several different color spaces. sRGB and Display P3 are supported; a color in any other color space will be converted to Display P3.