Apply Transformation::scale_factor to Quad styling

This commit is contained in:
Héctor Ramón Jiménez 2025-08-17 09:11:19 +02:00
parent d3a0d0b512
commit ab04751bc4
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
2 changed files with 20 additions and 4 deletions

View file

@ -263,3 +263,16 @@ impl From<Radius> for [f32; 4] {
]
}
}
impl std::ops::Mul<f32> for Radius {
type Output = Self;
fn mul(self, scale: f32) -> Self::Output {
Self {
top_left: self.top_left * scale,
top_right: self.top_right * scale,
bottom_right: self.bottom_right * scale,
bottom_left: self.bottom_left * scale,
}
}
}