<?xml version="1.0"?>
<page id="Gimp.Brush.get_buffer"
      type="topic"
      style="method"
      xmlns="http://projectmallard.org/1.0/"
      xmlns:api="http://projectmallard.org/experimental/api/"
      xmlns:ui="http://projectmallard.org/1.0/ui/">
  <info>
    <link xref="Gimp.Brush" group="method" type="guide"/>
    <api:function>
      <api:returns>
        <api:type>Gegl.Buffer</api:type>
      </api:returns>
      <api:name>gimp_brush_get_buffer</api:name>
      <api:arg>
        <api:type>Number(gint)</api:type>
        <api:name>max_width</api:name>
      </api:arg>
      <api:arg>
        <api:type>Number(gint)</api:type>
        <api:name>max_height</api:name>
      </api:arg>
      <api:arg>
        <api:type>Babl.Object</api:type>
        <api:name>format</api:name>
      </api:arg>
    </api:function>
  </info>
  <title>Gimp.Brush.prototype.get_buffer</title>
  <synopsis><code mime="text/x-gjs">
function get_buffer(max_width: Number(gint), max_height: Number(gint), format: <link href="../Babl-0.1/Babl.Object.html">Babl.Object</link>): <link href="../Gegl-0.4/Gegl.Buffer.html">Gegl.Buffer</link> {
    // Gjs wrapper for gimp_brush_get_buffer()
}
  </code></synopsis>
  <p>Gets pixel data of the brush within the bounding box specified by <code>max_width</code>
and <code>max_height</code>. 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.</p>  <p>If <code>max_width</code> or <code>max_height</code> are <code>null</code>, the buffer is returned in the brush's
native size.</p>  <p>When the brush is parametric or a raster mask, only the mask (as returned by
[method@Gimp.Brush.get_mask]) will be set. The returned buffer will be NULL.</p>  <p>Make sure you called [func@Gegl.init] before calling any function using
`GEGL`.</p>

<terms>
<item>
<title><code>max_width</code></title>
  <p>a maximum width for the returned buffer.</p>
</item>
<item>
<title><code>max_height</code></title>
  <p>a maximum height for the returned buffer.</p>
</item>
<item>
<title><code>format</code></title>
  <p>an optional Babl format.</p>
</item>
<item>
<title><code>Returns</code></title>
  <p>a [class@Gegl.Buffer] of <code>null</code> if the brush is parametric
                          or mask only.</p>
</item>
</terms>

</page>
