Type Alias slint::Rgb8Pixel

pub type Rgb8Pixel = RGB<u8>;
Expand description

Convenience alias for a pixel with three color channels (red, green and blue), each encoded as u8.

Aliased Type§

struct Rgb8Pixel {
    pub r: u8,
    pub g: u8,
    pub b: u8,
}

Fields§

§r: u8

Red

§g: u8

Green

§b: u8

Blue

Trait Implementations§

source§

impl<T> FromIterator<T> for RGB<T>

source§

fn from_iter<I>(into_iter: I) -> RGB<T>where I: IntoIterator<Item = T>,

Takes exactly 3 elements from the iterator and creates a new instance. Panics if there are fewer elements in the iterator.

§

impl TargetPixel for RGB<u8>

§

fn blend(&mut self, color: PremultipliedRgbaColor)

Blend a single pixel with a color
§

fn from_rgb(r: u8, g: u8, b: u8) -> RGB<u8>

Create a pixel from the red, gree, blue component in the range 0..=255
§

fn blend_slice(slice: &mut [Self], color: PremultipliedRgbaColor)

Blend a color to all the pixel in the slice.
§

fn background() -> Self

Pixel which will be filled as the background in case the slint view has transparency