diff options
author | 2019-10-23 04:52:51 +0200 | |
---|---|---|
committer | 2019-10-23 04:52:51 +0200 | |
commit | 4769272122e8cd0a4d666bb06c00cb27f8cad3c4 (patch) | |
tree | 68e513170347d804f55b3743f1fd960bbf700950 /wgpu/src/primitive.rs | |
parent | e95e656fcd780264f7a3c9a2ba3d0bd471d4894e (diff) | |
parent | 99e1a3780a1ea3ccb173d1fb4cbe889bb08b9643 (diff) | |
download | iced-4769272122e8cd0a4d666bb06c00cb27f8cad3c4.tar.gz iced-4769272122e8cd0a4d666bb06c00cb27f8cad3c4.tar.bz2 iced-4769272122e8cd0a4d666bb06c00cb27f8cad3c4.zip |
Merge pull request #22 from hecrj/basic-renderer
Basic `wgpu` renderer
Diffstat (limited to 'wgpu/src/primitive.rs')
-rw-r--r-- | wgpu/src/primitive.rs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/wgpu/src/primitive.rs b/wgpu/src/primitive.rs new file mode 100644 index 00000000..0b9e2c41 --- /dev/null +++ b/wgpu/src/primitive.rs @@ -0,0 +1,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, + }, +} |