ColorFilter

@Immutable data class ColorFilter
kotlin.Any
   ↳ androidx.ui.graphics.ColorFilter

Creates a color filter that applies the blend mode given as the second argument. The source color is the one given as the first argument, and the destination color is the one from the layer being composited.

The output of this filter is then composited into the background according to the Paint.blendMode, using the output of this filter as the source and the background as the destination.

Summary

Public constructors
<init>(color: Color, blendMode: BlendMode)

Creates a color filter that applies the blend mode given as the second argument.

Companion functions
ColorFilter
tint(color: Color)

Helper method to create a ColorFilter that tints contents to the specified color

Properties
BlendMode

Color

Public constructors

<init>

ColorFilter(
    color: Color,
    blendMode: BlendMode)

Creates a color filter that applies the blend mode given as the second argument. The source color is the one given as the first argument, and the destination color is the one from the layer being composited.

The output of this filter is then composited into the background according to the Paint.blendMode, using the output of this filter as the source and the background as the destination.

Properties

blendMode

@Stable val blendMode: BlendMode

color

@Stable val color: Color

Companion functions

tint

@Stable fun tint(color: Color): ColorFilter

Helper method to create a ColorFilter that tints contents to the specified color