Class: Raylib::Color

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

Overview

Color helper

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_u8(r = 0, g = 0, b = 0, a = 255) ⇒ Object



11
12
13
# File 'lib/raylib_helper.rb', line 11

def self.from_u8(r = 0, g = 0, b = 0, a = 255)
  Color.new.set(r, g, b, a)
end

Instance Method Details

#aObject



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

def a = self[:a]

#a=(v) ⇒ Object



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

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

#bObject



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

def b = self[:b]

#b=(v) ⇒ Object



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

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

#gObject



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

def g = self[:g]

#g=(v) ⇒ Object



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

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

#rObject



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

def r = self[:r]

#r=(v) ⇒ Object



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

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

#set(r, g, b, a) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/raylib_helper.rb', line 15

def set(r, g, b, a)
  self[:r] = r
  self[:g] = g
  self[:b] = b
  self[:a] = a
  self
end