pub trait TargetPixel: Sized + Copy {
// Required methods
fn blend(&mut self, color: PremultipliedRgbaColor);
fn from_rgb(red: u8, green: u8, blue: u8) -> Self;
// Provided methods
fn blend_slice(slice: &mut [Self], color: PremultipliedRgbaColor) { ... }
fn background() -> Self { ... }
}Available on crate feature
renderer-software only.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.
Sourcefn background() -> Self
fn background() -> Self
Pixel which will be filled as the background in case the slint view has transparency
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".