pub struct AspectRatioMode(/* private fields */);
Expand description
This enum type defines what happens to the aspect ratio when scaling an rectangle.
C++ enum: Qt::AspectRatioMode
.
This enum type defines what happens to the aspect ratio when scaling an rectangle.
See also QSize::scale() and QImage::scaled().
Implementations§
Source§impl AspectRatioMode
impl AspectRatioMode
Sourcepub const IgnoreAspectRatio: AspectRatioMode
pub const IgnoreAspectRatio: AspectRatioMode
The size is scaled freely. The aspect ratio is not preserved. (C++ enum variant: IgnoreAspectRatio = 0
)
Sourcepub const KeepAspectRatio: AspectRatioMode
pub const KeepAspectRatio: AspectRatioMode
The size is scaled to a rectangle as large as possible inside a given rectangle, preserving the aspect ratio. (C++ enum variant: KeepAspectRatio = 1
)
Sourcepub const KeepAspectRatioByExpanding: AspectRatioMode
pub const KeepAspectRatioByExpanding: AspectRatioMode
The size is scaled to a rectangle as small as possible outside a given rectangle, preserving the aspect ratio. (C++ enum variant: KeepAspectRatioByExpanding = 2
)
Trait Implementations§
Source§impl Clone for AspectRatioMode
impl Clone for AspectRatioMode
Source§fn clone(&self) -> AspectRatioMode
fn clone(&self) -> AspectRatioMode
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for AspectRatioMode
impl Debug for AspectRatioMode
Source§impl From<AspectRatioMode> for c_int
impl From<AspectRatioMode> for c_int
Source§fn from(value: AspectRatioMode) -> Self
fn from(value: AspectRatioMode) -> Self
Converts to this type from the input type.
Source§impl From<i32> for AspectRatioMode
impl From<i32> for AspectRatioMode
Source§impl PartialEq for AspectRatioMode
impl PartialEq for AspectRatioMode
impl Copy for AspectRatioMode
impl Eq for AspectRatioMode
impl StructuralPartialEq for AspectRatioMode
Auto Trait Implementations§
impl Freeze for AspectRatioMode
impl RefUnwindSafe for AspectRatioMode
impl Send for AspectRatioMode
impl Sync for AspectRatioMode
impl Unpin for AspectRatioMode
impl UnwindSafe for AspectRatioMode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more