gsk.rounded_rect
Module for [RoundedRect] class
class RoundedRect
Types 1
classRoundedRect
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 _cInstanceMethods
void * _cPtr() nothrowgraphene.rect.Rect bounds() @property nothrowGet `bounds` field. Returns: the bounds of the rectanglebool containsPoint(graphene.point.Point point) nothrowChecks if the given point is inside the rounded rectangle.bool containsRect(graphene.rect.Rect rect) nothrowChecks 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) nothrowInitializes the given [gsk.rounded_rect.RoundedRect] with the given values.gsk.rounded_rect.RoundedRect initCopy(gsk.rounded_rect.RoundedRect src) nothrowInitializes self using the given src rectangle.gsk.rounded_rect.RoundedRect initFromRect(graphene.rect.Rect bounds, float radius) nothrowInitializes self to the given bounds and sets the radius of all four corners to radius.bool intersectsRect(graphene.rect.Rect rect) nothrowChecks if part of the given rect is contained inside the rounded rectangle.bool isRectilinear() nothrowChecks if all corners of self are right angles and the rectangle covers all of its bounds.gsk.rounded_rect.RoundedRect offset(float dx, float dy) nothrowOffsets the bound's origin by dx and dy.gsk.rounded_rect.RoundedRect shrink(float top, float right, float bottom, float left) nothrowShrinks (or grows) the given rectangle by moving the 4 sides according to the offsets given.