Initializes a rounded rectangle with the given values.
This function will implicitly normalize the rounded rectangle before returning.
a graphene_rect_t describing the bounds
the rounding radius of the top left corner
the rounding radius of the top right corner
the rounding radius of the bottom right corner
the rounding radius of the bottom left corner
the initialized rounded rectangle
Initializes a rounded rectangle with a copy.
This function will not normalize the rounded rectangle, so make sure the source is normalized.
another rounded rectangle
the initialized rounded rectangle
Initializes a rounded rectangle to the given bounds and sets the radius of all four corners equally.
the initialized rounded rectangle
Checks if all corners of a rounded rectangle are right angles and the rectangle covers all of its bounds.
This information can be used to decide if Gsk.ClipNode.new or Gsk.RoundedClipNode.new should be called.
true if the rounded rectangle is rectilinear
Normalizes a rounded rectangle.
This function will ensure that the bounds of the rounded rectangle are normalized and ensure that the corner values are positive and the corners do not overlap.
the normalized rounded rectangle
Offsets the rounded rectangle's origin by dx and dy.
The size and corners of the rounded rectangle are unchanged.
the horizontal offset
the vertical offset
the offset rounded rectangle
Shrinks (or grows) a rounded rectangle by moving the 4 sides according to the offsets given.
The corner radii will be changed in a way that tries to keep the center of the corner circle intact. This emulates CSS behavior.
This function also works for growing rounded rectangles
if you pass negative values for the top, right, bottom or left.
how far to move the top side downwards
how far to move the right side to the left
how far to move the bottom side upwards
how far to move the left side to the right
the resized rounded rectangle
A rectangular region with rounded corners.
Application code should normalize rectangles using Gsk.RoundedRect.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 Gsk.RoundedRect as an argument will internally operate on a normalized copy; all functions returning a Gsk.RoundedRect will always return a normalized one.
The algorithm used for normalizing corner sizes is described in the CSS specification.