Class: Contrek::Bitmaps::RgbCppColor
- Inherits:
-
Object
- Object
- Contrek::Bitmaps::RgbCppColor
- Defined in:
- lib/contrek/bitmaps/rgb_cpp_color.rb
Instance Attribute Summary collapse
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Instance Method Summary collapse
-
#initialize(r:, g:, b:, a: 255) ⇒ RgbCppColor
constructor
A new instance of RgbCppColor.
Constructor Details
#initialize(r:, g:, b:, a: 255) ⇒ RgbCppColor
Returns a new instance of RgbCppColor.
5 6 7 |
# File 'lib/contrek/bitmaps/rgb_cpp_color.rb', line 5 def initialize(r:, g:, b:, a: 255) @raw = (a << 24) | (b << 16) | (g << 8) | r end |
Instance Attribute Details
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
4 5 6 |
# File 'lib/contrek/bitmaps/rgb_cpp_color.rb', line 4 def raw @raw end |