[agx] Conversion methods for RectU32
@@ -651,6 +651,15 @@ impl Display for Rect {
}
}
+impl From<RectU32> for Rect {
+ fn from(rect: RectU32) -> Self {
+ Self {
+ origin: Point::from(rect.origin),
+ size: Size::from(&rect.size),
+ }
+ }
+}
+
#[derive(PartialEq)]
struct TileSegment<'a> {
viewport_frame: Rect,
@@ -1043,6 +1052,10 @@ impl RectU32 {
size: SizeU32::from(rect.size),
}
}
+
+ pub fn zero() -> Self {
+ Self::from(Rect::zero())
+ }
}
/*
