struct

Tryst::SDL::Rect

Inherits Struct < Value < Object

A rectangle in the renderer's coordinates.

Float, because SDL3's drawing calls are - the integer SDL_Rect variants are gone. Constructors take any Number and convert once, so a caller with integer coordinates never writes .to_f32.

Constructors

new(x : Float32, y : Float32, w : Float32, h : Float32)
Source
new(x : Number, y : Number, w : Number, h : Number)
Source

Instance methods

clone
Source
copy_with(x _x = @x, y _y = @y, w _w = @w, h _h = @h)
Source
h
to_unsafe
Source
w
x
y