<?xml version="1.0"?>
<page id="GimpUi.PreviewArea.set_max_size"
      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="GimpUi.PreviewArea" group="method" type="guide"/>
    <api:function>
      <api:returns>
        <api:type>void</api:type>
      </api:returns>
      <api:name>gimp_preview_area_set_max_size</api:name>
      <api:arg>
        <api:type>Number(gint)</api:type>
        <api:name>width</api:name>
      </api:arg>
      <api:arg>
        <api:type>Number(gint)</api:type>
        <api:name>height</api:name>
      </api:arg>
    </api:function>
  </info>
  <title>GimpUi.PreviewArea.prototype.set_max_size</title>
  <synopsis><code mime="text/x-gjs">
function set_max_size(width: Number(gint), height: Number(gint)): void {
    // Gjs wrapper for gimp_preview_area_set_max_size()
}
  </code></synopsis>
  <p>Usually a <link xref="GimpUi.PreviewArea"/> fills the size that it is
allocated. This function allows you to limit the preview area to a
maximum size. If a larger size is allocated for the widget, the
preview will draw itself centered into the allocated area.</p>
  <p>Since 2.2</p>
<terms>
<item>
<title><code>width</code></title>
  <p>the maximum width in pixels or -1 to unset the limit</p>
</item>
<item>
<title><code>height</code></title>
  <p>the maximum height in pixels or -1 to unset the limit</p>
</item>
</terms>

</page>
