Implement scale in terms of scale_nonuniform
This commit is contained in:
parent
5371fae21a
commit
1f263051b6
2 changed files with 2 additions and 4 deletions
|
|
@ -155,7 +155,7 @@ impl Frame {
|
|||
}
|
||||
|
||||
pub fn scale(&mut self, scale: f32) {
|
||||
self.transform = self.transform.pre_scale(scale, scale);
|
||||
self.scale_nonuniform(Vector { x: scale, y: scale });
|
||||
}
|
||||
|
||||
pub fn scale_nonuniform(&mut self, scale: Vector) {
|
||||
|
|
|
|||
|
|
@ -447,9 +447,7 @@ impl Frame {
|
|||
/// Applies a uniform scaling to the current transform of the [`Frame`].
|
||||
#[inline]
|
||||
pub fn scale(&mut self, scale: f32) {
|
||||
self.transforms.current.raw =
|
||||
self.transforms.current.raw.pre_scale(scale, scale);
|
||||
self.transforms.current.is_identity = false;
|
||||
self.scale_nonuniform(Vector { x: scale, y: scale });
|
||||
}
|
||||
|
||||
/// Applies a non-uniform scaling to the current transform of the [`Frame`].
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue