Class: Wx::Image::RGBValue
- Inherits:
-
Object
- Object
- Wx::Image::RGBValue
- Defined in:
- lib/wx/doc/image.rb
Instance Attribute Summary collapse
-
#blue ⇒ Object
readonly
Returns the value of attribute blue.
-
#green ⇒ Object
readonly
Returns the value of attribute green.
-
#red ⇒ Object
readonly
Returns the value of attribute red.
Instance Method Summary collapse
-
#initialize(red, green, blue) ⇒ Wx::Image::RGBValue
constructor
Constructor for RGBValue, an object that contains values for red, green and blue which represent the value of a color.
-
#to_ary ⇒ Array(Float,Float,Float)
Make RGBValue usable for parallel assignments like
red, green, blue = rgb
. -
#to_hsv ⇒ Wx::Image::HSVValue
Convert to HSVValue.
Constructor Details
#initialize(red, green, blue) ⇒ Wx::Image::RGBValue
Constructor for RGBValue, an object that contains values for red, green and blue which represent the value of a color. It is used by Wx::Image.hsv_to_rgb and Wx::Image.rgb_to_hsv, which convert between RGB color space and HSV color space.
92 |
# File 'lib/wx/doc/image.rb', line 92 def initialize(red, green, blue)end |
Instance Attribute Details
#blue ⇒ Object (readonly)
Returns the value of attribute blue.
94 95 96 |
# File 'lib/wx/doc/image.rb', line 94 def blue @blue end |
#green ⇒ Object (readonly)
Returns the value of attribute green.
94 95 96 |
# File 'lib/wx/doc/image.rb', line 94 def green @green end |
#red ⇒ Object (readonly)
Returns the value of attribute red.
94 95 96 |
# File 'lib/wx/doc/image.rb', line 94 def red @red end |
Instance Method Details
#to_ary ⇒ Array(Float,Float,Float)
Make RGBValue usable for parallel assignments like red, green, blue = rgb
98 |
# File 'lib/wx/doc/image.rb', line 98 def to_ary; end |
#to_hsv ⇒ Wx::Image::HSVValue
Convert to HSVValue
102 |
# File 'lib/wx/doc/image.rb', line 102 def to_hsv; end |