Class: Cute::Pixel
- Inherits:
-
Object
- Object
- Cute::Pixel
- Defined in:
- docstub/color.rb
Instance Method Summary collapse
-
#a ⇒ Integer
Alpha component value (0 to 255).
-
#a= ⇒ Integer
The new value.
-
#b ⇒ Integer
Blue component value (0 to 255).
-
#b= ⇒ Integer
The new value.
-
#g ⇒ Integer
Green component value (0 to 255).
-
#g= ⇒ Integer
The new value.
-
#initialize ⇒ Pixel
constructor
A new instance of Pixel.
-
#inspect ⇒ String
Detailed string representation.
-
#r ⇒ Integer
Red component value (0 to 255).
-
#r= ⇒ Integer
The new value.
-
#to_color ⇒ Color
A new Color instance with equivalent color values.
-
#to_s ⇒ String
String representation.
Constructor Details
#initialize ⇒ Pixel
Returns a new instance of Pixel.
117 118 |
# File 'docstub/color.rb', line 117 def initialize(r = 0, g = 0, b = 0, a = 255) end |
Instance Method Details
#a ⇒ Integer
Returns Alpha component value (0 to 255).
162 163 |
# File 'docstub/color.rb', line 162 def a end |
#a= ⇒ Integer
Returns The new value.
169 170 |
# File 'docstub/color.rb', line 169 def a=(value) end |
#b ⇒ Integer
Returns Blue component value (0 to 255).
149 150 |
# File 'docstub/color.rb', line 149 def b end |
#b= ⇒ Integer
Returns The new value.
156 157 |
# File 'docstub/color.rb', line 156 def b=(value) end |
#g ⇒ Integer
Returns Green component value (0 to 255).
136 137 |
# File 'docstub/color.rb', line 136 def g end |
#g= ⇒ Integer
Returns The new value.
143 144 |
# File 'docstub/color.rb', line 143 def g=(value) end |
#inspect ⇒ String
Returns Detailed string representation.
181 182 |
# File 'docstub/color.rb', line 181 def inspect end |
#r ⇒ Integer
Returns Red component value (0 to 255).
123 124 |
# File 'docstub/color.rb', line 123 def r end |
#r= ⇒ Integer
Returns The new value.
130 131 |
# File 'docstub/color.rb', line 130 def r=(value) end |
#to_color ⇒ Color
Returns A new Color instance with equivalent color values.
187 188 |
# File 'docstub/color.rb', line 187 def to_color end |
#to_s ⇒ String
Returns String representation.
175 176 |
# File 'docstub/color.rb', line 175 def to_s end |