Class: SDC::Color
- Inherits:
-
Object
- Object
- SDC::Color
- Defined in:
- engine_docs/automatic_doc_Color.rb,
engine_docs/automatic_doc_Color.rb
Overview
RGBA color class
Instance Attribute Summary collapse
-
#a ⇒ Integer
The alpha value of the color, ranging from 0 to 255.
-
#b ⇒ Integer
The blue value of the color, ranging from 0 to 255.
-
#g ⇒ Integer
The green value of the color, ranging from 0 to 255.
-
#r ⇒ Integer
The red value of the color, ranging from 0 to 255.
Instance Method Summary collapse
-
#*(other) ⇒ Color
Multiplies the two color values by components to a new value.
-
#+(other) ⇒ Color
Adds the two color values by components to a new value.
-
#-(other) ⇒ Color
Subtracts the two color values by components to a new value.
-
#initialize(r = 0, g = 0, b = 0, a = 255) ⇒ Color
constructor
Creates a color with RGBA values ranging from 0 to 255.
-
#inspect ⇒ String
Creates a string with verbose RGBA information.
-
#to_i ⇒ Integer
Converts the color RGBA value to a 32 bit integer value.
-
#to_s ⇒ String
Converts the color RGBA value to a space-separated string.
Constructor Details
#initialize(r = 0, g = 0, b = 0, a = 255) ⇒ Color
Creates a color with RGBA values ranging from 0 to 255
|
# File 'engine_docs/automatic_doc_Color.rb', line 9
|
Instance Attribute Details
#a ⇒ Integer
The alpha value of the color, ranging from 0 to 255
|
# File 'engine_docs/automatic_doc_Color.rb', line 35
|
#b ⇒ Integer
The blue value of the color, ranging from 0 to 255
|
# File 'engine_docs/automatic_doc_Color.rb', line 31
|
#g ⇒ Integer
The green value of the color, ranging from 0 to 255
|
# File 'engine_docs/automatic_doc_Color.rb', line 27
|
#r ⇒ Integer
The red value of the color, ranging from 0 to 255
|
# File 'engine_docs/automatic_doc_Color.rb', line 23
|
Instance Method Details
#*(other) ⇒ Color
Multiplies the two color values by components to a new value
|
# File 'engine_docs/automatic_doc_Color.rb', line 51
|
#+(other) ⇒ Color
Adds the two color values by components to a new value
|
# File 'engine_docs/automatic_doc_Color.rb', line 39
|
#-(other) ⇒ Color
Subtracts the two color values by components to a new value
|
# File 'engine_docs/automatic_doc_Color.rb', line 45
|
#inspect ⇒ String
Creates a string with verbose RGBA information
|
# File 'engine_docs/automatic_doc_Color.rb', line 62
|
#to_i ⇒ Integer
Converts the color RGBA value to a 32 bit integer value
|
# File 'engine_docs/automatic_doc_Color.rb', line 18
|
#to_s ⇒ String
Converts the color RGBA value to a space-separated string
|
# File 'engine_docs/automatic_doc_Color.rb', line 57
|