### Method

# Gimp Drawable mask_bounds

#### Declaration [src]

    gboolean
    gimp_drawable_mask_bounds (
      GimpDrawable* drawable,
      gint* x1,
      gint* y1,
      gint* x2,
      gint* y2
    )

#### Description [src]

Find the bounding box of the current selection in relation to the specified drawable.

This procedure returns whether there is a selection. If there is one, the upper left and lower right-hand corners of its bounding box are returned. These coordinates are specified relative to the drawable’s origin, and bounded by the drawable’s extents. Please note that the pixel specified by the lower right-hand coordinate of the bounding box is not part of the selection. The selection ends at the upper left corner of this pixel. This means the width of the selection can be calculated as (x2 - x1), its height as (y2 - y1). Note that the returned boolean does NOT correspond with the returned region being empty or not, it always returns whether the selection is non_empty. See `gimp_drawable_mask_intersect()` for a boolean return value which is more useful in most cases.

#### Parameters

`x1` | `gint*`
| X coordinate of the upper left corner of selection bounds.
| The argument will be set by the function.
`y1` | `gint*`
| Y coordinate of the upper left corner of selection bounds.
| The argument will be set by the function.
`x2` | `gint*`
| X coordinate of the lower right corner of selection bounds.
| The argument will be set by the function.
`y2` | `gint*`
| Y coordinate of the lower right corner of selection bounds.
| The argument will be set by the function.

#### Return value

Returns: | `gboolean`
| TRUE if there is a selection.