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