gsk.rounded_rect

Module for [RoundedRect] class

Types 1

A rectangular region with rounded corners.

Application code should normalize rectangles using [gsk.rounded_rect.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.rounded_rect.RoundedRect] as an argument will internally operate on a normalized copy; all functions returning a [gsk.rounded_rect.RoundedRect] will always return a normalized one.

The algorithm used for normalizing corner sizes is described in

the CSS specification.
Fields
GskRoundedRect _cInstance
Methods
void * _cPtr()
graphene.rect.Rect bounds() @propertyGet `bounds` field. Returns: the bounds of the rectangle
bool containsPoint(graphene.point.Point point)Checks if the given point is inside the rounded rectangle.
bool containsRect(graphene.rect.Rect rect)Checks if the given rect is contained inside the rounded rectangle.
gsk.rounded_rect.RoundedRect init_(graphene.rect.Rect bounds, graphene.size.Size topLeft, graphene.size.Size topRight, graphene.size.Size bottomRight, graphene.size.Size bottomLeft)Initializes the given [gsk.rounded_rect.RoundedRect] with the given values.
gsk.rounded_rect.RoundedRect initCopy(gsk.rounded_rect.RoundedRect src)Initializes self using the given src rectangle.
gsk.rounded_rect.RoundedRect initFromRect(graphene.rect.Rect bounds, float radius)Initializes self to the given bounds and sets the radius of all four corners to radius.
bool intersectsRect(graphene.rect.Rect rect)Checks if part of the given rect is contained inside the rounded rectangle.
bool isRectilinear()Checks if all corners of self are right angles and the rectangle covers all of its bounds.
gsk.rounded_rect.RoundedRect normalize()Normalizes the passed rectangle.
gsk.rounded_rect.RoundedRect offset(float dx, float dy)Offsets the bound's origin by dx and dy.
gsk.rounded_rect.RoundedRect shrink(float top, float right, float bottom, float left)Shrinks (or grows) the given rectangle by moving the 4 sides according to the offsets given.
Constructors
this(void * ptr, Flag!"Take" take)