misc code cleanup

This commit is contained in:
Emil Ernerfeldt
2022-07-29 16:07:26 +02:00
parent b0fa0c65cc
commit 4e8a6e3370
6 changed files with 28 additions and 12 deletions
+10
View File
@@ -99,6 +99,16 @@ impl RetainedImage {
self.size
}
/// The width of the image.
pub fn width(&self) -> usize {
self.size[0]
}
/// The height of the image.
pub fn height(&self) -> usize {
self.size[1]
}
/// The size of the image data (number of pixels wide/high).
pub fn size_vec2(&self) -> egui::Vec2 {
let [w, h] = self.size();