Vips.Rect
Description: Reference for Vips.Rect

### Struct

# VipsRect

#### Description [src]

    struct VipsRect {
      int left;
      int top;
      int width;
      int height;
    }

A `VipsRect` is a rectangular area of pixels. This is a struct for performing simple rectangle algebra.

###### Structure members

`left:` `int`

  Left edge of rectangle.

`top:` `int`

  Top edge of rectangle.

`width:` `int`

  Width of rectangle.

`height:` `int`

  Height of rectangle.

#### Instance methods

###### vips_rect_dup

Duplicate a rect to the heap. You need to free the result with `g_free()`.

###### vips_rect_equalsrect

Is `r1` equal to `r2`?

###### vips_rect_includespoint

Does `r` contain point (`x`, `y`)?

###### vips_rect_includesrect

Is `r2` a subset of `r1`?

###### vips_rect_intersectrect

Fill `out` with the intersection of `r1` and `r2`. `out` can equal `r1` or `r2`.

###### vips_rect_isempty

Is `r` empty? ie. zero width or height.

###### vips_rect_marginadjust

Enlarge `r` by `n`. +1 means out one pixel.

###### vips_rect_normalise

Make sure width and height are >0 by moving the origin and flipping the rect.

###### vips_rect_overlapsrect

Do `r1` and `r2` have a non-empty intersection?

###### vips_rect_unionrect

Fill `out` with the bounding box of `r1` and `r2`. `out` can equal `r1` or `r2`.