plucky (3) SDL_CreateColorCursor.3.gz

Provided by: libsdl3-doc_3.2.4+ds-2_all bug

NAME

       SDL_CreateColorCursor - Create a color cursor.

HEADER FILE

       Defined in SDL3/SDL_mouse.h

SYNOPSIS

       #include "SDL3/SDL.h"

       SDL_Cursor * SDL_CreateColorCursor(SDL_Surface *surface,
                                     int hot_x,
                                     int hot_y);

DESCRIPTION

       If  this  function is passed a surface with alternate representations, the surface will be interpreted as
       the content to be used for 100% display scale, and the alternate representations will be  used  for  high
       DPI situations. For example, if the original surface is 32x32, then on a 2x macOS display or 200% display
       scale on Windows, a 64x64 version of the image will be used, if available. If a matching version  of  the
       image  isn't  available,  the closest larger size image will be downscaled to the appropriate size and be
       used instead, if available. Otherwise, the closest smaller image will be upscaled and be used instead.

FUNCTION PARAMETERS

       surface
              an SDL_Surface
               structure representing the cursor image.

       hot_x  the x position of the cursor hot spot.

       hot_y  the y position of the cursor hot spot.

RETURN VALUE

       ( SDL_Cursor
        *) Returns the new cursor on success or NULL on failure; call SDL_GetError () for more information.

THREAD SAFETY

       This function should only be called on the main thread.

AVAILABILITY

       This function is available since SDL 3.2.0.

SEE ALSO

       (3),   SDL_CreateCursor(3),   (3),   SDL_CreateSystemCursor(3),   (3),   SDL_DestroyCursor(3),   (3),
       SDL_SetCursor(3)