drawColor method

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

DrawColor() draws color on image using the current fill color, starting at specified position, and using specified paint method. The available paint methods are:

  • PointMethod: Recolors the target pixel
  • ReplaceMethod: Recolor any pixel that matches the target pixel.
  • FloodfillMethod: Recolors target pixels and matching neighbors.
  • ResetMethod: Recolor all pixels.
  • x : x ordinate
  • y : y ordinate
  • paintMethod paint method.

Implementation

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