pygame documentation | || Home || Help Contents || || pygame || cdrom || constants || cursor || display || draw || || event || font || image || joystick || key || mixer || || mixer_music || mouse || movie || sndarray || surfarray || time || || transform || || CD || Channel || Clock || Font || Joystick || Movie || || Overlay || Rect || Sound || Surface || || color || cursors || sprite ||

## pygame.cursor

{module}

compile | - compile cursor strings into cursor data

compile
`pygame.cursor.compile(strings, black, white,xor) -> data, mask`

This takes a set of strings with equal length and computes the binary data for that cursor. The string widths must be divisible by 8.
The black and white arguments are single letter strings that tells which characters will represent black pixels, and which characters represent white pixels. All other characters are considered clear.
This returns a tuple containing the cursor data and cursor mask data. Both these arguments are used when setting a cursor with pygame.mouse.set_cursor().