Rename Box primitive to Quad

This commit is contained in:
Héctor Ramón Jiménez 2019-10-07 02:17:40 +02:00
parent 5286ef36b6
commit 70c17b053b
3 changed files with 4 additions and 4 deletions

View file

@ -11,7 +11,7 @@ pub enum Primitive {
bounds: Rectangle,
size: f32,
},
Box {
Quad {
bounds: Rectangle,
background: Background,
},

View file

@ -144,8 +144,8 @@ impl Renderer {
scale: wgpu_glyph::Scale { x: *size, y: *size },
..Default::default()
}),
Primitive::Box { bounds, background } => {
// TODO: Batch boxes and draw them all at once
Primitive::Quad { bounds, background } => {
// TODO: Batch quads and draw them all at once
}
}
}

View file

@ -20,7 +20,7 @@ impl button::Renderer for Renderer {
) -> Self::Primitive {
Primitive::Group {
primitives: vec![
Primitive::Box {
Primitive::Quad {
bounds: layout.bounds(),
background: Background::Color(Color {
r: 0.0,