Struct rusty_spine::Color
source · [−]Expand description
RGBA F32 color that is byte-compatible with the Spine runtime.
Fields
r: c_float
g: c_float
b: c_float
a: c_float
Implementations
sourceimpl Color
impl Color
pub fn new_rgba(r: f32, g: f32, b: f32, a: f32) -> Self
pub fn set_r(&mut self, r: c_float) -> &mut Self
pub fn set_g(&mut self, g: c_float) -> &mut Self
pub fn set_b(&mut self, b: c_float) -> &mut Self
pub fn set_a(&mut self, a: c_float) -> &mut Self
pub fn set_from_floats(
&mut self,
r: c_float,
g: c_float,
b: c_float,
a: c_float
) -> &mut Self
pub fn set_from_floats3(&mut self, r: c_float, g: c_float, b: c_float) -> &mut Self
pub fn set_from_color(&mut self, other: &Color) -> &mut Self
pub fn set_from_color3(&mut self, other: &Color) -> &mut Self
pub fn add_floats(
&mut self,
r: c_float,
g: c_float,
b: c_float,
a: c_float
) -> &mut Self
pub fn add_floats3(&mut self, r: c_float, g: c_float, b: c_float) -> &mut Self
pub fn add_color(&mut self, other: &Color) -> &mut Self
pub fn clamp(&mut self) -> &mut Self
pub fn premultiply_alpha(&mut self)
Trait Implementations
sourceimpl MulAssign<Color> for Color
impl MulAssign<Color> for Color
sourcefn mul_assign(&mut self, rhs: Color)
fn mul_assign(&mut self, rhs: Color)
Performs the
*=
operation. Read moreimpl Copy for Color
impl StructuralPartialEq for Color
Auto Trait Implementations
impl RefUnwindSafe for Color
impl Send for Color
impl Sync for Color
impl Unpin for Color
impl UnwindSafe for Color
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