Remove Layer trait and simplify Canvas

This commit is contained in:
Héctor Ramón Jiménez 2020-04-19 21:55:23 +02:00
parent bb424e54c5
commit 592cc68506
9 changed files with 181 additions and 174 deletions

View file

@ -0,0 +1,15 @@
use crate::Primitive;
use std::sync::Arc;
#[derive(Debug)]
pub struct Geometry(Arc<Primitive>);
impl Geometry {
pub(crate) fn from_primitive(primitive: Arc<Primitive>) -> Self {
Self(primitive)
}
pub(crate) fn into_primitive(self) -> Arc<Primitive> {
self.0
}
}