summaryrefslogtreecommitdiffstats
path: root/wgpu/src/layer.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2024-01-20 13:52:15 +0100
committerLibravatar GitHub <noreply@github.com>2024-01-20 13:52:15 +0100
commit545cc909c9f356dd733d273173694db9b8c28594 (patch)
treec8132edab4386bbccb07a372c3776f22abefbda3 /wgpu/src/layer.rs
parentb3e3f6e3c9fc6879e6681810f54d7eaa7c0f3d30 (diff)
parent1c1667c3c99fa9b1009ef416b9b3c7e5a1d53a97 (diff)
downloadiced-545cc909c9f356dd733d273173694db9b8c28594.tar.gz
iced-545cc909c9f356dd733d273173694db9b8c28594.tar.bz2
iced-545cc909c9f356dd733d273173694db9b8c28594.zip
Merge pull request #1882 from nicksenger/shadows
Quad shadows
Diffstat (limited to 'wgpu/src/layer.rs')
-rw-r--r--wgpu/src/layer.rs14
1 files changed, 8 insertions, 6 deletions
diff --git a/wgpu/src/layer.rs b/wgpu/src/layer.rs
index 4ad12a88..e213c95f 100644
--- a/wgpu/src/layer.rs
+++ b/wgpu/src/layer.rs
@@ -195,9 +195,8 @@ impl<'a> Layer<'a> {
Primitive::Quad {
bounds,
background,
- border_radius,
- border_width,
- border_color,
+ border,
+ shadow,
} => {
let layer = &mut layers[current_layer];
@@ -207,9 +206,12 @@ impl<'a> Layer<'a> {
bounds.y + translation.y,
],
size: [bounds.width, bounds.height],
- border_color: color::pack(*border_color),
- border_radius: *border_radius,
- border_width: *border_width,
+ border_color: color::pack(border.color),
+ border_radius: border.radius.into(),
+ border_width: border.width,
+ shadow_color: shadow.color.into_linear(),
+ shadow_offset: shadow.offset.into(),
+ shadow_blur_radius: shadow.blur_radius,
};
layer.quads.add(quad, background);