class

Egui::CustomCursorImage

Inherits Reference < Object

Port of egui CustomCursorImage (PlatformOutput::cursor_image): a bitmap the integration uploads to the OS as the real cursor — unlike painter-drawn cursor sprites it is not clipped by the window, exactly what the CSS cursor: url(…) syntax gives a browser. rgba is straight (non-premultiplied) RGBA, exactly width * height * 4 bytes; the hotspot is the pixel the pointer position maps to, measured from the top-left. Backends without bitmap-cursor support fall back to CursorIcon.

Build one and hold it (a constant or ivar), then push it per frame:

FILL_CURSOR = Egui::CustomCursorImage.new(rgba, 32, 32, 4, 28) resp.on_hover_cursor_image(FILL_CURSOR)

Constructors

new(rgba : Bytes, width : Int32, height : Int32, hotspot_x : Int32 = 0, hotspot_y : Int32 = 0)
Source

Instance methods

height
Source
hotspot_x
Source
hotspot_y
Source
rgba
Source
same?(other : CustomCursorImage) : Bool

The identity check the backend dedupes OS cursor uploads by (the Arc::ptr_eq role upstream): same buffer, geometry and hotspot — reusing one instance across frames re-uploads nothing.

Source
width
Source