Class: Cute::Color
- Inherits:
-
Object
- Object
- Cute::Color
- Defined in:
- docstub/color.rb
Instance Method Summary collapse
-
#a ⇒ Float
Alpha component value (0.0 to 1.0).
-
#a= ⇒ Float
The new value.
-
#add ⇒ Color
A new color with added components.
-
#b ⇒ Float
Blue component value (0.0 to 1.0).
-
#b= ⇒ Float
The new value.
-
#g ⇒ Float
Green component value (0.0 to 1.0).
-
#g= ⇒ Float
The new value.
-
#initialize ⇒ Color
constructor
A new instance of Color.
-
#inspect ⇒ String
Detailed string representation.
-
#mul ⇒ Color
A new color with multiplied components.
-
#r ⇒ Float
Red component value (0.0 to 1.0).
-
#r= ⇒ Float
The new value.
-
#sub ⇒ Color
A new color with subtracted components.
-
#to_pixel ⇒ Pixel
A new Pixel instance with equivalent color values.
-
#to_s ⇒ String
String representation.
Constructor Details
#initialize ⇒ Color
Returns a new instance of Color.
12 13 |
# File 'docstub/color.rb', line 12 def initialize(r = 0.0, g = 0.0, b = 0.0, a = 1.0) end |
Instance Method Details
#a ⇒ Float
Returns Alpha component value (0.0 to 1.0).
57 58 |
# File 'docstub/color.rb', line 57 def a end |
#a= ⇒ Float
Returns The new value.
64 65 |
# File 'docstub/color.rb', line 64 def a=(value) end |
#add ⇒ Color
Returns A new color with added components.
90 91 |
# File 'docstub/color.rb', line 90 def add(other) end |
#b ⇒ Float
Returns Blue component value (0.0 to 1.0).
44 45 |
# File 'docstub/color.rb', line 44 def b end |
#b= ⇒ Float
Returns The new value.
51 52 |
# File 'docstub/color.rb', line 51 def b=(value) end |
#g ⇒ Float
Returns Green component value (0.0 to 1.0).
31 32 |
# File 'docstub/color.rb', line 31 def g end |
#g= ⇒ Float
Returns The new value.
38 39 |
# File 'docstub/color.rb', line 38 def g=(value) end |
#inspect ⇒ String
Returns Detailed string representation.
76 77 |
# File 'docstub/color.rb', line 76 def inspect end |
#mul ⇒ Color
Returns A new color with multiplied components.
83 84 |
# File 'docstub/color.rb', line 83 def mul(s) end |
#r ⇒ Float
Returns Red component value (0.0 to 1.0).
18 19 |
# File 'docstub/color.rb', line 18 def r end |
#r= ⇒ Float
Returns The new value.
25 26 |
# File 'docstub/color.rb', line 25 def r=(value) end |
#sub ⇒ Color
Returns A new color with subtracted components.
97 98 |
# File 'docstub/color.rb', line 97 def sub(other) end |
#to_pixel ⇒ Pixel
Returns A new Pixel instance with equivalent color values.
103 104 |
# File 'docstub/color.rb', line 103 def to_pixel end |
#to_s ⇒ String
Returns String representation.
70 71 |
# File 'docstub/color.rb', line 70 def to_s end |