module RbSDL2::Surface::BlendMode
Public Class Methods
to_name(num)
click to toggle source
# File lib/rb_sdl2/surface/blend_mode.rb, line 17 def to_name(num) case num when ::SDL2::SDL_BLENDMODE_ADD then "additive" when ::SDL2::SDL_BLENDMODE_BLEND then "alpha" when ::SDL2::SDL_BLENDMODE_MOD then "modulate" when ::SDL2::SDL_BLENDMODE_MUL then "multiply" when ::SDL2::SDL_BLENDMODE_NONE then "normal" else "" end end
to_num(obj)
click to toggle source
# File lib/rb_sdl2/surface/blend_mode.rb, line 5 def to_num(obj) case obj when /\Aadd/ then ::SDL2::SDL_BLENDMODE_ADD when /\Aalpha/, /\Ablend/ then ::SDL2::SDL_BLENDMODE_BLEND when /\Amod/ then ::SDL2::SDL_BLENDMODE_MOD when /\Amul/ then ::SDL2::SDL_BLENDMODE_MUL when /\Anone/, /\Anormal/ then ::SDL2::SDL_BLENDMODE_NONE else obj.to_i end end
Public Instance Methods
additive_blend_mode?(= ::SDL2::SDL_BLENDMODE_ADD == blend_mode)
click to toggle source
# File lib/rb_sdl2/surface/blend_mode.rb, line 30 def additive_blend_mode? = ::SDL2::SDL_BLENDMODE_ADD == blend_mode def alpha_blend_mode? = ::SDL2::SDL_BLENDMODE_BLEND == blend_mode def modulate_blend_mode? = ::SDL2::SDL_BLENDMODE_MOD == blend_mode def multiply_blend_mode? = ::SDL2::SDL_BLENDMODE_MUL == blend_mode def normal_blend_mode? = ::SDL2::SDL_BLENDMODE_NONE == blend_mode end
alpha_blend_mode?(= ::SDL2::SDL_BLENDMODE_BLEND == blend_mode)
click to toggle source
# File lib/rb_sdl2/surface/blend_mode.rb, line 32 def alpha_blend_mode? = ::SDL2::SDL_BLENDMODE_BLEND == blend_mode def modulate_blend_mode? = ::SDL2::SDL_BLENDMODE_MOD == blend_mode def multiply_blend_mode? = ::SDL2::SDL_BLENDMODE_MUL == blend_mode def normal_blend_mode? = ::SDL2::SDL_BLENDMODE_NONE == blend_mode end end
modulate_blend_mode?(= ::SDL2::SDL_BLENDMODE_MOD == blend_mode)
click to toggle source
# File lib/rb_sdl2/surface/blend_mode.rb, line 34 def modulate_blend_mode? = ::SDL2::SDL_BLENDMODE_MOD == blend_mode def multiply_blend_mode? = ::SDL2::SDL_BLENDMODE_MUL == blend_mode def normal_blend_mode? = ::SDL2::SDL_BLENDMODE_NONE == blend_mode end end end
multiply_blend_mode?(= ::SDL2::SDL_BLENDMODE_MUL == blend_mode)
click to toggle source
# File lib/rb_sdl2/surface/blend_mode.rb, line 36 def multiply_blend_mode? = ::SDL2::SDL_BLENDMODE_MUL == blend_mode def normal_blend_mode? = ::SDL2::SDL_BLENDMODE_NONE == blend_mode end end
normal_blend_mode?(= ::SDL2::SDL_BLENDMODE_NONE == blend_mode)
click to toggle source
# File lib/rb_sdl2/surface/blend_mode.rb, line 38 def normal_blend_mode? = ::SDL2::SDL_BLENDMODE_NONE == blend_mode end