GimpUi.PreviewArea.prototype.set_max_size

function set_max_size(width: Number(gint), height: Number(gint)): void {
    // Gjs wrapper for gimp_preview_area_set_max_size()
}
  

Usually a 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.

Since 2.2

width

the maximum width in pixels or -1 to unset the limit

height

the maximum height in pixels or -1 to unset the limit