Gimp.eraser

function eraser(drawable: Gimp.Drawable, strokes: Array(Number(gdouble)), hardness: Gimp.BrushApplicationMode, method: Gimp.PaintApplicationMode): Boolean {
    // Gjs wrapper for gimp_eraser()
}
  

Erase using the current brush.

This tool erases using the current brush mask. If the specified drawable contains an alpha channel, then the erased pixels will become transparent. Otherwise, the eraser tool replaces the contents of the drawable with the background color. Like paintbrush, this tool linearly interpolates between the specified stroke coordinates.

drawable

The affected drawable.

strokes

Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.

hardness

How to apply the brush.

method

The paint method to use.

Returns

TRUE on success.