diff options
author | 2022-11-03 00:35:01 +0100 | |
---|---|---|
committer | 2022-11-03 22:48:26 +0100 | |
commit | c0596179bd8582e4f4b5289cdeee8de4fa3de464 (patch) | |
tree | b1ed80cf49aa846ba7a93cc97128c3ec6eadd123 /graphics | |
parent | d222b5c8b0befab665c20ba0112b28199df0ae44 (diff) | |
download | iced-c0596179bd8582e4f4b5289cdeee8de4fa3de464.tar.gz iced-c0596179bd8582e4f4b5289cdeee8de4fa3de464.tar.bz2 iced-c0596179bd8582e4f4b5289cdeee8de4fa3de464.zip |
non uniform border radius for quads
Diffstat (limited to 'graphics')
-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 b481ac0b..84f04624 100644 --- a/graphics/src/primitive.rs +++ b/graphics/src/primitive.rs @@ -41,7 +41,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 cdbc4f40..46d37cd6 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.to_array(), border_width: quad.border_width, border_color: quad.border_color, }); |