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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user