[][src]Struct sixtyfps::RgbaColor

pub struct RgbaColor<T> {
    pub alpha: T,
    pub red: T,
    pub green: T,
    pub blue: T,
}

RgbaColor stores the red, green, blue and alpha components of a color with the precision of the generic parameter T. For example if T is f32, the values are normalized between 0 and 1. If T is u8, they values range is 0 to 255. This is merely a helper class for use with Color.

Fields

alpha: T

The alpha component.

red: T

The red channel.

green: T

The green channel.

blue: T

The blue channel.

Trait Implementations

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

impl<T> Copy for RgbaColor<T> where
    T: Copy
[src]

impl<T> Debug for RgbaColor<T> where
    T: Debug
[src]

impl<T> Default for RgbaColor<T> where
    T: Default
[src]

impl From<Color> for RgbaColor<f32>[src]

impl From<Color> for RgbaColor<u8>[src]

impl From<RgbaColor<f32>> for Color[src]

impl From<RgbaColor<u8>> for RgbaColor<f32>[src]

impl From<RgbaColor<u8>> for Color[src]

impl<T> PartialEq<RgbaColor<T>> for RgbaColor<T> where
    T: PartialEq<T>, 
[src]

impl<T> StructuralPartialEq for RgbaColor<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for RgbaColor<T> where
    T: RefUnwindSafe

impl<T> Send for RgbaColor<T> where
    T: Send

impl<T> Sync for RgbaColor<T> where
    T: Sync

impl<T> Unpin for RgbaColor<T> where
    T: Unpin

impl<T> UnwindSafe for RgbaColor<T> where
    T: UnwindSafe

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.