lib8: Rgb8Blend is no longer used

This commit is contained in:
Victoria Fischer 2024-11-29 18:59:31 +01:00
parent 815d1417e0
commit 4000e1d0e7
2 changed files with 2 additions and 14 deletions

View File

@ -8,17 +8,6 @@ use rgb::Rgb;
use crate::lib8::interpolate::scale8;
pub trait Rgb8Blend {
fn saturating_add<T: Into<Self>>(self, b: T) -> Self where Self: Sized;
}
impl Rgb8Blend for Rgb<u8> {
fn saturating_add<T: Into<Self>>(self, b: T) -> Self where Self: Sized {
let rgb = b.into();
Rgb::new(self.r.saturating_add(rgb.r), self.g.saturating_add(rgb.g), self.b.saturating_add(rgb.b))
}
}
pub trait IntoRgb8 {
fn into_rgb8(self) -> Rgb<u8>;
}

View File

@ -2,7 +2,6 @@ use std::io;
use rgb::Rgb;
use crate::geometry::*;
use crate::lib8::Rgb8Blend;
use crate::lib8::interpolate::Fract8Ops;
use crate::power::AsMilliwatts;
use crate::task::Task;
@ -10,8 +9,8 @@ use crate::time::Periodically;
use running_average::RealTimeRunningAverage;
use std::fmt::Debug;
pub trait HardwarePixel: Send + Sync + Rgb8Blend + Copy + AsMilliwatts + Default + From<Rgb<u8>> + Fract8Ops {}
impl<T> HardwarePixel for T where T: Send + Sync + Rgb8Blend + Copy + AsMilliwatts + Default + From<Rgb<u8>> + Fract8Ops {}
pub trait HardwarePixel: Send + Sync + Copy + AsMilliwatts + Default + From<Rgb<u8>> + Fract8Ops {}
impl<T> HardwarePixel for T where T: Send + Sync + Copy + AsMilliwatts + Default + From<Rgb<u8>> + Fract8Ops {}
pub trait PixelView {
type Pixel: HardwarePixel;