[−][src]Struct image::Bgra
BGR colors + alpha channel
Fields
data: [T; 4]
Trait Implementations
impl<T: PartialEq + Primitive> PartialEq for Bgra<T>[src]
impl<T: PartialEq + Primitive> PartialEq for Bgra<T>fn eq(&self, other: &Bgra<T>) -> bool[src]
fn eq(&self, other: &Bgra<T>) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Bgra<T>) -> bool[src]
fn ne(&self, other: &Bgra<T>) -> boolThis method tests for !=.
impl<T: Eq + Primitive> Eq for Bgra<T>[src]
impl<T: Eq + Primitive> Eq for Bgra<T>impl<T: Clone + Primitive> Clone for Bgra<T>[src]
impl<T: Clone + Primitive> Clone for Bgra<T>fn clone(&self) -> Bgra<T>[src]
fn clone(&self) -> Bgra<T>Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl<T: Debug + Primitive> Debug for Bgra<T>[src]
impl<T: Debug + Primitive> Debug for Bgra<T>fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<T: Copy + Primitive> Copy for Bgra<T>[src]
impl<T: Copy + Primitive> Copy for Bgra<T>impl<T: Hash + Primitive> Hash for Bgra<T>[src]
impl<T: Hash + Primitive> Hash for Bgra<T>fn hash<__HT: Hasher>(&self, state: &mut __HT)[src]
fn hash<__HT: Hasher>(&self, state: &mut __HT)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl<T: Primitive + 'static> Pixel for Bgra<T>[src]
impl<T: Primitive + 'static> Pixel for Bgra<T>type Subpixel = T
The underlying subpixel type.
fn channel_count() -> u8[src]
fn channel_count() -> u8Returns the number of channels of this pixel type.
fn color_model() -> &'static str[src]
fn color_model() -> &'static strReturns a string that can help to interpret the meaning each channel See gimp babl. Read more
fn color_type() -> ColorType[src]
fn color_type() -> ColorTypeReturns the ColorType for this pixel format
fn channels(&self) -> &[T][src]
fn channels(&self) -> &[T]Returns the components as a slice.
fn channels_mut(&mut self) -> &mut [T][src]
fn channels_mut(&mut self) -> &mut [T]Returns the components as a mutable slice
fn channels4(&self) -> (T, T, T, T)[src]
fn channels4(&self) -> (T, T, T, T)Returns the channels of this pixel as a 4 tuple. If the pixel has less than 4 channels the remainder is filled with the maximum value Read more
fn from_channels(a: T, b: T, c: T, d: T) -> Bgra<T>[src]
fn from_channels(a: T, b: T, c: T, d: T) -> Bgra<T>Construct a pixel from the 4 channels a, b, c and d. If the pixel does not contain 4 channels the extra are ignored. Read more
fn from_slice(slice: &[T]) -> &Bgra<T>[src]
fn from_slice(slice: &[T]) -> &Bgra<T>Returns a view into a slice. Read more
fn from_slice_mut(slice: &mut [T]) -> &mut Bgra<T>[src]
fn from_slice_mut(slice: &mut [T]) -> &mut Bgra<T>Returns mutable view into a mutable slice. Read more
fn to_rgb(&self) -> Rgb<T>[src]
fn to_rgb(&self) -> Rgb<T>Convert this pixel to RGB
fn to_bgr(&self) -> Bgr<T>[src]
fn to_bgr(&self) -> Bgr<T>Convert this pixel to BGR
fn to_rgba(&self) -> Rgba<T>[src]
fn to_rgba(&self) -> Rgba<T>Convert this pixel to RGB with an alpha channel
fn to_bgra(&self) -> Bgra<T>[src]
fn to_bgra(&self) -> Bgra<T>Convert this pixel to BGR with an alpha channel
fn to_luma(&self) -> Luma<T>[src]
fn to_luma(&self) -> Luma<T>Convert this pixel to luma
fn to_luma_alpha(&self) -> LumaA<T>[src]
fn to_luma_alpha(&self) -> LumaA<T>Convert this pixel to luma with an alpha channel
fn map<F>(&self, f: F) -> Bgra<T> where
F: FnMut(T) -> T, [src]
fn map<F>(&self, f: F) -> Bgra<T> where
F: FnMut(T) -> T, Apply the function f to each channel of this pixel.
fn apply<F>(&mut self, f: F) where
F: FnMut(T) -> T, [src]
fn apply<F>(&mut self, f: F) where
F: FnMut(T) -> T, Apply the function f to each channel of this pixel.
fn map_with_alpha<F, G>(&self, f: F, g: G) -> Bgra<T> where
F: FnMut(T) -> T,
G: FnMut(T) -> T, [src]
fn map_with_alpha<F, G>(&self, f: F, g: G) -> Bgra<T> where
F: FnMut(T) -> T,
G: FnMut(T) -> T, Apply the function f to each channel except the alpha channel. Apply the function g to the alpha channel. Read more
fn apply_with_alpha<F, G>(&mut self, f: F, g: G) where
F: FnMut(T) -> T,
G: FnMut(T) -> T, [src]
fn apply_with_alpha<F, G>(&mut self, f: F, g: G) where
F: FnMut(T) -> T,
G: FnMut(T) -> T, Apply the function f to each channel except the alpha channel. Apply the function g to the alpha channel. Works in-place. Read more
fn map2<F>(&self, other: &Self, f: F) -> Bgra<T> where
F: FnMut(T, T) -> T, [src]
fn map2<F>(&self, other: &Self, f: F) -> Bgra<T> where
F: FnMut(T, T) -> T, Apply the function f to each channel of this pixel and other pairwise. Read more
fn apply2<F>(&mut self, other: &Bgra<T>, f: F) where
F: FnMut(T, T) -> T, [src]
fn apply2<F>(&mut self, other: &Bgra<T>, f: F) where
F: FnMut(T, T) -> T, Apply the function f to each channel of this pixel and other pairwise. Works in-place. Read more
fn invert(&mut self)[src]
fn invert(&mut self)Invert this pixel
fn blend(&mut self, other: &Bgra<T>)[src]
fn blend(&mut self, other: &Bgra<T>)Blend the color of a given pixel into ourself, taking into account alpha channels
impl<T: Primitive> Index<usize> for Bgra<T>[src]
impl<T: Primitive> Index<usize> for Bgra<T>type Output = T
The returned type after indexing.
ⓘImportant traits for &'a mut Rfn index(&self, _index: usize) -> &T[src]
fn index(&self, _index: usize) -> &TPerforms the indexing (container[index]) operation.
impl<T: Primitive> IndexMut<usize> for Bgra<T>[src]
impl<T: Primitive> IndexMut<usize> for Bgra<T>Auto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, type Owned = T
fn to_owned(&self) -> T[src]
fn to_owned(&self) -> TCreates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)[src]
fn clone_into(&self, target: &mut T)🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> From for T[src]
impl<T> From for Timpl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>try_from)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, ⓘImportant traits for &'a mut Rfn borrow(&self) -> &T[src]
fn borrow(&self) -> &TImmutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>try_from)Performs the conversion.
impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, ⓘImportant traits for &'a mut Rfn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut TMutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeId🔬 This is a nightly-only experimental API. (get_type_id)
this method will likely be replaced by an associated static
Gets the TypeId of self. Read more
impl<T> SetParameter for T[src]
impl<T> SetParameter for T