magickFloodfillPaintImage method

Future<bool> magickFloodfillPaintImage({
  1. required PixelWand fill,
  2. required double fuzz,
  3. required PixelWand bordercolor,
  4. required int x,
  5. required int y,
  6. required bool invert,
})

Changes the color value of any pixel that matches target and is an immediate neighbor. If the method FillToBorderMethod is specified, the color value is changed for any neighbor pixel that does not match the bordercolor member of image.

This method runs inside an isolate different from the main isolate.

  • fill: the floodfill color pixel wand.
  • fuzz: By default target must match a particular pixel color exactly. However, in many cases two colors may differ by a small amount. The fuzz member of image defines how much tolerance is acceptable to consider two colors as the same. For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color for the purposes of the floodfill.
  • bordercolor: the border color pixel wand.
  • x: the x starting location of the operation.
  • y: the y starting location of the operation.
  • invert: paint any pixel that does not match the target color.

Implementation

Future<bool> magickFloodfillPaintImage({
  required PixelWand fill,
  required double fuzz,
  required PixelWand bordercolor,
  required int x,
  required int y,
  required bool invert,
}) async =>
    await _magickCompute(
      _magickFloodfillPaintImage,
      _MagickFloodfillPaintImageParams(
        _wandPtr.address,
        fill._wandPtr.address,
        fuzz,
        bordercolor._wandPtr.address,
        x,
        y,
        invert,
      ),
    );