### Function

# Gimp rectangle_intersect

#### Declaration [src]

    gboolean
    gimp_rectangle_intersect (
      gint x1,
      gint y1,
      gint width1,
      gint height1,
      gint x2,
      gint y2,
      gint width2,
      gint height2,
      gint* dest_x,
      gint* dest_y,
      gint* dest_width,
      gint* dest_height
    )

#### Description [src]

Calculates the intersection of two rectangles.

Available since: | 2.4

#### Parameters

`x1` | `gint`
| Origin of first rectangle.
`y1` | `gint`
| Origin of first rectangle.
`width1` | `gint`
| Width of first rectangle.
`height1` | `gint`
| Height of first rectangle.
`x2` | `gint`
| Origin of second rectangle.
`y2` | `gint`
| Origin of second rectangle.
`width2` | `gint`
| Width of second rectangle.
`height2` | `gint`
| Height of second rectangle.
`dest_x` | `gint*`
| Return location for origin of intersection, or `NULL`.
| The argument will be set by the function.
| The argument can be `NULL`.
`dest_y` | `gint*`
| Return location for origin of intersection, or `NULL`.
| The argument will be set by the function.
| The argument can be `NULL`.
`dest_width` | `gint*`
| Return location for width of intersection, or `NULL`.
| The argument will be set by the function.
| The argument can be `NULL`.
`dest_height` | `gint*`
| Return location for height of intersection, or `NULL`.
| The argument will be set by the function.
| The argument can be `NULL`.

#### Return value

Returns: | `gboolean`
| `TRUE` if the intersection is non-empty, `FALSE` otherwise.