From 85810a2e59400674a89094c9ee72f4465946b048 Mon Sep 17 00:00:00 2001 From: griffi-gh Date: Sat, 23 Mar 2024 15:10:32 +0100 Subject: [PATCH] impl from corners f32 for roundedcorners --- hui/src/draw/corner_radius.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hui/src/draw/corner_radius.rs b/hui/src/draw/corner_radius.rs index c28c314..32ac329 100644 --- a/hui/src/draw/corner_radius.rs +++ b/hui/src/draw/corner_radius.rs @@ -17,6 +17,12 @@ pub struct RoundedCorners { pub point_count: NonZeroU16, } +impl From> for RoundedCorners { + fn from(radius: Corners) -> Self { + Self::from_radius(radius) + } +} + impl RoundedCorners { pub fn from_radius(radius: Corners) -> Self { Self {