PorterDuff class final Blending

A BlendMode that uses Porter-Duff coefficients to blend colors.

A custom BlendMode can be created by providing custom coefficients to the PorterDuff constructor:

// Creates a custom blend mode that always returns zero.
final customBlendMode = PorterDuff(PorterDuff.zero, PorterDuff.one);
Implemented types

Constructors

PorterDuff(double _src(double, double), double _dst(double, double))
Creates a blend mode with Porter-Duff coefficients.
const

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.
override
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

Static Methods

dst(double srcAlpha, double dstAlpha) → double
Returns the destination alpha channel (dstAlpha).
one(double srcAlpha, double dstAlpha) → double
Always returns one (1.0).
oneMinusDst(double srcAlpha, double dstAlpha) → double
Returns one minus the destination alpha channel (1 - dstAlpha).
oneMinusSrc(double srcAlpha, double dstAlpha) → double
Returns one minus the source alpha channel (1 - srcAlpha).
src(double srcAlpha, double dstAlpha) → double
Returns the source alpha channel (srcAlpha).
zero(double srcAlpha, double dstAlpha) → double
Always returns zero (0.0).