Module: SDL::Gfx

Extended by:
NiceFFI::Library
Defined in:
lib/ruby-sdl-ffi/gfx.rb,
lib/ruby-sdl-ffi/gfx/blitfunc.rb,
lib/ruby-sdl-ffi/gfx/rotozoom.rb,
lib/ruby-sdl-ffi/gfx/framerate.rb,
lib/ruby-sdl-ffi/gfx/primitives.rb,
lib/ruby-sdl-ffi/gfx/imagefilter.rb

Defined Under Namespace

Classes: BlitInfo, FPSmanager, TColorRGBA, TColorY

Constant Summary collapse

SMOOTHING_OFF =
0
SMOOTHING_ON =
1
FPS_UPPER_LIMIT =
200
FPS_LOWER_LIMIT =
1
FPS_DEFAULT =
30
M_PI =
3.141592654

Class Method Summary collapse

Class Method Details

.rotozoomSurfaceSize(width, height, angle, zoom) ⇒ Object



59
60
61
62
63
64
# File 'lib/ruby-sdl-ffi/gfx/rotozoom.rb', line 59

def self.rotozoomSurfaceSize( width, height, angle, zoom )
  w = FFI::Buffer.new( :int )
  h = FFI::Buffer.new( :int )
  __rotozoomSurfaceSize( width, height, angle, zoom, w, h )
  return [w.get_int(0), h.get_int(0)]
end

.rotozoomSurfaceSizeXY(width, height, angle, zoomx, zoomy) ⇒ Object



75
76
77
78
79
80
# File 'lib/ruby-sdl-ffi/gfx/rotozoom.rb', line 75

def self.rotozoomSurfaceSizeXY( width, height, angle, zoomx, zoomy )
  w = FFI::Buffer.new( :int )
  h = FFI::Buffer.new( :int )
  __rotozoomSurfaceSizeXY( width, height, angle, zoomx, zoomy, w, h )
  return [w.get_int(0), h.get_int(0)]
end

.sdl_func(name, args, ret) ⇒ Object



42
43
44
# File 'lib/ruby-sdl-ffi/gfx.rb', line 42

def self.sdl_func( name, args, ret )
  func name, "SDL_#{name}", args, ret
end

.zoomSurfaceSize(width, height, zoomx, zoomy) ⇒ Object



91
92
93
94
95
96
# File 'lib/ruby-sdl-ffi/gfx/rotozoom.rb', line 91

def self.zoomSurfaceSize( width, height, zoomx, zoomy )
  w = FFI::Buffer.new( :int )
  h = FFI::Buffer.new( :int )
  __zoomSurfaceSize( width, height, zoomx, zoomy, w, h )
  return [w.get_int(0), h.get_int(0)]
end