[][src]Struct footile::Gray8

#[repr(C)]
pub struct Gray8 { /* fields omitted */ }

8-bit grayscale pixel format.

This pixel format is for 8-bit grayscale with no alpha channel.

Methods

impl Gray8[src]

pub fn new(value: u8) -> Self[src]

Build a gray8 value.

pub fn value(self) -> u8[src]

Get the component value.

Trait Implementations

impl PixFmt for Gray8[src]

fn color_type() -> ColorType[src]

Get the PNG color type.

fn over(pix: &mut [Self], mask: &[u8], clr: Self)[src]

Blend pixels with an alpha mask.

  • pix Slice of pixels.
  • mask Alpha mask for compositing.
  • src Source color.

fn divide_alpha(_pix: &mut [Self])[src]

Divide alpha (remove premultiplied alpha)

fn as_u8_slice(pix: &[Self]) -> &[u8][src]

Convert a pixel slice into a u8 slice. Read more

fn as_u8_slice_mut(pix: &mut [Self]) -> &mut [u8][src]

Convert a pixel slice into a mutable u8 slice. Read more

fn as_slice(pix: &[u8]) -> &[Self][src]

Convert a u8 slice into a pixel slice. Read more

fn as_slice_mut(pix: &mut [u8]) -> &mut [Self][src]

Convert a u8 slice into a mutable pixel slice. Read more

impl Clone for Gray8[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for Gray8[src]

impl Default for Gray8[src]

impl Debug for Gray8[src]

Auto Trait Implementations

impl Send for Gray8

impl Sync for Gray8

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.