[−][src]Trait footile::PixFmt
Pixel format.
This determines color components and bit depth, as well as the layout of pixels in memory.
Required methods
fn color_type() -> ColorType
Get the PNG color type.
fn over(pix: &mut [Self], mask: &[u8], src: Self)
Blend pixels with an alpha mask.
pix
Slice of pixels.mask
Alpha mask for compositing.src
Source color.
fn divide_alpha(pix: &mut [Self])
Divide alpha (remove premultiplied alpha)
pix
Slice of pixels.
Provided methods
fn as_u8_slice(pix: &[Self]) -> &[u8]
Convert a pixel slice into a u8 slice.
pix
Slice of pixels.
fn as_u8_slice_mut(pix: &mut [Self]) -> &mut [u8]
Convert a pixel slice into a mutable u8 slice.
pix
Slice of pixels.
fn as_slice(pix: &[u8]) -> &[Self]
Convert a u8 slice into a pixel slice.
pix
Slice of u8 pixel data.
fn as_slice_mut(pix: &mut [u8]) -> &mut [Self]
Convert a u8 slice into a mutable pixel slice.
pix
Slice of u8 pixel data.
Implementors
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]
fn as_u8_slice_mut(pix: &mut [Self]) -> &mut [u8]
[src]
fn as_slice(pix: &[u8]) -> &[Self]
[src]
fn as_slice_mut(pix: &mut [u8]) -> &mut [Self]
[src]
impl PixFmt for Rgb8
[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]
fn as_u8_slice_mut(pix: &mut [Self]) -> &mut [u8]
[src]
fn as_slice(pix: &[u8]) -> &[Self]
[src]
fn as_slice_mut(pix: &mut [u8]) -> &mut [Self]
[src]
impl PixFmt for Rgba8
[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)