A class that provides constant values for visual blend mode effects.

Constants

ABOVE BlendMode

The display object appears above the background. Pixel values of the display object are invisible where the backround is transparent.

const BlendMode(gl.DST_ALPHA, gl.ONE_MINUS_SRC_ALPHA, "source-atop")
ADD BlendMode

Adds the values of the constituent colors of the display object to the colors of its background, applying a ceiling of 0xFF.

const BlendMode(gl.ONE, gl.ONE, "lighter")
BELOW BlendMode

The display object appears in behind the background. Pixel values of the background object override those of the display object. Where the background is transparent, the display object is visible.

const BlendMode(gl.ONE_MINUS_DST_ALPHA, gl.ONE, "destination-over")
ERASE BlendMode

Erases the background based on the alpha value of the display object.

const BlendMode(gl.ZERO, gl.ONE_MINUS_SRC_ALPHA, "destination-out")
MULTIPLY BlendMode

Multiplies the values of the display object constituent colors by the colors of the background color, and then normalizes by dividing by 0xFF, resulting in darker colors.

const BlendMode(gl.DST_COLOR, gl.ONE_MINUS_SRC_ALPHA, "multiply")
NONE BlendMode

Works only in WebGL and may improve performance for big background images withoug alpha. The source pixels are not blended with the destination pixels and therefore the GPU does not read the color from the destination pixels.

const BlendMode(gl.ONE, gl.ZERO, "source-over")
NORMAL BlendMode

The display object appears in front of the background. Pixel values of the display object override those of the background. Where the display object is transparent, the background is visible.

const BlendMode(gl.ONE, gl.ONE_MINUS_SRC_ALPHA, "source-over")
SCREEN BlendMode

Multiplies the complement (inverse) of the display object color by the complement of the background color, resulting in a bleaching effect.

const BlendMode(gl.ONE, gl.ONE_MINUS_SRC_COLOR, "screen")

Constructors

BlendMode(int srcFactor, int dstFactor, String compositeOperation)

const

Properties

compositeOperation → String

read-only
dstFactor → int

read-only
hashCode → int

Get a hash code for this object.

read-only, inherited
runtimeType → Type

A representation of the runtime type of the object.

read-only, inherited
srcFactor → int

read-only

Operators

operator ==(other) → bool

The equality operator.

inherited

Methods

noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited
toString() → String

Returns a string representation of this object.

inherited