1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
mod cached; pub use cached::Cached; use crate::{canvas::Frame, triangle}; use iced_native::Size; use std::sync::Arc; pub trait Layer: std::fmt::Debug { fn draw(&self, bounds: Size) -> Arc<triangle::Mesh2D>; } pub trait Drawable { fn draw(&self, frame: &mut Frame); }