Class: Raylib::Rectangle
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Raylib::Rectangle
- Defined in:
- lib/raylib_main.rb,
lib/raylib_helper.rb
Overview
Rectangle, 4 components
Class Method Summary collapse
Instance Method Summary collapse
- #height ⇒ Object
- #height=(v) ⇒ Object
- #set(x, y, width, height) ⇒ Object
- #width ⇒ Object
- #width=(v) ⇒ Object
- #x ⇒ Object
- #x=(v) ⇒ Object
- #y ⇒ Object
- #y=(v) ⇒ Object
Class Method Details
.create(x = 0, y = 0, width = 0, height = 0) ⇒ Object
165 166 167 |
# File 'lib/raylib_helper.rb', line 165 def self.create(x = 0, y = 0, width = 0, height = 0) Rectangle.new.set(x, y, width, height) end |
Instance Method Details
#height ⇒ Object
183 |
# File 'lib/raylib_helper.rb', line 183 def height() self[:height] end |
#height=(v) ⇒ Object
184 |
# File 'lib/raylib_helper.rb', line 184 def height=(v) self[:height] = v end |
#set(x, y, width, height) ⇒ Object
169 170 171 172 173 174 175 |
# File 'lib/raylib_helper.rb', line 169 def set(x, y, width, height) self[:x] = x self[:y] = y self[:width] = width self[:height] = height self end |
#width ⇒ Object
181 |
# File 'lib/raylib_helper.rb', line 181 def width() self[:width] end |
#width=(v) ⇒ Object
182 |
# File 'lib/raylib_helper.rb', line 182 def width=(v) self[:width] = v end |
#x ⇒ Object
177 |
# File 'lib/raylib_helper.rb', line 177 def x() self[:x] end |
#x=(v) ⇒ Object
178 |
# File 'lib/raylib_helper.rb', line 178 def x=(v) self[:x] = v end |
#y ⇒ Object
179 |
# File 'lib/raylib_helper.rb', line 179 def y() self[:y] end |
#y=(v) ⇒ Object
180 |
# File 'lib/raylib_helper.rb', line 180 def y=(v) self[:y] = v end |