[][src]Struct rgx::color::Rgba

#[repr(C)]
pub struct Rgba {
    pub r: f32,
    pub g: f32,
    pub b: f32,
    pub a: f32,
}

A normalized RGBA color.

Fields

r: f32g: f32b: f32a: f32

Methods

impl Rgba[src]

pub const RED: Self[src]

pub const GREEN: Self[src]

pub const BLUE: Self[src]

pub const WHITE: Self[src]

pub const BLACK: Self[src]

pub const TRANSPARENT: Self[src]

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

Create a new Rgba color.

pub fn invert(self) -> Self[src]

Invert the color.

Trait Implementations

impl Clone for Rgba[src]

impl Copy for Rgba[src]

impl Debug for Rgba[src]

impl Default for Rgba[src]

impl From<Rgba> for Rgba8[src]

use rgx::color::{Rgba8, Rgba};

assert_eq!(Rgba8::from(Rgba::RED), Rgba8::RED);

impl From<Rgba8> for Rgba[src]

impl PartialEq<Rgba> for Rgba[src]

impl StructuralPartialEq for Rgba[src]

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

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.