# File lib/rubygame/gfx.rb, line 417
  def rotozoom( angle, zoom, smooth=false )
    smooth = smooth ? 1 : 0

    surf = case zoom
           when Array
             zx, zy = zoom.collect { |n| n.to_f }
             SDL::Gfx.rotozoomSurfaceXY(@struct, angle, zx, zy, smooth)
           when Numeric
             zoom = zoom.to_f
             SDL::Gfx.rotozoomSurface(@struct, angle, zoom, smooth)
           else
             raise ArgumentError, "Invalid zoom factor: #{zoom.inspect}"
           end

    if( surf.pointer.null? )
      raise( Rubygame::SDLError,
             "Rotozoom failed: " + SDL.GetError() )
    end

    return self.class.new(surf)
  end