Wire up per corner radii for quad

Still need to expose this in the styling layer and allow images
to have per corner radii.
This commit is contained in:
Nathan Sobo 2023-08-12 10:40:23 -06:00
parent 1911f537b4
commit 84dc4090bd
13 changed files with 205 additions and 36 deletions

View file

@ -65,7 +65,26 @@ pub struct Quad {
pub bounds: RectF,
pub background: Option<Color>,
pub border: Border,
pub corner_radius: f32,
pub corner_radii: CornerRadii,
}
#[derive(Default, Debug)]
pub struct CornerRadii {
pub top_left: f32,
pub top_right: f32,
pub bottom_right: f32,
pub bottom_left: f32,
}
impl From<f32> for CornerRadii {
fn from(radius: f32) -> Self {
Self {
top_left: radius,
top_right: radius,
bottom_right: radius,
bottom_left: radius,
}
}
}
#[derive(Debug)]