#[repr(C)]pub struct Rgba(_);
Expand description
0-1 linear space RGBA
color with premultiplied alpha.
Implementations
sourceimpl Rgba
impl Rgba
pub const TRANSPARENT: Rgba = _
pub const BLACK: Rgba = _
pub const WHITE: Rgba = _
pub const RED: Rgba = _
pub const GREEN: Rgba = _
pub const BLUE: Rgba = _
pub const fn from_rgba_premultiplied(r: f32, g: f32, b: f32, a: f32) -> Self
pub fn from_rgba_unmultiplied(r: f32, g: f32, b: f32, a: f32) -> Self
pub fn from_srgba_premultiplied(r: u8, g: u8, b: u8, a: u8) -> Self
pub fn from_srgba_unmultiplied(r: u8, g: u8, b: u8, a: u8) -> Self
pub const fn from_rgb(r: f32, g: f32, b: f32) -> Self
pub const fn from_gray(l: f32) -> Self
pub fn from_luminance_alpha(l: f32, a: f32) -> Self
sourcepub fn from_black_alpha(a: f32) -> Self
pub fn from_black_alpha(a: f32) -> Self
Transparent black
sourcepub fn from_white_alpha(a: f32) -> Self
pub fn from_white_alpha(a: f32) -> Self
Transparent white
pub fn r(&self) -> f32
pub fn g(&self) -> f32
pub fn b(&self) -> f32
pub fn a(&self) -> f32
sourcepub fn to_rgba_unmultiplied(&self) -> [f32; 4]
pub fn to_rgba_unmultiplied(&self) -> [f32; 4]
unmultiply the alpha
sourcepub fn to_srgba_unmultiplied(&self) -> [u8; 4]
pub fn to_srgba_unmultiplied(&self) -> [u8; 4]
unmultiply the alpha
Trait Implementations
impl Copy for Rgba
impl StructuralPartialEq for Rgba
Auto Trait Implementations
impl RefUnwindSafe for Rgba
impl Send for Rgba
impl Sync for Rgba
impl Unpin for Rgba
impl UnwindSafe for Rgba
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