[−][src]Struct footile::Rgba8
8-bit per channel RGBA pixel format.
This format has four 8-bit channels: red, green, blue and alpha.
Methods
impl Rgba8
[src]
pub fn new(red: u8, green: u8, blue: u8, alpha: u8) -> Self
[src]
Build a color by specifying red, green, blue and alpha values.
pub fn rgb(red: u8, green: u8, blue: u8) -> Self
[src]
Build an opaque color by specifying red, green and blue values.
pub fn red(self) -> u8
[src]
Get the red component value.
pub fn green(self) -> u8
[src]
Get the green component value.
pub fn blue(self) -> u8
[src]
Get the blue component value.
pub fn alpha(self) -> u8
[src]
Get the alpha component value.
Trait Implementations
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)
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 Rgba8
[src]
impl Default for Rgba8
[src]
impl From<Rgba8> for i32
[src]
impl Clone for Rgba8
[src]
fn clone(&self) -> Rgba8
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Rgba8
[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,