Class: Contrek::Bitmaps::RgbColor
- Inherits:
-
Object
- Object
- Contrek::Bitmaps::RgbColor
- Defined in:
- lib/contrek/bitmaps/rgb_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) ⇒ RgbColor
constructor
A new instance of RgbColor.
Constructor Details
#initialize(r:, g:, b:, a: 255) ⇒ RgbColor
Returns a new instance of RgbColor.
7 8 9 |
# File 'lib/contrek/bitmaps/rgb_color.rb', line 7 def initialize(r:, g:, b:, a: 255) @raw = (r << 24) + (g << 16) + (b << 8) + a end |
Instance Attribute Details
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
6 7 8 |
# File 'lib/contrek/bitmaps/rgb_color.rb', line 6 def raw @raw end |