1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 05:10:03 -04:00

A simple 2D plot library

This commit is contained in:
Emil Ernerfeldt
2021-02-14 21:39:04 +01:00
parent 7dad76b913
commit a19140ec67
14 changed files with 1039 additions and 11 deletions

View File

@@ -26,6 +26,11 @@ impl RectTransform {
&self.to
}
/// The scale factors.
pub fn scale(&self) -> Vec2 {
self.to.size() / self.from.size()
}
pub fn inverse(&self) -> RectTransform {
Self::from_to(self.to, self.from)
}