Enum speedy2d::image::ImageSmoothingMode [−][src]
pub enum ImageSmoothingMode { NearestNeighbor, Linear, }
Expand description
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
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.
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
Auto Trait Implementations
impl RefUnwindSafe for ImageSmoothingMode
impl Send for ImageSmoothingMode
impl Sync for ImageSmoothingMode
impl Unpin for ImageSmoothingMode
impl UnwindSafe for ImageSmoothingMode
Blanket Implementations
Mutably borrows from an owned value. Read more