# Gimp.Brush.prototype.get_mask

    function get_mask(max_width: Number(gint), max_height: Number(gint), format: Babl.Object): Gegl.Buffer {
        // Gjs wrapper for gimp_brush_get_mask()
    }

Gets mask data of the brush within the bounding box specified by max_width and max_height. The data will be scaled down so that it fits within this size without changing its ratio. If the brush is smaller than this size to begin with, it will not be scaled up.

If max_width or max_height are null, the buffer is returned in the brush's native size.

Make sure you called [func@Gegl.init] before calling any function using `GEGL`.

max_width

  a maximum width for the returned buffer.

max_height

  a maximum height for the returned buffer.

format

  an optional Babl format.

Returns

  a [class@Gegl.Buffer] representing the brush mask.