pub struct Light {
pub grey: u16,
pub tint: [u16; 3],
}Expand description
One light: how a picture’s colours change in it. Each pixel goes
grey of the way to its own grey, then its red, green and blue are
multiplied by tint. The numbers are thousandths (0 to 1000), so a
light is a plain value a frame item can carry and compare.
Fields§
§grey: u16How far a colour goes to its own grey: 0 = not at all, 1000 = grey.
tint: [u16; 3]What red, green and blue are multiplied by: 1000 = left as they are.
Implementations§
Trait Implementations§
impl Copy for Light
Source§impl<'de> Deserialize<'de> for Light
impl<'de> Deserialize<'de> for Light
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Light
Source§impl Ord for Light
impl Ord for Light
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Light
impl PartialOrd for Light
impl StructuralPartialEq for Light
Auto Trait Implementations§
impl Freeze for Light
impl RefUnwindSafe for Light
impl Send for Light
impl Sync for Light
impl Unpin for Light
impl UnsafeUnpin for Light
impl UnwindSafe for Light
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