[−][src]Struct footile::Gray8
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 Copy for Gray8
[src]
impl Default for Gray8
[src]
impl Clone for Gray8
[src]
fn clone(&self) -> Gray8
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Gray8
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom 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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto 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<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,