pub struct RGBA { /* private fields */ }
Implementations§
Source§impl RGBA
impl RGBA
pub fn new(r: f64, g: f64, b: f64, a: f64) -> Self
pub fn black() -> Self
pub fn white() -> Self
pub fn red() -> Self
pub fn green() -> Self
pub fn blue() -> Self
pub fn black_alpha(alpha: f64) -> Self
pub fn white_alpha(alpha: f64) -> Self
pub fn red_alpha(alpha: f64) -> Self
pub fn green_alpha(alpha: f64) -> Self
pub fn blue_alpha(alpha: f64) -> Self
pub fn r(self) -> f64
pub fn g(self) -> f64
pub fn b(self) -> f64
pub fn a(self) -> f64
Source§impl RGBA
impl RGBA
pub fn sum(self) -> f64
pub fn gray(self) -> f64
pub fn luma1(self) -> f64
pub fn luma2(self) -> f64
pub fn min_element(self) -> f64
pub fn max_element(self) -> f64
pub fn is_finite(self) -> bool
pub fn is_nan(self) -> bool
pub fn is_infinite(self) -> bool
pub fn clamp(self, min: Self, max: Self) -> Self
pub fn min(self, rhs: Self) -> Self
pub fn max(self, rhs: Self) -> Self
pub fn abs(self) -> Self
pub fn round(self) -> Self
pub fn floor(self) -> Self
pub fn ceil(self) -> Self
pub fn trunc(self) -> Self
pub fn fract(self) -> Self
pub fn sqrt(self) -> Self
pub fn exp(self) -> Self
pub fn exp2(self) -> Self
pub fn ln(self) -> Self
pub fn log(self, base: f64) -> Self
pub fn log2(self) -> Self
pub fn log10(self) -> Self
pub fn cbrt(self) -> Self
pub fn powf(self, n: f64) -> Self
pub fn sin(self) -> Self
pub fn cos(self) -> Self
pub fn tan(self) -> Self
pub fn sin_cos(self) -> (Self, Self)
pub fn recip(self) -> Self
pub fn saturate(self) -> Self
pub fn lerp(self, rhs: Self, s: f64) -> Self
pub fn gamma_correct(self) -> Self
Trait Implementations§
Source§impl AddAssign<f64> for RGBA
impl AddAssign<f64> for RGBA
Source§fn add_assign(&mut self, rhs: f64)
fn add_assign(&mut self, rhs: f64)
Performs the
+=
operation. Read moreSource§impl AddAssign for RGBA
impl AddAssign for RGBA
Source§fn add_assign(&mut self, rhs: RGBA)
fn add_assign(&mut self, rhs: RGBA)
Performs the
+=
operation. Read moreSource§impl DivAssign<f64> for RGBA
impl DivAssign<f64> for RGBA
Source§fn div_assign(&mut self, rhs: f64)
fn div_assign(&mut self, rhs: f64)
Performs the
/=
operation. Read moreSource§impl DivAssign for RGBA
impl DivAssign for RGBA
Source§fn div_assign(&mut self, rhs: RGBA)
fn div_assign(&mut self, rhs: RGBA)
Performs the
/=
operation. Read moreSource§impl MulAssign<f64> for RGBA
impl MulAssign<f64> for RGBA
Source§fn mul_assign(&mut self, rhs: f64)
fn mul_assign(&mut self, rhs: f64)
Performs the
*=
operation. Read moreSource§impl MulAssign for RGBA
impl MulAssign for RGBA
Source§fn mul_assign(&mut self, rhs: RGBA)
fn mul_assign(&mut self, rhs: RGBA)
Performs the
*=
operation. Read moreSource§impl SubAssign<f64> for RGBA
impl SubAssign<f64> for RGBA
Source§fn sub_assign(&mut self, rhs: f64)
fn sub_assign(&mut self, rhs: f64)
Performs the
-=
operation. Read moreSource§impl SubAssign for RGBA
impl SubAssign for RGBA
Source§fn sub_assign(&mut self, rhs: RGBA)
fn sub_assign(&mut self, rhs: RGBA)
Performs the
-=
operation. Read moreimpl Copy for RGBA
impl StructuralPartialEq for RGBA
Auto Trait Implementations§
impl Freeze for RGBA
impl RefUnwindSafe for RGBA
impl Send for RGBA
impl Sync for RGBA
impl Unpin for RGBA
impl UnwindSafe for RGBA
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