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,
}
Expand description
BGR+A
Fields
b: ComponentType
Blue first
g: ComponentType
Green
r: ComponentType
Red
a: AlphaComponentType
Alpha last
Implementations
👎 Deprecated: This function will change. Use bgr_mut()
This function will change. Use bgr_mut()
Provide a mutable view of only RGB components (leaving out alpha). Useful to change color without changing opacity.
Create new RGBA with the same alpha value, but different RGB values
Create a new RGBA with the new alpha value, but same RGB values
Trait Implementations
Reinterpret the slice as a read-only/shared slice of pixels. Multiple consecutive elements in the slice are intepreted as a single pixel (depending on format, e.g. 3 for RGB, 4 for RGBA). Read more
impl<'de, ComponentType, AlphaComponentType> Deserialize<'de> for BGRA<ComponentType, AlphaComponentType> where
ComponentType: Deserialize<'de>,
AlphaComponentType: Deserialize<'de>,
impl<'de, ComponentType, AlphaComponentType> Deserialize<'de> for BGRA<ComponentType, AlphaComponentType> where
ComponentType: Deserialize<'de>,
AlphaComponentType: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Assumes 255 is opaque
Assumes 65535 is opaque
Assumes 255 is opaque
Assumes 65535 is opaque
impl<ComponentType: PartialOrd, AlphaComponentType: PartialOrd> PartialOrd<BGRA<ComponentType, AlphaComponentType>> for BGRA<ComponentType, AlphaComponentType>
impl<ComponentType: PartialOrd, AlphaComponentType: PartialOrd> PartialOrd<BGRA<ComponentType, AlphaComponentType>> for BGRA<ComponentType, AlphaComponentType>
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
impl<ComponentType: Copy, AlphaComponentType: Copy> Copy for BGRA<ComponentType, AlphaComponentType>
impl<ComponentType, AlphaComponentType> StructuralEq for BGRA<ComponentType, AlphaComponentType>
impl<ComponentType, AlphaComponentType> StructuralPartialEq for BGRA<ComponentType, AlphaComponentType>
Auto Trait Implementations
impl<ComponentType, AlphaComponentType> RefUnwindSafe for BGRA<ComponentType, AlphaComponentType> where
AlphaComponentType: RefUnwindSafe,
ComponentType: RefUnwindSafe,
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,
impl<ComponentType, AlphaComponentType> Unpin for BGRA<ComponentType, AlphaComponentType> where
AlphaComponentType: Unpin,
ComponentType: Unpin,
impl<ComponentType, AlphaComponentType> UnwindSafe for BGRA<ComponentType, AlphaComponentType> where
AlphaComponentType: UnwindSafe,
ComponentType: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more