BlendMode blendMode

A blend mode to apply when a shape is drawn or a layer is composited.

The source colors are from the shape being drawn (e.g. from Canvas.drawPath) or layer being composited (the graphics that were drawn between the Canvas.saveLayer and Canvas.restore calls), after applying the colorFilter, if any.

The destination colors are from the background onto which the shape or layer is being composited.

Defaults to BlendMode.srcOver.

See also:

Canvas.saveLayer, which uses its Paint's blendMode to composite the layer when restore is called. BlendMode, which discusses the user of saveLayer with blendMode.

Source

BlendMode get blendMode {
  final int encoded = _data.getInt32(_kBlendModeOffset, _kFakeHostEndian);
  return BlendMode.values[encoded ^ _kBlendModeDefault];
}
void blendMode=(BlendMode value)

Source

set blendMode(BlendMode value) {
  assert(value != null);
  final int encoded = value.index ^ _kBlendModeDefault;
  _data.setInt32(_kBlendModeOffset, encoded, _kFakeHostEndian);
}