Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/graphics/canvas/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ pub enum Rasterizable {
Path(Box<Path>),
}



impl From<Path> for Rasterizable {
fn from(interaction: Path) -> Rasterizable {
Rasterizable::Path(Box::new(interaction))
Expand All @@ -148,6 +150,12 @@ impl From<Text> for Rasterizable {
}
}

impl UInt for usize {
#[inline] fn zero() -> Self { 0 }
#[inline] fn as_usize(self) -> usize { self }
}


impl From<Box<dyn ImageRepresentation>> for Rasterizable {
fn from(interaction: Box<dyn ImageRepresentation>) -> Rasterizable {
Rasterizable::Path(Box::new(
Expand Down