diff options
author | 2022-12-02 21:10:44 +0100 | |
---|---|---|
committer | 2022-12-02 21:10:44 +0100 | |
commit | 91d5516474dcb9494987f264783ad1400781b025 (patch) | |
tree | 11376e29c3c1358f7576e502366a990db9fb1c08 /graphics | |
parent | da244ff8048e0b339c1502372894a2460a637241 (diff) | |
parent | 60e41666d0e203d9777de981121c39f569bc3a7b (diff) | |
download | iced-91d5516474dcb9494987f264783ad1400781b025.tar.gz iced-91d5516474dcb9494987f264783ad1400781b025.tar.bz2 iced-91d5516474dcb9494987f264783ad1400781b025.zip |
Merge pull request #1506 from rksm/non-uniform-border-radius-for-quads
non uniform border radius for quads
Diffstat (limited to '')
-rw-r--r-- | graphics/src/layer/quad.rs | 2 | ||||
-rw-r--r-- | graphics/src/primitive.rs | 2 | ||||
-rw-r--r-- | graphics/src/renderer.rs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/graphics/src/layer/quad.rs b/graphics/src/layer/quad.rs index 4def8427..0d8bde9d 100644 --- a/graphics/src/layer/quad.rs +++ b/graphics/src/layer/quad.rs @@ -17,7 +17,7 @@ pub struct Quad { pub border_color: [f32; 4], /// The border radius of the [`Quad`]. - pub border_radius: f32, + pub border_radius: [f32; 4], /// The border width of the [`Quad`]. pub border_width: f32, diff --git a/graphics/src/primitive.rs b/graphics/src/primitive.rs index 9759d97a..6f1b6f26 100644 --- a/graphics/src/primitive.rs +++ b/graphics/src/primitive.rs @@ -42,7 +42,7 @@ pub enum Primitive { /// The background of the quad background: Background, /// The border radius of the quad - border_radius: f32, + border_radius: [f32; 4], /// The border width of the quad border_width: f32, /// The border color of the quad diff --git a/graphics/src/renderer.rs b/graphics/src/renderer.rs index 036b398c..65350037 100644 --- a/graphics/src/renderer.rs +++ b/graphics/src/renderer.rs @@ -109,7 +109,7 @@ where self.primitives.push(Primitive::Quad { bounds: quad.bounds, background: background.into(), - border_radius: quad.border_radius, + border_radius: quad.border_radius.into(), border_width: quad.border_width, border_color: quad.border_color, }); |