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) {
|
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) {
|
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`].
|
/// Applies a uniform scaling to the current transform of the [`Frame`].
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn scale(&mut self, scale: f32) {
|
pub fn scale(&mut self, scale: f32) {
|
||||||
self.transforms.current.raw =
|
self.scale_nonuniform(Vector { x: scale, y: scale });
|
||||||
self.transforms.current.raw.pre_scale(scale, scale);
|
|
||||||
self.transforms.current.is_identity = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Applies a non-uniform scaling to the current transform of the [`Frame`].
|
/// Applies a non-uniform scaling to the current transform of the [`Frame`].
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue