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