impl from corners f32 for roundedcorners

This commit is contained in:
griffi-gh 2024-03-23 15:10:32 +01:00
parent 897a574931
commit 4ce36cc7a9

View file

@ -17,6 +17,12 @@ pub struct RoundedCorners {
pub point_count: NonZeroU16, pub point_count: NonZeroU16,
} }
impl From<Corners<f32>> for RoundedCorners {
fn from(radius: Corners<f32>) -> Self {
Self::from_radius(radius)
}
}
impl RoundedCorners { impl RoundedCorners {
pub fn from_radius(radius: Corners<f32>) -> Self { pub fn from_radius(radius: Corners<f32>) -> Self {
Self { Self {