Module: DXRubySDL::Color
- Included in:
- Image
- Defined in:
- lib/dxruby_sdl/color.rb
Class Method Summary collapse
Class Method Details
.to_sdl_alpha(color) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/dxruby_sdl/color.rb', line 15 def to_sdl_alpha(color) if color.length == 4 return color[3] else return nil end end |
.to_sdl_color(color) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/dxruby_sdl/color.rb', line 7 def to_sdl_color(color) if color.length == 4 return color[0..2] else return color end end |