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



                                                                    









                                   
                     
                  
                   

                                                  
      
          

                               
                           
      



                          
          
                          
                            

                                
 
use iced_native::{
    Background, Color, Font, HorizontalAlignment, Rectangle, Vector,
    VerticalAlignment,
};

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