Added support for custom shader widget for iced_wgpu backend.

This commit is contained in:
Bingus 2023-09-14 13:58:36 -07:00 committed by Héctor Ramón Jiménez
parent 817f728687
commit 781ef1f94c
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
37 changed files with 2139 additions and 6 deletions

View file

@ -183,6 +183,17 @@ impl From<Rectangle<u32>> for Rectangle<f32> {
}
}
impl From<Rectangle<f32>> for Rectangle<u32> {
fn from(rectangle: Rectangle<f32>) -> Self {
Rectangle {
x: rectangle.x as u32,
y: rectangle.y as u32,
width: rectangle.width as u32,
height: rectangle.height as u32,
}
}
}
impl<T> std::ops::Add<Vector<T>> for Rectangle<T>
where
T: std::ops::Add<Output = T>,