Introduce Translate primitive in iced_wgpu
This commit is contained in:
parent
2381a9310c
commit
59b1e90661
10 changed files with 127 additions and 104 deletions
|
|
@ -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,
|
||||
},
|
||||
}),
|
||||
};
|
||||
|
||||
(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue