summaryrefslogtreecommitdiffstats
path: root/wgpu/src/primitive.rs
blob: 0b9e2c41d33d5cd9d0213b45f76b50439dcb0e28 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use iced_native::{text, Background, Color, Rectangle};

#[derive(Debug, Clone)]
pub enum Primitive {
    None,
    Group {
        primitives: Vec<Primitive>,
    },
    Text {
        content: String,
        bounds: Rectangle,
        color: Color,
        size: f32,
        horizontal_alignment: text::HorizontalAlignment,
        vertical_alignment: text::VerticalAlignment,
    },
    Quad {
        bounds: Rectangle,
        background: Background,
        border_radius: u16,
    },
    Image {
        path: String,
        bounds: Rectangle,
    },
}