struct Gsk::RoundedRect
- Gsk::RoundedRect
- Struct
- Value
- Object
Overview
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.
Defined in:
lib/gi-crystal/src/auto/gsk-4.0/rounded_rect.crConstructors
- .new(pointer : Pointer(Void), transfer : GICrystal::Transfer)
- .new(data : LibGsk::RoundedRect, _transfer : GICrystal::Transfer)
- .new(bounds : Graphene::Rect? = nil, corner : Enumerable(Graphene::Size)? = nil)
Instance Method Summary
- #==(other : self) : Bool
- #bounds(*args, **options)
- #bounds(*args, **options, &)
- #bounds=(arg)
- #contains_point(point : Graphene::Point) : Bool
- #contains_rect(rect : Graphene::Rect) : Bool
- #corner(*args, **options)
- #corner(*args, **options, &)
- #corner=(arg)
- #init(bounds : Graphene::Rect, top_left : Graphene::Size, top_right : Graphene::Size, bottom_right : Graphene::Size, bottom_left : Graphene::Size) : Gsk::RoundedRect
- #init_copy(src : Gsk::RoundedRect) : Gsk::RoundedRect
- #init_from_rect(bounds : Graphene::Rect, radius : Float32) : Gsk::RoundedRect
- #intersects_rect(rect : Graphene::Rect) : Bool
- #is_rectilinear : Bool
- #normalize : Gsk::RoundedRect
- #offset(dx : Float32, dy : Float32) : Gsk::RoundedRect
- #shrink(top : Float32, right : Float32, bottom : Float32, left : Float32) : Gsk::RoundedRect
Constructor Detail
Instance Method Detail
def init(bounds : Graphene::Rect, top_left : Graphene::Size, top_right : Graphene::Size, bottom_right : Graphene::Size, bottom_left : Graphene::Size) : Gsk::RoundedRect
#