Struct rgb::alt::BGRA[][src]

#[repr(C)]
pub struct BGRA<ComponentType, AlphaComponentType = ComponentType> { pub b: ComponentType, pub g: ComponentType, pub r: ComponentType, pub a: AlphaComponentType, }

BGR+A

Fields

Blue first

Green

Red

Alpha last

Methods

impl<T: Clone> BGRA<T>
[src]

Iterate over all components (length=4)

impl<T: Clone, A> BGRA<T, A>
[src]

Copy RGB components out of the RGBA struct

impl<T, A> BGRA<T, A>
[src]

Provide a mutable view of only RGB components (leaving out alpha). Useful to change color without changing opacity.

impl<T: Copy, A: Clone> BGRA<T, A>
[src]

Create new RGBA with the same alpha value, but different RGB values

Trait Implementations

impl<T: Copy> From<RGB<T>> for BGRA<T, u8>
[src]

Assumes 255 is opaque

Performs the conversion.

impl<T: Copy> From<RGB<T>> for BGRA<T, u16>
[src]

Assumes 255 is opaque

Performs the conversion.

impl<T: Copy, B> ComponentMap<BGRA<B>, T, B> for BGRA<T>
[src]

Convenience function (equivalent of self.iter().map().collect()) for applying the same formula to every component. Read more

impl<T> ComponentSlice<T> for BGRA<T>
[src]

The components interpreted as an array, e.g. one RGB expands to 3 elements. Read more

impl<T: Copy> From<BGR<T>> for BGRA<T, u8>
[src]

Assumes 255 is opaque

Performs the conversion.

impl<T: Copy> From<BGR<T>> for BGRA<T, u16>
[src]

Assumes 65535 is opaque

Performs the conversion.

impl<T: Display, A: Display> Display for BGRA<T, A>
[src]

Formats the value using the given formatter. Read more

impl<T, A> From<(T, T, T, A)> for BGRA<T, A>
[src]

Performs the conversion.

impl<T, A> Into<(T, T, T, A)> for BGRA<T, A>
[src]

Performs the conversion.

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

Performs the conversion.

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

Performs the conversion.

impl<ComponentType: Copy, AlphaComponentType: Copy> Copy for BGRA<ComponentType, AlphaComponentType>
[src]

impl<ComponentType: Clone, AlphaComponentType: Clone> Clone for BGRA<ComponentType, AlphaComponentType>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<ComponentType: Debug, AlphaComponentType: Debug> Debug for BGRA<ComponentType, AlphaComponentType>
[src]

Formats the value using the given formatter. Read more

impl<ComponentType: Default, AlphaComponentType: Default> Default for BGRA<ComponentType, AlphaComponentType>
[src]

Returns the "default value" for a type. Read more

impl<ComponentType: Eq, AlphaComponentType: Eq> Eq for BGRA<ComponentType, AlphaComponentType>
[src]

impl<ComponentType: PartialEq, AlphaComponentType: PartialEq> PartialEq for BGRA<ComponentType, AlphaComponentType>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<ComponentType: Ord, AlphaComponentType: Ord> Ord for BGRA<ComponentType, AlphaComponentType>
[src]

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl<ComponentType: PartialOrd, AlphaComponentType: PartialOrd> PartialOrd for BGRA<ComponentType, AlphaComponentType>
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<ComponentType: Hash, AlphaComponentType: Hash> Hash for BGRA<ComponentType, AlphaComponentType>
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl<ComponentType, AlphaComponentType> Send for BGRA<ComponentType, AlphaComponentType> where
    AlphaComponentType: Send,
    ComponentType: Send

impl<ComponentType, AlphaComponentType> Sync for BGRA<ComponentType, AlphaComponentType> where
    AlphaComponentType: Sync,
    ComponentType: Sync