BlendMode class abstract interface Blending

Algorithms to use when painting on the canvas.

When drawing a shape or image onto a canvas, different algorithms can be used to blend the pixels. A custom BlendMode can be used to implement custom blending algorithms, or one of the predefined BlendModes can be used.

Each algorithm takes two colors as input, the source color, which is the color being drawn, and the destination color, which is the color already on the canvas. The algorithm then returns a new color that is the result of blending the two colors.

Implementers
Annotations

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getBlend<S, T>(PixelFormat<S, void> srcFormat, PixelFormat<T, void> dstFormat) → T Function(S src, T dst)
Returns a function that blends two pixels together.
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

clear → const BlendMode
Destination pixels covered by the source are cleared to 0.
dst → const BlendMode
Source pixels are replaced by the destination pixels.
dstAtop → const BlendMode
The destination that overlaps the source is blended with the source.
dstIn → const BlendMode
The destination that overlaps the source replaces the source.
dstOut → const BlendMode
The destination that does not overlap the source replaces the source.
dstOver → const BlendMode
The destination color is placed over the source color.
plus → const BlendMode
The source and destination regions are added together.
src → const BlendMode
Destination pixels are replaced by the source pixels.
srcAtop → const BlendMode
The source that overlaps the destination is blended with the destination.
srcIn → const BlendMode
The source that overlaps the destination replaces the destination.
srcOut → const BlendMode
The source that does not overlap the destination replaces the destination.
srcOver → const BlendMode
The source color is placed over the destination color.
xor → const BlendMode
The non-overlapping regions of the source and destination are combined.