Skip to main content

ImageSamplingExt

Trait ImageSamplingExt 

Source
pub trait ImageSamplingExt {
    // Required methods
    fn sampling_hint(self, hint: ImageSamplingHint) -> Self;
    fn nearest(self) -> Self;
    fn linear(self) -> Self;
}
Expand description

Ecosystem-only helpers for setting image sampling hints.

This keeps fret-ui as a mechanism layer while allowing policy layers to opt in to nearest-neighbor sampling for pixel-art / canvas-style content.

Required Methods§

Source

fn sampling_hint(self, hint: ImageSamplingHint) -> Self

Source

fn nearest(self) -> Self

Source

fn linear(self) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ImageSamplingExt for ImageProps

Source§

fn sampling_hint(self, hint: ImageSamplingHint) -> Self

Source§

fn nearest(self) -> Self

Source§

fn linear(self) -> Self

Implementors§