### Struct

# Gsk RoundedRect

#### Description [src]

    struct GskRoundedRect {
      graphene_rect_t bounds;
      graphene_size_t corner[4];
    }

A rectangular region with rounded corners.

Application code should normalize rectangles using `gsk_rounded_rect_normalize()`; this function will ensure that the bounds of the rectangle are normalized and ensure that the corner values are positive and the corners do not overlap.

All functions taking a `GskRoundedRect` as an argument will internally operate on a normalized copy; all functions returning a `GskRoundedRect` will always return a normalized one.

The algorithm used for normalizing corner sizes is described in the CSS specification.

###### Structure members

`bounds`

  The bounds of the rectangle.

`corner`

  The size of the 4 rounded corners.

#### Instance methods

###### gsk_rounded_rect_contains_point

Checks if the given point is inside the rounded rectangle.

###### gsk_rounded_rect_contains_rect

Checks if the given rectangle is contained inside the rounded rectangle.

###### gsk_rounded_rect_init

Initializes a rounded rectangle with the given values.

###### gsk_rounded_rect_init_copy

Initializes a rounded rectangle with a copy.

###### gsk_rounded_rect_init_from_rect

Initializes a rounded rectangle to the given bounds and sets the radius of all four corners equally.

###### gsk_rounded_rect_intersects_rect

Checks if part a rectangle is contained inside the rounded rectangle.

###### gsk_rounded_rect_is_rectilinear

Checks if all corners of a rounded rectangle are right angles and the rectangle covers all of its bounds.

###### gsk_rounded_rect_normalize

Normalizes a rounded rectangle.

###### gsk_rounded_rect_offset

Offsets the rounded rectangle’s origin by `dx` and `dy`.

###### gsk_rounded_rect_shrink

Shrinks (or grows) a rounded rectangle by moving the 4 sides according to the offsets given.