diff --git a/hui/src/rect/color.rs b/hui/src/rect/color.rs index acbe104..f19470e 100644 --- a/hui/src/rect/color.rs +++ b/hui/src/rect/color.rs @@ -153,6 +153,17 @@ impl From<[[f32; 4]; 4]> for FillColor { } } +impl From> for FillColor { + fn from(corners: Corners) -> Self { + Self(Corners { + top_left: corners.top_left.extend(1.), + top_right: corners.top_right.extend(1.), + bottom_left: corners.bottom_left.extend(1.), + bottom_right: corners.bottom_right.extend(1.), + }) + } +} + impl From<(Vec3, Vec3, Vec3, Vec3)> for FillColor { fn from((top_left, top_right, bottom_left, bottom_right): (Vec3, Vec3, Vec3, Vec3)) -> Self { Self(Corners {