diff options
author | 2023-06-03 03:04:38 +0200 | |
---|---|---|
committer | 2023-06-03 03:04:38 +0200 | |
commit | c15f1b5f6575792cc89bb5fba2e613428397e46a (patch) | |
tree | 77526943d7aac8004e3ac7dca07154dcbbe25a0f /wgpu/src/quad.rs | |
parent | b353767d2d9703aae35f10ebf8a9ee1490c3ae37 (diff) | |
parent | b5fc0f4a3aa45d33d81d5799396f0b0770c4dff3 (diff) | |
download | iced-c15f1b5f6575792cc89bb5fba2e613428397e46a.tar.gz iced-c15f1b5f6575792cc89bb5fba2e613428397e46a.tar.bz2 iced-c15f1b5f6575792cc89bb5fba2e613428397e46a.zip |
Merge pull request #1888 from iced-rs/web-colors
Introduce `web-colors` feature flag to enable "sRGB linear" blending
Diffstat (limited to 'wgpu/src/quad.rs')
-rw-r--r-- | wgpu/src/quad.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/wgpu/src/quad.rs b/wgpu/src/quad.rs index 9c5ed05f..37d0c623 100644 --- a/wgpu/src/quad.rs +++ b/wgpu/src/quad.rs @@ -5,6 +5,7 @@ use gradient::Gradient; use solid::Solid; use crate::core::{Background, Rectangle}; +use crate::graphics::color; use crate::graphics::{self, Transformation}; use bytemuck::{Pod, Zeroable}; @@ -217,7 +218,7 @@ pub struct Quad { pub size: [f32; 2], /// The border color of the [`Quad`], in __linear RGB__. - pub border_color: [f32; 4], + pub border_color: color::Packed, /// The border radii of the [`Quad`]. pub border_radius: [f32; 4], @@ -250,7 +251,7 @@ impl Batch { let kind = match background { Background::Color(color) => { self.solids.push(Solid { - color: color.into_linear(), + color: color::pack(*color), quad, }); |