WIP: preserve aspect ratio of images
This commit is contained in:
parent
600b564bbf
commit
3ac545088a
4 changed files with 87 additions and 58 deletions
|
@ -905,6 +905,12 @@ impl From<Pixels> for usize {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<usize> for Pixels {
|
||||
fn from(pixels: usize) -> Self {
|
||||
Pixels(pixels as f32)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(
|
||||
Add, AddAssign, Clone, Copy, Default, Div, Eq, Hash, Ord, PartialEq, PartialOrd, Sub, SubAssign,
|
||||
)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue