Class: Raylib::Color
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Raylib::Color
- Defined in:
- lib/raylib_main.rb,
lib/raylib_helper.rb
Overview
Color helper
Class Method Summary collapse
Instance Method Summary collapse
- #a ⇒ Object
- #a=(v) ⇒ Object
- #b ⇒ Object
- #b=(v) ⇒ Object
- #g ⇒ Object
- #g=(v) ⇒ Object
- #r ⇒ Object
- #r=(v) ⇒ Object
- #set(r, g, b, a) ⇒ Object
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
#a ⇒ Object
29 |
# File 'lib/raylib_helper.rb', line 29 def a() self[:a] end |
#a=(v) ⇒ Object
30 |
# File 'lib/raylib_helper.rb', line 30 def a=(v) self[:a] = v end |
#b ⇒ Object
27 |
# File 'lib/raylib_helper.rb', line 27 def b() self[:b] end |
#b=(v) ⇒ Object
28 |
# File 'lib/raylib_helper.rb', line 28 def b=(v) self[:b] = v end |
#g ⇒ Object
25 |
# File 'lib/raylib_helper.rb', line 25 def g() self[:g] end |
#g=(v) ⇒ Object
26 |
# File 'lib/raylib_helper.rb', line 26 def g=(v) self[:g] = v end |
#r ⇒ Object
23 |
# File 'lib/raylib_helper.rb', line 23 def r() self[:r] end |
#r=(v) ⇒ Object
24 |
# File 'lib/raylib_helper.rb', line 24 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 |