Class: Raylib::Rectangle

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/raylib_main.rb

Class Method Summary collapse

Class Method Details

.create(x = 0, y = 0, width = 0, height = 0) ⇒ Object



120
121
122
123
124
125
126
127
# File 'lib/raylib.rb', line 120

def Rectangle.create(x = 0, y = 0, width = 0, height = 0)
  instance = Rectangle.new
  instance[:x] = x
  instance[:y] = y
  instance[:width] = width
  instance[:height] = height
  return instance
end