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>
impl<T> FromIterator<T> for RGB<T>
sourceยงfn from_iter<I>(into_iter: I) -> RGB<T>where
I: IntoIterator<Item = T>,
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>
impl TargetPixel for RGB<u8>
ยงfn blend(&mut self, color: PremultipliedRgbaColor)
fn blend(&mut self, color: PremultipliedRgbaColor)
Blend a single pixel with a color
ยงfn from_rgb(r: u8, g: u8, b: u8) -> RGB<u8>
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)
fn blend_slice(slice: &mut [Self], color: PremultipliedRgbaColor)
Blend a color to all the pixel in the slice.
ยงfn background() -> Self
fn background() -> Self
Pixel which will be filled as the background in case the slint view has transparency