Cursor.newFromPixbuf
gdk.cursor.Cursor newFromPixbuf(gdk.display.Display display, gdkpixbuf.pixbuf.Pixbuf pixbuf, int x, int y)Creates a new cursor from a pixbuf.
Not all GDK backends support RGBA cursors. If they are not supported, a monochrome approximation will be displayed. The functions [gdk.display.Display.supportsCursorAlpha] and [gdk.display.Display.supportsCursorColor] can be used to determine whether RGBA cursors are supported; [gdk.display.Display.getDefaultCursorSize] and [gdk.display.Display.getMaximalCursorSize] give information about cursor sizes.
If x or y are -1, the pixbuf must have options named “x_hot” and “y_hot”, resp., containing integer values between 0 and the width resp. height of the pixbuf. (Since: 3.0)
On the X backend, support for RGBA cursors requires a sufficently new version of the X Render extension.
Parameters
display | the #GdkDisplay for which the cursor will be created |
pixbuf | the #GdkPixbuf containing the cursor image |
x | the horizontal offset of the “hotspot” of the cursor. |
y | the vertical offset of the “hotspot” of the cursor. |
Returns
a new #GdkCursor.