GimpUi.PreviewArea.set_max_size

@accepts(GimpUi.PreviewArea, int, int)
@returns(none)
def set_max_size(self, width, height):
    # Python 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

self

a GimpUi.PreviewArea widget

width

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

height

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