[][src]Enum web_glitz::image::sampler::Wrap

pub enum Wrap {
    ClampToEdge,
    Repeat,
    MirroredRepeat,
}

Enumerates the methods available to a Sampler for texture coordinate wrapping.

Texture coordinate wrapping concerns texture coordinate values outside of the range 0.0..=1.0. The extremes of this range correspond to the edges of the texture. A texture coordinate value outside of this range therefore has to be mapped to a coordinate value on this range.

Separate wrapping methods can be used for each texture space coordinate component (typically referred to as the S, T, R coordinates or "width", "height", "depth" respectively), see SamplerDescriptor and ShadowSamplerDescriptor.

Variants

ClampToEdge

If the coordinate value is smaller than 0.0, then 0.0 is used as the coordinate value; if the coordinate value is greater than 1.0, then 1.0 is used as the coordinate value.

For example, -3.15 maps to 0.0 and 2.85 maps to 1.0.

Repeat

The integer part of the coordinate value is ignored.

For example, 3.15 maps to 0.15.

MirroredRepeat

Similar to [Repeat], however, if the integer part is odd, then the decimal part is subtracted from 1.

For example, 2.15 maps to 0.15 and 3.15 maps to 0.85.

Trait Implementations

impl Clone for Wrap[src]

impl Copy for Wrap[src]

impl Debug for Wrap[src]

impl PartialEq<Wrap> for Wrap[src]

impl StructuralPartialEq for Wrap[src]

Auto Trait Implementations

impl RefUnwindSafe for Wrap

impl Send for Wrap

impl Sync for Wrap

impl Unpin for Wrap

impl UnwindSafe for Wrap

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<D, T> IntoBuffer<T> for D where
    D: Borrow<T> + 'static,
    T: Copy + 'static, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.