Class: Gosu::Color
- Inherits:
-
Object
- Object
- Gosu::Color
- Defined in:
- lib/ashton/gosu_ext/color.rb
Class Method Summary collapse
-
.from_opengl(rgba_array) ⇒ Gosu::Color
Convert into an array of floats in range 0.0 to 1.0.
Instance Method Summary collapse
-
#to_i ⇒ Integer
Convert to Gosu-compatible ARGB value (0xAARRGGBB).
-
#to_opengl ⇒ Array<Float>
Convert into a length 4 array of floats in range 0.0 to 1.0, which can then be passed into OpenGL ruby methods.
Class Method Details
.from_opengl(rgba_array) ⇒ Gosu::Color
Convert into an array of floats in range 0.0 to 1.0.
|
# File 'lib/ashton/gosu_ext/color.rb', line 3
|
Instance Method Details
#to_i ⇒ Integer
Convert to Gosu-compatible ARGB value (0xAARRGGBB)
|
# File 'lib/ashton/gosu_ext/color.rb', line 21
|
#to_opengl ⇒ Array<Float>
Convert into a length 4 array of floats in range 0.0 to 1.0, which can then be passed into OpenGL ruby methods.
|
# File 'lib/ashton/gosu_ext/color.rb', line 10
|