#[repr(C)]pub struct GreyAlpha<ComponentType, AlphaComponentType = ComponentType>(pub ComponentType, pub AlphaComponentType);
Expand description
Grayscale with alpha. Use .0
/.1
to access.
Tuple Fields
0: ComponentType
brightness level
1: AlphaComponentType
alpha
Implementations
Create a new GrayAlpha
with the new alpha value, but same gray value
Create a new GrayAlpha
with a new alpha value created by the callback.
Trait Implementations
px + px
px + 1
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
The components interpreted as an array, e.g. one RGB
expands to 3 elements. Read more
px / 1
Assumes 65535 is opaque
Assumes 255 is opaque
px * 1
impl<ComponentType, AlphaComponentType> PartialOrd<GrayAlpha<ComponentType, AlphaComponentType>> for GrayAlpha<ComponentType, AlphaComponentType> where
ComponentType: PartialOrd<ComponentType>,
AlphaComponentType: PartialOrd<AlphaComponentType>,
impl<ComponentType, AlphaComponentType> PartialOrd<GrayAlpha<ComponentType, AlphaComponentType>> for GrayAlpha<ComponentType, AlphaComponentType> where
ComponentType: PartialOrd<ComponentType>,
AlphaComponentType: PartialOrd<AlphaComponentType>,
pub fn partial_cmp(
&self,
other: &GrayAlpha<ComponentType, AlphaComponentType>
) -> Option<Ordering>
pub fn partial_cmp(
&self,
other: &GrayAlpha<ComponentType, AlphaComponentType>
) -> Option<Ordering>
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
px - px
px - 1
impl<ComponentType, AlphaComponentType> Copy for GrayAlpha<ComponentType, AlphaComponentType> where
ComponentType: Copy,
AlphaComponentType: Copy,
impl<ComponentType, AlphaComponentType> Eq for GrayAlpha<ComponentType, AlphaComponentType> where
ComponentType: Eq,
AlphaComponentType: Eq,
impl<ComponentType, AlphaComponentType> StructuralEq for GrayAlpha<ComponentType, AlphaComponentType>
impl<ComponentType, AlphaComponentType> StructuralPartialEq for GrayAlpha<ComponentType, AlphaComponentType>
Auto Trait Implementations
impl<ComponentType, AlphaComponentType> RefUnwindSafe for GrayAlpha<ComponentType, AlphaComponentType> where
AlphaComponentType: RefUnwindSafe,
ComponentType: RefUnwindSafe,
impl<ComponentType, AlphaComponentType> Send for GrayAlpha<ComponentType, AlphaComponentType> where
AlphaComponentType: Send,
ComponentType: Send,
impl<ComponentType, AlphaComponentType> Sync for GrayAlpha<ComponentType, AlphaComponentType> where
AlphaComponentType: Sync,
ComponentType: Sync,
impl<ComponentType, AlphaComponentType> Unpin for GrayAlpha<ComponentType, AlphaComponentType> where
AlphaComponentType: Unpin,
ComponentType: Unpin,
impl<ComponentType, AlphaComponentType> UnwindSafe for GrayAlpha<ComponentType, AlphaComponentType> where
AlphaComponentType: UnwindSafe,
ComponentType: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more