Enum vulkano::swapchain::PresentScaling
source · #[non_exhaustive]#[repr(u32)]pub enum PresentScaling {
OneToOne = 1,
AspectRatioStretch = 2,
Stretch = 4,
}
Expand description
The way a swapchain image is scaled, if it does not exactly fit the surface.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
OneToOne = 1
No scaling is performed; one swapchain image pixel maps to one surface pixel.
AspectRatioStretch = 2
Both axes of the image are scaled equally, without changing the aspect ratio of the image, to the largest size in which both axes fit inside the surface.
Stretch = 4
Each axis of the image is scaled independently to fit the surface, which may change the aspect ratio of the image.
Trait Implementations§
source§impl Clone for PresentScaling
impl Clone for PresentScaling
source§fn clone(&self) -> PresentScaling
fn clone(&self) -> PresentScaling
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 PresentScaling
impl Debug for PresentScaling
source§impl From<PresentScaling> for PresentScalingFlags
impl From<PresentScaling> for PresentScalingFlags
source§fn from(val: PresentScaling) -> Self
fn from(val: PresentScaling) -> Self
Converts to this type from the input type.
source§impl From<PresentScaling> for PresentScalingFlagsEXT
impl From<PresentScaling> for PresentScalingFlagsEXT
source§fn from(val: PresentScaling) -> Self
fn from(val: PresentScaling) -> Self
Converts to this type from the input type.
source§impl FromIterator<PresentScaling> for PresentScalingFlags
impl FromIterator<PresentScaling> for PresentScalingFlags
source§fn from_iter<T>(iter: T) -> Selfwhere
T: IntoIterator<Item = PresentScaling>,
fn from_iter<T>(iter: T) -> Selfwhere T: IntoIterator<Item = PresentScaling>,
Creates a value from an iterator. Read more
source§impl Hash for PresentScaling
impl Hash for PresentScaling
source§impl PartialEq for PresentScaling
impl PartialEq for PresentScaling
source§fn eq(&self, other: &PresentScaling) -> bool
fn eq(&self, other: &PresentScaling) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for PresentScaling
impl Eq for PresentScaling
impl StructuralEq for PresentScaling
impl StructuralPartialEq for PresentScaling
Auto Trait Implementations§
impl RefUnwindSafe for PresentScaling
impl Send for PresentScaling
impl Sync for PresentScaling
impl Unpin for PresentScaling
impl UnwindSafe for PresentScaling
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