Enum speedy2d::image::ImageSmoothingMode[][src]

pub enum ImageSmoothingMode {
    NearestNeighbor,
    Linear,
}

ImageSmoothingMode defines how images are rendered when the pixels of the source image don’t align perfectly with the pixels of the screen. This could be because the image is a different size, or because it is rendered at a position which is a non-integer number of pixels.

Variants

NearestNeighbor

The pixel drawn on the screen will be the closest pixel from the source image. This may cause aliasing/jagginess, so for a smoother result the Linear mode may be more suitable.

Linear

The pixel drawn on the screen will be the weighted average of the four nearest pixels in the source image. This produces a smoother result than NearestNeighbor, but in cases where the image is intended to be pixel-aligned it may cause unnecessary blurriness.

Trait Implementations

impl Clone for ImageSmoothingMode[src]

impl Debug for ImageSmoothingMode[src]

impl Eq for ImageSmoothingMode[src]

impl Hash for ImageSmoothingMode[src]

impl PartialEq<ImageSmoothingMode> for ImageSmoothingMode[src]

impl StructuralEq for ImageSmoothingMode[src]

impl StructuralPartialEq for ImageSmoothingMode[src]

Auto Trait Implementations

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<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.