Method

GimpBrushget_mask

Declaration [src]

GeglBuffer*
gimp_brush_get_mask (
  GimpBrush* brush,
  gint max_width,
  gint max_height,
  const Babl* format
)

Description [src]

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 gegl_init() before calling any function using GEGL.

Parameters

max_width

Type: gint

A maximum width for the returned buffer.

max_height

Type: gint

A maximum height for the returned buffer.

format

Type: Babl

An optional Babl format.

The data is owned by the caller of the function.

Return value

Type: GeglBuffer

A GeglBuffer representing the brush mask.

The caller of the method takes ownership of the data, and is responsible for freeing it.