Grx.Cursor.new
function new(pixels: Number(guint8), pitch: Number(gint), width: Number(gint), height: Number(gint), x0: Number(gint), y0: Number(gint), colors: Array(Grx.Color)): Grx.Cursor { // Gjs wrapper for grx_cursor_new() }
Create a new cursor using the data provided.
Pixel data values of 0 are treated as transparent, 1 is the first color in colors and so on.
The hot point x0, y0 is relative to the top left of the cursor.
- pixels
cursor bitmap data
- pitch
width of pixel data rows in bytes
- width
width of cursor in pixels
- height
height of cursor in pixels
- x0
hot point of cursor x coordinate
- y0
hot point of cursor y coordinate
- colors
color table for pixel data
- Returns
the new cursor or null if creating the cursor failed.