class RbSDL2::Cursor::ColorCursor

Public Class Methods

new(surface, hot_x = 0, hot_y = 0) click to toggle source
Calls superclass method
# File lib/rb_sdl2/cursor/color_cursor.rb, line 9
def new(surface, hot_x = 0, hot_y = 0)
  # SDL_CreateColorCursor は与えられた surface をコピーする。
  # 呼び出し後に引数に与えた surface オブジェクトは安全に開放できる。
  ptr = CursorPointer.new(::SDL2.SDL_CreateColorCursor(surface, hot_x, hot_y))
  raise RbSDL2Error if ptr.null?
  super(ptr)
end