win32cursor
FreeBodyEngine.core.window.win32cursor
#
LR_DEFAULTSIZE = 64
module-attribute
#
user32 = ctypes.windll.user32
module-attribute
#
build_cursor_from_pil(img, hotspot=(0, 0))
#
Builds a Win32 HCURSOR from a PIL image by hand-assembling an in-memory .cur resource and loading it via CreateIconFromResourceEx.
Raises:
| Type | Description |
|---|---|
OSError
|
via ctypes.WinError if CreateIconFromResourceEx fails. |
rgba_to_bitmap_and_mask(img)
#
Convert RGBA image to raw BMP AND mask format. Returns (bmp_bits, and_mask_bits)