Struct
GskRoundedRect
Description [src]
struct GskRoundedRect {
graphene_rect_t bounds;
None corner;
}
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_init_from_rect
Initializes self
to the given bounds
and sets the radius
of all four corners to radius
.
gsk_rounded_rect_intersects_rect
Checks if part of the given rect
is contained inside the rounded rectangle.
gsk_rounded_rect_is_rectilinear
Checks if all corners of self
are right angles and the
rectangle covers all of its bounds.
gsk_rounded_rect_shrink
Shrinks (or grows) the given rectangle by moving the 4 sides according to the offsets given.