iced-yoda/wgpu/src/primitive.rs

25 lines
445 B
Rust
Raw Normal View History

2019-10-06 19:22:25 +02:00
use iced_native::{Color, Rectangle};
2019-10-05 19:22:51 +02:00
#[derive(Debug, Clone)]
pub enum Primitive {
None,
Group {
primitives: Vec<Primitive>,
},
Text {
content: String,
bounds: Rectangle,
size: f32,
},
2019-10-07 02:17:40 +02:00
Quad {
2019-10-06 19:22:25 +02:00
bounds: Rectangle,
background: Background,
},
}
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum Background {
Color(Color),
2019-10-07 03:56:16 +02:00
// TODO: Add gradient and image variants
2019-10-05 19:22:51 +02:00
}