struct Gsk::RoundedRect

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.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pointer : Pointer(Void), transfer : GICrystal::Transfer) #

[View source]
def self.new(data : LibGsk::RoundedRect, _transfer : GICrystal::Transfer) #

[View source]
def self.new(bounds : Graphene::Rect | Nil = nil, corner : Enumerable(Graphene::Size) | Nil = nil) #

[View source]

Instance Method Detail

def ==(other : self) : Bool #

[View source]
def bounds(*args, **options) #

[View source]
def bounds(*args, **options, &) #

[View source]
def bounds=(arg) #

[View source]
def contains_point(point : Graphene::Point) : Bool #

[View source]
def contains_rect(rect : Graphene::Rect) : Bool #

[View source]
def corner(*args, **options) #

[View source]
def corner(*args, **options, &) #

[View source]
def corner=(arg) #

[View source]
def init(bounds : Graphene::Rect, top_left : Graphene::Size, top_right : Graphene::Size, bottom_right : Graphene::Size, bottom_left : Graphene::Size) : Gsk::RoundedRect #

[View source]
def init_copy(src : Gsk::RoundedRect) : Gsk::RoundedRect #

[View source]
def init_from_rect(bounds : Graphene::Rect, radius : Float32) : Gsk::RoundedRect #

[View source]
def intersects_rect(rect : Graphene::Rect) : Bool #

[View source]
def is_rectilinear : Bool #

[View source]
def normalize : Gsk::RoundedRect #

[View source]
def offset(dx : Float32, dy : Float32) : Gsk::RoundedRect #

[View source]
def shrink(top : Float32, right : Float32, bottom : Float32, left : Float32) : Gsk::RoundedRect #

[View source]