#[repr(i32)]
pub enum Filter {
Nearest,
Linear,
Cubic,
}
Expand description
Describes how the color of each pixel should be determined.
Variants
Nearest
The pixel whose center is nearest to the requested coordinates is taken from the source and its value is returned as-is.
Linear
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
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
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more