[−][src]Struct embedded_graphics::pixelcolor::Gray8
8 bit grayscale color.
Methods
impl Gray8
[src]
pub const fn new(luma: u8) -> Self
[src]
Creates a new grayscale color.
Too large luma values are masked to the valid range by setting
the upper bits to 0
.
Trait Implementations
impl Clone for Gray8
[src]
fn clone(&self) -> Gray8
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl ColorMapping<Gray8> for Gray8
[src]
fn char_to_color(c: char) -> Self
[src]
fn color_to_char(color: Gray8) -> char
[src]
impl Copy for Gray8
[src]
impl Debug for Gray8
[src]
impl Default for Gray8
[src]
impl Eq for Gray8
[src]
impl From<BinaryColor> for Gray8
[src]
fn from(color: BinaryColor) -> Self
[src]
impl From<Gray8> for Rgb555
[src]
impl From<Gray8> for Bgr555
[src]
impl From<Gray8> for Rgb565
[src]
impl From<Gray8> for Bgr565
[src]
impl From<Gray8> for Rgb888
[src]
impl From<Gray8> for Bgr888
[src]
impl From<Gray8> for RawU8
[src]
impl From<RawU8> for Gray8
[src]
impl GrayColor for Gray8
[src]
fn luma(&self) -> u8
[src]
const BLACK: Self
[src]
Black color (0% luma)
const WHITE: Self
[src]
White color (100% luma)
impl Hash for Gray8
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for Gray8
[src]
fn cmp(&self, other: &Gray8) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Gray8> for Gray8
[src]
impl PartialOrd<Gray8> for Gray8
[src]
fn partial_cmp(&self, other: &Gray8) -> Option<Ordering>
[src]
fn lt(&self, other: &Gray8) -> bool
[src]
fn le(&self, other: &Gray8) -> bool
[src]
fn gt(&self, other: &Gray8) -> bool
[src]
fn ge(&self, other: &Gray8) -> bool
[src]
impl PixelColor for Gray8
[src]
impl StructuralEq for Gray8
[src]
impl StructuralPartialEq for Gray8
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<C> IntoStorage for C where
C: PixelColor,
<C as PixelColor>::Raw: From<C>,
[src]
C: PixelColor,
<C as PixelColor>::Raw: From<C>,
type Storage = <<C as PixelColor>::Raw as RawData>::Storage
The underlying storage type for the pixel color
fn into_storage(Self) -> <C as IntoStorage>::Storage
[src]
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Scalar for T where
T: PartialEq<T> + Copy + Any + Debug,
[src]
T: PartialEq<T> + Copy + Any + Debug,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
unsafe fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,