Struct ggez::graphics::LinearColor
source · [−]Expand description
A RGBA color in the linear color space, suitable for shoving into a shader.
Fields
r: f32
Red component
g: f32
Green component
b: f32
Blue component
a: f32
Alpha component
Trait Implementations
sourceimpl Clone for LinearColor
impl Clone for LinearColor
sourcefn clone(&self) -> LinearColor
fn clone(&self) -> LinearColor
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for LinearColor
impl Debug for LinearColor
sourceimpl<'de> Deserialize<'de> for LinearColor
impl<'de> Deserialize<'de> for LinearColor
sourcefn 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
sourceimpl From<Color> for LinearColor
impl From<Color> for LinearColor
sourcefn from(c: Color) -> Self
fn from(c: Color) -> Self
Convert an (sRGB) Color into a linear color, per https://en.wikipedia.org/wiki/Srgb#The_reverse_transformation
sourceimpl From<LinearColor> for [f32; 4]
impl From<LinearColor> for [f32; 4]
sourcefn from(color: LinearColor) -> Self
fn from(color: LinearColor) -> Self
Converts to this type from the input type.
sourceimpl From<LinearColor> for Color
impl From<LinearColor> for Color
sourcefn from(c: LinearColor) -> Self
fn from(c: LinearColor) -> Self
Converts to this type from the input type.
sourceimpl From<LinearColor> for Color
impl From<LinearColor> for Color
sourcefn from(color: LinearColor) -> Self
fn from(color: LinearColor) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<LinearColor> for LinearColor
impl PartialEq<LinearColor> for LinearColor
sourcefn eq(&self, other: &LinearColor) -> bool
fn eq(&self, other: &LinearColor) -> bool
sourceimpl Serialize for LinearColor
impl Serialize for LinearColor
impl Copy for LinearColor
impl StructuralPartialEq for LinearColor
Auto Trait Implementations
impl RefUnwindSafe for LinearColor
impl Send for LinearColor
impl Sync for LinearColor
impl Unpin for LinearColor
impl UnwindSafe for LinearColor
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> HasMut<T> for T
impl<T> HasMut<T> for T
sourcefn retrieve_mut(&mut self) -> &mut T
fn retrieve_mut(&mut self) -> &mut T
Method to retrieve the context type as mutable.