pub enum DrawEvent {
Redraw,
NewFrame,
Scale(f64),
Resize(f64, f64),
CanvasTransform(Transform2D),
Pointer(PointerAction, PointerId, PointerState),
KeyDown(u64, Option<Key>),
KeyUp(u64, Option<Key>),
Closed,
}
Expand description
Events that can arrive from a flo_draw window
Variants§
Redraw
Request to re-render the window (this is automatic for canvas windows)
NewFrame
Indicates that a frame has finished rendering to the canvas
Scale(f64)
The window has a new scale
Resize(f64, f64)
Window has a new size
CanvasTransform(Transform2D)
Canvas transformation for the window has changed (this will convert between window coordinates and canvas coordinates)
Pointer(PointerAction, PointerId, PointerState)
A pointer device has changed its state
KeyDown(u64, Option<Key>)
The user has pressed a key (parameters are scancode and the name of the key that was pressed, if known)
KeyUp(u64, Option<Key>)
The user has released a key (parameters are scancode and the name of the key that was pressed, if known)
Closed
Window has been closed