Write documentation for new canvas module
This commit is contained in:
parent
570f769744
commit
9c067562fa
17 changed files with 434 additions and 196 deletions
12
wgpu/src/widget/canvas/drawable.rs
Normal file
12
wgpu/src/widget/canvas/drawable.rs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
use crate::canvas::Frame;
|
||||
|
||||
/// A type that can be drawn on a [`Frame`].
|
||||
///
|
||||
/// [`Frame`]: struct.Frame.html
|
||||
pub trait Drawable {
|
||||
/// Draws the [`Drawable`] on the given [`Frame`].
|
||||
///
|
||||
/// [`Drawable`]: trait.Drawable.html
|
||||
/// [`Frame`]: struct.Frame.html
|
||||
fn draw(&self, frame: &mut Frame);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue