Class: Raylib::Rectangle

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

Overview

Rectangle, 4 components

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

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



126
127
128
# File 'lib/raylib_helper.rb', line 126

def self.create(x = 0, y = 0, width = 0, height = 0)
  Rectangle.new.set(x, y, width, height)
end

Instance Method Details

#heightObject



546
# File 'lib/raylib_main.rb', line 546

def height = self[:height]

#height=(v) ⇒ Object



547
# File 'lib/raylib_main.rb', line 547

def height=(v) self[:height] = v end

#set(x, y, width, height) ⇒ Object



130
131
132
133
134
135
136
# File 'lib/raylib_helper.rb', line 130

def set(x, y, width, height)
  self[:x] = x
  self[:y] = y
  self[:width] = width
  self[:height] = height
  self
end

#widthObject



544
# File 'lib/raylib_main.rb', line 544

def width = self[:width]

#width=(v) ⇒ Object



545
# File 'lib/raylib_main.rb', line 545

def width=(v) self[:width] = v end

#xObject



540
# File 'lib/raylib_main.rb', line 540

def x = self[:x]

#x=(v) ⇒ Object



541
# File 'lib/raylib_main.rb', line 541

def x=(v) self[:x] = v end

#yObject



542
# File 'lib/raylib_main.rb', line 542

def y = self[:y]

#y=(v) ⇒ Object



543
# File 'lib/raylib_main.rb', line 543

def y=(v) self[:y] = v end