Struct tiny_skia::ColorU8[][src]

#[repr(transparent)]pub struct ColorU8(_);

A 32-bit RGBA color value.

Byteorder: ABGR

Implementations

impl ColorU8[src]

pub const fn from_rgba(r: u8, g: u8, b: u8, a: u8) -> Self[src]

Creates a new color.

pub const fn red(self) -> u8[src]

Returns color’s red component.

pub const fn green(self) -> u8[src]

Returns color’s green component.

pub const fn blue(self) -> u8[src]

Returns color’s blue component.

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 premultiply(&self) -> PremultipliedColorU8[src]

Converts into a premultiplied color.

Trait Implementations

impl Clone for ColorU8[src]

impl Copy for ColorU8[src]

impl Debug for ColorU8[src]

impl PartialEq<ColorU8> for ColorU8[src]

impl StructuralPartialEq for ColorU8[src]

Auto Trait Implementations

impl RefUnwindSafe for ColorU8

impl Send for ColorU8

impl Sync for ColorU8

impl Unpin for ColorU8

impl UnwindSafe for ColorU8

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.