summaryrefslogblamecommitdiffstats
path: root/wgpu/src/primitive.rs
blob: f6730a1f8ec0f8c2655979b63089a70a70dd7250 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
                                    











                                   
          







                                        
                                            
 
use iced_native::{Color, Rectangle};

#[derive(Debug, Clone)]
pub enum Primitive {
    None,
    Group {
        primitives: Vec<Primitive>,
    },
    Text {
        content: String,
        bounds: Rectangle,
        size: f32,
    },
    Quad {
        bounds: Rectangle,
        background: Background,
    },
}

#[derive(Debug, Clone, Copy, PartialEq)]
pub enum Background {
    Color(Color),
    // TODO: Add gradient and image variants
}