pub struct GammaLut {
tables: [[u8; 256]; 8],
}Fields§
§tables: [[u8; 256]; 8]Implementations§
Source§impl GammaLut
impl GammaLut
fn generate_tables( &mut self, contrast: f32, paint_gamma: f32, device_gamma: f32, )
pub fn table_count(&self) -> usize
pub fn get_table(&self, color: u8) -> &[u8; 256]
pub fn new(contrast: f32, paint_gamma: f32, device_gamma: f32) -> GammaLut
pub fn preblend(&self, pixels: &mut [u8], color: ColorU)
pub fn preblend_scaled(&self, pixels: &mut [u8], color: ColorU, percent: u8)
pub fn preblend_grayscale(&self, pixels: &mut [u8], color: ColorU)
Auto Trait Implementations§
impl Freeze for GammaLut
impl RefUnwindSafe for GammaLut
impl Send for GammaLut
impl Sync for GammaLut
impl Unpin for GammaLut
impl UnsafeUnpin for GammaLut
impl UnwindSafe for GammaLut
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more