writeSaveLayer method

void writeSaveLayer(
  1. VectorGraphicsBuffer buffer,
  2. int paint
)

Saves a copy of the current transform and clip on the save stack, and then creates a new group which subsequent calls will become a part of. When the save stack is later popped, the group will be flattened into a layer and have the given paint's Paint.blendMode applied.

See also:

  • Canvas.saveLayer

Implementation

void writeSaveLayer(VectorGraphicsBuffer buffer, int paint) {
  buffer._checkPhase(_CurrentSection.commands);
  buffer._addCommandsTag();

  buffer._putUint8(_saveLayerTag);
  buffer._putUint16(paint);
}