Class: RbSDL2::Cursor::ColorCursor
- Inherits:
-
CursorClass
- Object
- CursorClass
- RbSDL2::Cursor::ColorCursor
- Defined in:
- lib/rb_sdl2/cursor/color_cursor.rb
Class Method Summary collapse
Methods inherited from CursorClass
#current!, #current?, #hide, #initialize, #show, #shown?, #to_ptr
Constructor Details
This class inherits a constructor from RbSDL2::Cursor::CursorClass
Class Method Details
.new(surface, hot_x = 0, hot_y = 0) ⇒ Object
9 10 11 12 13 14 15 |
# 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 |