Introduce Translate primitive in iced_wgpu
This commit is contained in:
parent
2381a9310c
commit
59b1e90661
10 changed files with 127 additions and 104 deletions
|
|
@ -1,15 +1,20 @@
|
|||
use crate::Primitive;
|
||||
use std::sync::Arc;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Geometry(Arc<Primitive>);
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Geometry(Primitive);
|
||||
|
||||
impl Geometry {
|
||||
pub(crate) fn from_primitive(primitive: Arc<Primitive>) -> Self {
|
||||
pub(crate) fn from_primitive(primitive: Primitive) -> Self {
|
||||
Self(primitive)
|
||||
}
|
||||
|
||||
pub(crate) fn into_primitive(self) -> Arc<Primitive> {
|
||||
pub fn into_primitive(self) -> Primitive {
|
||||
self.0
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Geometry> for Primitive {
|
||||
fn from(geometry: Geometry) -> Primitive {
|
||||
geometry.0
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue