pub struct AlphaColor { /* private fields */ }Expand description
An RGB color with an alpha channel.
Implementations§
Source§impl AlphaColor
impl AlphaColor
Sourcepub const TRANSPARENT: Self
pub const TRANSPARENT: Self
A transparent color.
Sourcepub fn premultiplied(&self) -> [f32; 4]
pub fn premultiplied(&self) -> [f32; 4]
Return the color as premulitplied RGBF32.
Sourcepub const fn from_rgba8(r: u8, g: u8, b: u8, a: u8) -> Self
pub const fn from_rgba8(r: u8, g: u8, b: u8, a: u8) -> Self
Create a new color from RGBA8 values.
Sourcepub fn components(&self) -> [f32; 4]
pub fn components(&self) -> [f32; 4]
Return the components of the color as RGBF32.
Trait Implementations§
Source§impl Clone for AlphaColor
impl Clone for AlphaColor
Source§fn clone(&self) -> AlphaColor
fn clone(&self) -> AlphaColor
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AlphaColor
impl Debug for AlphaColor
impl Copy for AlphaColor
Auto Trait Implementations§
impl Freeze for AlphaColor
impl RefUnwindSafe for AlphaColor
impl Send for AlphaColor
impl Sync for AlphaColor
impl Unpin for AlphaColor
impl UnwindSafe for AlphaColor
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