class RbSDL2::Rect
Public Class Methods
new(x = 0, y = 0, w = 0, h = 0)
click to toggle source
# File lib/rb_sdl2/rect.rb, line 3 def initialize(x = 0, y = 0, w = 0, h = 0) @st = ::SDL2::SDL_Rect.new @st[:x], @st[:y], @st[:w], @st[:h] = x, y, w, h end
Public Instance Methods
to_a(= @st.values)
click to toggle source
# File lib/rb_sdl2/rect.rb, line 8 def to_a = @st.values alias to_ary to_a def to_ptr = @st.to_ptr end end
to_ptr(= @st.to_ptr)
click to toggle source
# File lib/rb_sdl2/rect.rb, line 12 def to_ptr = @st.to_ptr end