Trait i_slint_core::software_renderer::TargetPixel
source · pub trait TargetPixel: Sized + Copy {
// Required methods
fn blend(&mut self, color: PremultipliedRgbaColor);
fn from_rgb(red: u8, green: u8, blue: u8) -> Self;
// Provided method
fn blend_slice(slice: &mut [Self], color: PremultipliedRgbaColor) { ... }
}Expand description
Trait for the pixels in the buffer
Required Methods§
sourcefn blend(&mut self, color: PremultipliedRgbaColor)
fn blend(&mut self, color: PremultipliedRgbaColor)
Blend a single pixel with a color
Provided Methods§
sourcefn 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.