pub fn canvas<T>(
prepaint: impl FnOnce(Bounds<Pixels>, &mut Window, &mut App) -> T + 'static,
paint: impl FnOnce(Bounds<Pixels>, T, &mut Window, &mut App) + 'static,
) -> Canvas<T>Expand description
Construct a canvas element with the given paint callback. Useful for adding short term custom drawing to a view.