diff options
author | 2023-05-30 01:47:31 +0200 | |
---|---|---|
committer | 2023-05-30 01:47:31 +0200 | |
commit | 9253f7663dc862484988dead9a9d1a0cf2dc93f5 (patch) | |
tree | 0e3b21b14ff0d19a90c22b436e02a9a76729aea3 /wgpu/src/layer/quad.rs | |
parent | 8ff2e0178ff9e53ab5cff9bdbc7c834d277a6a93 (diff) | |
parent | c319f5113b274bedff0d18260eddbd6f9915efc3 (diff) | |
download | iced-9253f7663dc862484988dead9a9d1a0cf2dc93f5.tar.gz iced-9253f7663dc862484988dead9a9d1a0cf2dc93f5.tar.bz2 iced-9253f7663dc862484988dead9a9d1a0cf2dc93f5.zip |
Merge pull request #1873 from bungoboingo/fix/bg-gradient-layering
[Fix] Quads of different background types not ordered
Diffstat (limited to '')
-rw-r--r-- | wgpu/src/layer/quad.rs | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/wgpu/src/layer/quad.rs b/wgpu/src/layer/quad.rs deleted file mode 100644 index 0bf7837a..00000000 --- a/wgpu/src/layer/quad.rs +++ /dev/null @@ -1,51 +0,0 @@ -//! A rectangle with certain styled properties. -use crate::graphics::gradient; -use bytemuck::{Pod, Zeroable}; - -/// The properties of a quad. -#[derive(Clone, Copy, Debug, Pod, Zeroable)] -#[repr(C)] -pub struct Quad { - /// The position of the [`Quad`]. - pub position: [f32; 2], - - /// The size of the [`Quad`]. - pub size: [f32; 2], - - /// The border color of the [`Quad`], in __linear RGB__. - pub border_color: [f32; 4], - - /// The border radii of the [`Quad`]. - pub border_radius: [f32; 4], - - /// The border width of the [`Quad`]. - pub border_width: f32, -} - -/// A quad filled with a solid color. -#[derive(Clone, Copy, Debug, Pod, Zeroable)] -#[repr(C)] -pub struct Solid { - /// The background color data of the quad. - pub color: [f32; 4], - - /// The [`Quad`] data of the [`Solid`]. - pub quad: Quad, -} - -/// A quad filled with interpolated colors. -#[derive(Clone, Copy, Debug)] -#[repr(C)] -pub struct Gradient { - /// The background gradient data of the quad. - pub gradient: gradient::Packed, - - /// The [`Quad`] data of the [`Gradient`]. - pub quad: Quad, -} - -#[allow(unsafe_code)] -unsafe impl Pod for Gradient {} - -#[allow(unsafe_code)] -unsafe impl Zeroable for Gradient {} |