Merge pull request #2070 from ripytide/master
Added a Frame::scale_nonuniform method
This commit is contained in:
commit
b5e7fb240c
5 changed files with 36 additions and 12 deletions
|
|
@ -168,12 +168,18 @@ impl Frame {
|
|||
delegate!(self, frame, frame.rotate(angle));
|
||||
}
|
||||
|
||||
/// Applies a scaling to the current transform of the [`Frame`].
|
||||
/// Applies a uniform scaling to the current transform of the [`Frame`].
|
||||
#[inline]
|
||||
pub fn scale(&mut self, scale: f32) {
|
||||
pub fn scale(&mut self, scale: impl Into<f32>) {
|
||||
delegate!(self, frame, frame.scale(scale));
|
||||
}
|
||||
|
||||
/// Applies a non-uniform scaling to the current transform of the [`Frame`].
|
||||
#[inline]
|
||||
pub fn scale_nonuniform(&mut self, scale: impl Into<Vector>) {
|
||||
delegate!(self, frame, frame.scale_nonuniform(scale));
|
||||
}
|
||||
|
||||
pub fn into_geometry(self) -> Geometry {
|
||||
match self {
|
||||
Self::TinySkia(frame) => Geometry::TinySkia(frame.into_primitive()),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue