[][src]Struct pix::Alpha8

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

8-bit alpha pixel format.

This pixel format is for 8-bit alpha channel only.

Methods

impl Alpha8[src]

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

Build a alpha8 value.

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

Get the component value.

Trait Implementations

impl PixFmt for Alpha8[src]

fn mask_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) Read more

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 Copy for Alpha8[src]

impl Clone for Alpha8[src]

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

Performs copy-assignment from source. Read more

impl Default for Alpha8[src]

impl Debug for Alpha8[src]

Auto Trait Implementations

impl Send for Alpha8

impl Sync for Alpha8

Blanket Implementations

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

type Owned = T

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

impl<T> From for T[src]

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.