pub enum WrapMode {
Tile,
Mirror,
Clamp,
Border,
MirrorClamp,
}
Expand description
Specifies how image coordinates outside the range [0, 1]
are handled.
Variants
Tile
Tile the image, that is, sample the coordinate modulo 1.0
, so
addressing the image beyond an edge will “wrap” back from the
other edge.
Mirror
Mirror the image. Like tile, but uses abs(coord) before the modulo.
Clamp
Clamp the image to the value at 0.0
or 1.0
respectively.
Border
Use border color.
MirrorClamp
Mirror once and clamp to edge otherwise.
Only valid if Features::SAMPLER_MIRROR_CLAMP_EDGE
is enabled.
Trait Implementations
sourceimpl Ord for WrapMode
impl Ord for WrapMode
sourceimpl PartialOrd<WrapMode> for WrapMode
impl PartialOrd<WrapMode> for WrapMode
sourcefn partial_cmp(&self, other: &WrapMode) -> Option<Ordering>
fn partial_cmp(&self, other: &WrapMode) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for WrapMode
impl Eq for WrapMode
impl StructuralEq for WrapMode
impl StructuralPartialEq for WrapMode
Auto Trait Implementations
impl RefUnwindSafe for WrapMode
impl Send for WrapMode
impl Sync for WrapMode
impl Unpin for WrapMode
impl UnwindSafe for WrapMode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub 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.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more