Introduce Translate primitive in iced_wgpu

This commit is contained in:
Héctor Ramón Jiménez 2020-04-28 03:18:31 +02:00
parent 2381a9310c
commit 59b1e90661
10 changed files with 127 additions and 104 deletions

View file

@ -172,12 +172,14 @@ mod bezier {
)
.unwrap();
let mesh = Primitive::Mesh2D {
origin: Point::new(bounds.x, bounds.y),
buffers: Mesh2D {
vertices: buffer.vertices,
indices: buffer.indices,
},
let mesh = Primitive::Translate {
translation: Vector::new(bounds.x, bounds.y),
content: Box::new(Primitive::Mesh2D {
buffers: Mesh2D {
vertices: buffer.vertices,
indices: buffer.indices,
},
}),
};
(