[−][src]Struct tiny_skia::PremultipliedColorU8
A 32-bit premultiplied RGBA color value.
Byteorder: ABGR
Implementations
impl PremultipliedColorU8[src]
pub const TRANSPARENT: Self[src]
A transparent color.
pub fn from_rgba(r: u8, g: u8, b: u8, a: u8) -> Option<Self>[src]
Creates a new premultiplied color.
RGB components must be <= alpha.
pub const fn red(self) -> u8[src]
Returns color's red component.
The value is <= alpha.
pub const fn green(self) -> u8[src]
Returns color's green component.
The value is <= alpha.
pub const fn blue(self) -> u8[src]
Returns color's blue component.
The value is <= alpha.
pub const fn alpha(self) -> u8[src]
Returns color's alpha component.
pub fn is_opaque(&self) -> bool[src]
Check that color is opaque.
Alpha == 255
pub const fn get(self) -> u32[src]
Returns the value as a primitive type.
pub fn demultiply(&self) -> ColorU8[src]
Returns a demultiplied color.
Trait Implementations
impl Clone for PremultipliedColorU8[src]
fn clone(&self) -> PremultipliedColorU8[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Copy for PremultipliedColorU8[src]
impl Debug for PremultipliedColorU8[src]
impl PartialEq<PremultipliedColorU8> for PremultipliedColorU8[src]
fn eq(&self, other: &PremultipliedColorU8) -> bool[src]
fn ne(&self, other: &PremultipliedColorU8) -> bool[src]
impl Pod for PremultipliedColorU8[src]
impl StructuralPartialEq for PremultipliedColorU8[src]
impl Zeroable for PremultipliedColorU8[src]
Auto Trait Implementations
impl RefUnwindSafe for PremultipliedColorU8
impl Send for PremultipliedColorU8
impl Sync for PremultipliedColorU8
impl Unpin for PremultipliedColorU8
impl UnwindSafe for PremultipliedColorU8
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> 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>,