Struct rainbow::LinRgba [−][src]
Implementations
impl LinRgba
[src]
pub fn zero() -> Self
[src]
pub fn one() -> Self
[src]
pub const fn from_f32(r: f32, g: f32, b: f32, a: f32) -> Self
[src]
pub fn from_unorm8(r: Unorm8, g: Unorm8, b: Unorm8, a: Unorm8) -> Self
[src]
pub fn from_u8(r: u8, g: u8, b: u8, a: u8) -> Self
[src]
pub const fn from_f32_array(color: [f32; 4]) -> Self
[src]
pub fn from_unorm8_array(color: [Unorm8; 4]) -> Self
[src]
pub fn from_u8_array(color: [u8; 4]) -> Self
[src]
pub const fn into_f32_array(self) -> [f32; 4]
[src]
pub fn into_unorm8_array(self) -> [Unorm8; 4]
[src]
pub fn into_u8_array(self) -> [u8; 4]
[src]
pub fn a(self, alpha: f32) -> Self
[src]
Change the alpha channel.
Note that alpha is always pre-multiplied, meaning the RGB channels will be multiplied by this new alpha value. Therefore, calling this more than once may be destructive.
pub fn to_srgb(self) -> SrgbRgba
[src]
Trait Implementations
impl Clone for LinRgba
[src]
impl Copy for LinRgba
[src]
impl Debug for LinRgba
[src]
impl From<[Unorm8; 4]> for LinRgba
[src]
impl From<[f32; 4]> for LinRgba
[src]
impl From<[u8; 4]> for LinRgba
[src]
impl Into<[Unorm8; 4]> for LinRgba
[src]
impl Into<[f32; 4]> for LinRgba
[src]
impl Into<[u8; 4]> for LinRgba
[src]
impl PartialEq<LinRgba> for LinRgba
[src]
impl PartialOrd<LinRgba> for LinRgba
[src]
fn partial_cmp(&self, other: &LinRgba) -> Option<Ordering>
[src]
fn lt(&self, other: &LinRgba) -> bool
[src]
fn le(&self, other: &LinRgba) -> bool
[src]
fn gt(&self, other: &LinRgba) -> bool
[src]
fn ge(&self, other: &LinRgba) -> bool
[src]
impl StructuralPartialEq for LinRgba
[src]
Auto Trait Implementations
impl RefUnwindSafe for LinRgba
[src]
impl Send for LinRgba
[src]
impl Sync for LinRgba
[src]
impl Unpin for LinRgba
[src]
impl UnwindSafe for LinRgba
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Max for T where
T: PartialOrd<T>,
T: PartialOrd<T>,
pub fn max(self, other: T) -> T
impl<T> Min for T where
T: PartialOrd<T>,
T: PartialOrd<T>,
pub fn min(self, other: T) -> T
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,