scale.x/scale.y ratio. If 1.0, it means the scale factor is the same in both axes.
(&self)
| 584 | /// |
| 585 | /// If 1.0, it means the scale factor is the same in both axes. |
| 586 | fn aspect(&self) -> f64 { |
| 587 | let rw = self.frame.width() as f64; |
| 588 | let rh = self.frame.height() as f64; |
| 589 | (self.bounds.width() / rw) / (self.bounds.height() / rh) |
| 590 | } |
| 591 | |
| 592 | /// Sets the aspect ratio by expanding the x- or y-axis. |
| 593 | /// |
no test coverage detected