ColorFilter class Null safety
A description of a color filter to apply when drawing a shape or compositing a layer with a particular Paint. A color filter is a function that takes two colors, and outputs one color. When applied during compositing, it is independently applied to each pixel of the layer being drawn before the entire layer is merged with the destination.
Instances of this class are used with Paint.colorFilter on Paint objects.
- Implemented types
Constructors
- ColorFilter.linearToSrgbGamma()
-
Construct a color filter that applies the sRGB gamma curve to the RGB
channels.
const
-
ColorFilter.matrix(List<
double> matrix) -
Construct a color filter that transforms a color by a 5x5 matrix, where
the fifth row is implicitly added in an identity configuration.
const
- ColorFilter.mode(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.
const
- ColorFilter.srgbToLinearGamma()
-
Creates a color filter that applies the inverse of the sRGB gamma curve
to the RGB channels.
const
Properties
- hashCode → int
-
The hash code for this object.
read-onlyoverride
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override