Struct qt_core::AspectRatioMode
source · 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
source§fn eq(&self, other: &AspectRatioMode) -> bool
fn eq(&self, other: &AspectRatioMode) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for AspectRatioMode
impl Eq for AspectRatioMode
impl StructuralEq for AspectRatioMode
impl StructuralPartialEq for AspectRatioMode
Auto Trait Implementations§
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