drawAlpha method

void drawAlpha({
  1. required double x,
  2. required double y,
  3. required PaintMethod paintMethod,
})

DrawAlpha() paints on the image's alpha channel in order to set effected pixels to transparent. The available paint methods are:

  • PointMethod: Select the target pixel
  • ReplaceMethod: Select any pixel that matches the target pixel.
  • FloodfillMethod: Select the target pixel and matching neighbors.
  • FillToBorderMethod: Select the target pixel and neighbors not matching border color.
  • ResetMethod: Select all pixels.
  • x : x ordinate
  • y : y ordinate
  • paintMethod paint method.

Implementation

void drawAlpha({
  required double x,
  required double y,
  required PaintMethod paintMethod,
}) =>
    _magickWandBindings.DrawAlpha(
      _wandPtr,
      x,
      y,
      paintMethod.index,
    );