PorterDuff constructor

const PorterDuff(
  1. double _src(
    1. double,
    2. double
    ),
  2. double _dst(
    1. double,
    2. double
    )
)

Creates a blend mode with Porter-Duff coefficients.

The src and dst functions are used to calculate the source and destination coefficients, respectively. The result of blending the source and destination colors is calculated as:

final srcAlpha = src(src.w, dst.w);
final dstAlpha = dst(src.w, dst.w);
return src * srcAlpha + dst * dstAlpha;

Implementation

const PorterDuff(this._src, this._dst);