Struct rusty_spine::Color
source · #[repr(C)]pub struct Color {
pub r: c_float,
pub g: c_float,
pub b: c_float,
pub a: c_float,
}
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§
source§impl Color
impl Color
pub const 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)
pub fn linear_to_nonlinear(&self) -> Color
pub fn nonlinear_to_linear(&self) -> Color
Trait Implementations§
source§impl MulAssign<f32> for Color
impl MulAssign<f32> for Color
source§fn mul_assign(&mut self, rhs: f32)
fn mul_assign(&mut self, rhs: f32)
Performs the
*=
operation. Read moresource§impl MulAssign for Color
impl MulAssign for Color
source§fn mul_assign(&mut self, rhs: Color)
fn mul_assign(&mut self, rhs: Color)
Performs the
*=
operation. Read moresource§impl PartialEq for Color
impl PartialEq for Color
impl Copy for Color
impl StructuralPartialEq for Color
Auto Trait Implementations§
impl Freeze for Color
impl RefUnwindSafe for Color
impl Send for Color
impl Sync for Color
impl Unpin for Color
impl UnwindSafe for Color
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