### Method

# GimpUi PreviewArea set_max_size

#### Declaration [src]

    void
    gimp_preview_area_set_max_size (
      GimpPreviewArea* area,
      gint width,
      gint height
    )

#### Description [src]

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

Available since: | 2.2

#### Parameters

`width` | `gint`
| The maximum width in pixels or -1 to unset the limit.
`height` | `gint`
| The maximum height in pixels or -1 to unset the limit.