struct

GSDL::Rect

Inherits Struct < Value < Object

Constructors

new(point : Tuple(IntType, IntType), size : Tuple(IntType, IntType))
Source
new(frect : Rect)
Source
new(x : Int32 = 0, y : Int32 = 0, w : Int32 = 0, h : Int32 | Nil = nil)

h (height) is optional, and defaults to w internally to make a square

Source
new(rect : Tuple(IntType, IntType, IntType, IntType))
Source
new(point : Point, w : Int32 = 0, h : Int32 | Nil = nil)

h (height) is optional, and defaults to w internally to make a square

Source

Class methods

overlaps?(rect_a : Rect, rect_b : Rect) : Bool
Source

Instance methods

bottom
Source
h=(value : Int32)
Source
height
Source
height=(value : Int32)
Source
intersect(other : Rect) : Rect | Nil
Source
left
Source
overlaps?(x : Num, y : Num)
Source
overlaps?(rect : Rect) : Bool
Source
right
Source
to_frect
Source
to_sdl
Source
w=(value : Int32)
Source
width
Source
width=(value : Int32)
Source
x=(value : Int32)
Source
y=(value : Int32)
Source