#[non_exhaustive]#[repr(i32)]pub enum Filter {
Nearest = 0,
Linear = 1,
Cubic = 1_000_015_000,
}
Expand description
Describes how the color of each pixel should be determined.
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.
Nearest = 0
The pixel whose center is nearest to the requested coordinates is taken from the source and its value is returned as-is.
Linear = 1
The 8/4/2 pixels (depending on view dimensionality) whose center surround the requested
coordinates are taken, then their values are combined according to the chosen
reduction_mode
.
Cubic = 1_000_015_000
The 64/16/4 pixels (depending on the view dimensionality) whose center surround the
requested coordinates are taken, then their values are combined according to the chosen
reduction_mode
.
The ext_filter_cubic
extension must
be enabled on the device, and anisotropy must be disabled. Sampled image views must have
a type of Dim2d
.
Trait Implementations§
source§impl PartialEq for Filter
impl PartialEq for Filter
impl Copy for Filter
impl Eq for Filter
impl StructuralEq for Filter
impl StructuralPartialEq for Filter
Auto Trait Implementations§
impl RefUnwindSafe for Filter
impl Send for Filter
impl Sync for Filter
impl Unpin for Filter
impl UnwindSafe for Filter
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