Wiki Page Content

Differences between revisions 1 and 2
Revision 1 as of 2010-03-11 06:33:28
Size: 1710
Editor: SheenaSmith
Comment: create page, add content (Rev 5540)
Revision 2 as of 2010-03-11 21:14:49
Size: 1722
Editor: SheenaSmith
Comment:
Deletions are marked like this. Additions are marked like this.
Line 24: Line 24:
||'''h'''||the height of the cursor ^same restrictions?^||
||'''hot_x'''||description||
||'''hot_y'''||description||
||'''h'''||the height of the cursor ''(same restrictions?)''||
||'''hot_x'''||''description''||
||'''hot_y'''||''description''||
Line 37: Line 37:
The cursor width ^( '''w''' )^ must be a multiple of 8 bits. The cursor width ''('''w''')'' must be a multiple of 8 bits.

DRAFT

SDL_CreateCursor

Use this function to create a cursor for the currently selected mouse, using the specified bitmap data and mask (in MSB format).

Syntax

SDL_Cursor* SDL_CreateCursor(const Uint8* data,
                             const Uint8* mask,
                             int          w,
                             int          h,
                             int          hot_x,
                             int          hot_y)

Function Parameters

data

the first part of the cursor color information; see Remarks for details

mask

the second part of the cursor color information; see Remarks for details

w

the width of the cursor; see Remarks for details

h

the height of the cursor (same restrictions?)

hot_x

description

hot_y

description

Return Value

A pointer to an SDL_Cursor structure filled with the cursor information. ???

Code Examples

You can add your code example here

Remarks

The cursor width (w) must be a multiple of 8 bits.

The cursor is created in black and white according to the following:

data

mask

Resulting Pixel on Screen

0

1

White

1

1

Black

0

0

Transparent

1

0

Inverted color if possible, black if not.


CategoryAPI, CategoryMouse

None: SDL_CreateCursor (last edited 2017-07-14 21:57:48 by PhilippWiesemann)

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit