iced-yoda/wgpu/src/primitive.rs

36 lines
736 B
Rust
Raw Normal View History

use iced_native::{
Background, Color, Font, HorizontalAlignment, Rectangle, Vector,
VerticalAlignment,
};
2019-10-05 19:22:51 +02:00
#[derive(Debug, Clone)]
pub enum Primitive {
None,
Group {
primitives: Vec<Primitive>,
},
Text {
content: String,
bounds: Rectangle,
color: Color,
2019-10-05 19:22:51 +02:00
size: f32,
font: Font,
horizontal_alignment: HorizontalAlignment,
vertical_alignment: VerticalAlignment,
2019-10-05 19:22:51 +02:00
},
2019-10-07 02:17:40 +02:00
Quad {
2019-10-06 19:22:25 +02:00
bounds: Rectangle,
background: Background,
border_radius: u16,
2019-10-06 19:22:25 +02:00
},
Image {
path: String,
bounds: Rectangle,
},
Clip {
bounds: Rectangle,
offset: Vector<u32>,
content: Box<Primitive>,
},
2019-10-06 19:22:25 +02:00
}