pub struct ColorTransform {
pub r_multiply: Fixed8,
pub g_multiply: Fixed8,
pub b_multiply: Fixed8,
pub a_multiply: Fixed8,
pub r_add: i16,
pub g_add: i16,
pub b_add: i16,
pub a_add: i16,
}Fields§
§r_multiply: Fixed8§g_multiply: Fixed8§b_multiply: Fixed8§a_multiply: Fixed8§r_add: i16§g_add: i16§b_add: i16§a_add: i16Implementations§
Source§impl ColorTransform
impl ColorTransform
pub const IDENTITY: Self
pub fn multiply_from(color: Color) -> Self
Sourcepub fn mult_rgba_normalized(&self) -> [f32; 4]
pub fn mult_rgba_normalized(&self) -> [f32; 4]
Returns the multiplicative component of this color transform in RGBA order with the values normalized [0.0, 1.0].
Sourcepub fn add_rgba_normalized(&self) -> [f32; 4]
pub fn add_rgba_normalized(&self) -> [f32; 4]
Returns the additive component of this color transform in RGBA order with the values normalized [-1.0, 1.0].
Sourcepub fn set_mult_color(&mut self, color: &Color)
pub fn set_mult_color(&mut self, color: &Color)
Sets the multiplicate component of this color transform.
Trait Implementations§
Source§impl Clone for ColorTransform
impl Clone for ColorTransform
Source§fn clone(&self) -> ColorTransform
fn clone(&self) -> ColorTransform
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ColorTransform
impl Debug for ColorTransform
Source§impl Default for ColorTransform
impl Default for ColorTransform
Source§impl Mul<Color> for &ColorTransform
impl Mul<Color> for &ColorTransform
Source§impl Mul for ColorTransform
impl Mul for ColorTransform
Source§impl MulAssign for ColorTransform
impl MulAssign for ColorTransform
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*= operation. Read moreSource§impl PartialEq for ColorTransform
impl PartialEq for ColorTransform
impl Copy for ColorTransform
impl Eq for ColorTransform
impl StructuralPartialEq for ColorTransform
Auto Trait Implementations§
impl Freeze for ColorTransform
impl RefUnwindSafe for ColorTransform
impl Send for ColorTransform
impl Sync for ColorTransform
impl Unpin for ColorTransform
impl UnwindSafe for ColorTransform
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