BlendMode enum Graphics

Defines how source and destination colors are blended together when rendering.

These modes are typically used to achieve various visual effects like transparency, additive lighting, or color modulation.

Inheritance
Available extensions

Values

opaque → const BlendMode

No blending is performed. Source pixels overwrite destination pixels.

alpha → const BlendMode

Standard alpha blending, suitable for textures with transparency where the texture color values have been pre-multiplied by their alpha.

additive → const BlendMode

Additive blending. The source color is added to the destination color. This mode is often used for effects like fire, explosions, or glows, as it tends to brighten the image.

multiply → const BlendMode

Multiply blending that respects source alpha. Darkens the destination by multiplying it with the source color. The source's alpha channel controls the strength of this effect: opaque areas of the source fully apply the multiplication, while transparent areas leave the destination unchanged.

multiply2 → const BlendMode

A "harder" multiply blending. The resulting color is the product of the (pre-multiplied) source color and the destination color. This mode strongly darkens the image; if the source is transparent (alpha is 0), the result tends towards black.

screen → const BlendMode

Screen blending. The source and destination colors are inverted, multiplied, and then the result is inverted again. This mode is the opposite of multiply and is often used for brightening effects, like glows or lens flares.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<BlendMode>
A constant List of the values in this enum, in order of their declaration.