[−][src]Struct lodepng::GreyAlpha
Grayscale with alpha. Use .0
/.1
to access.
Implementations
impl<T, A> GrayAlpha<T, A> where
T: Clone,
[src]
T: Clone,
impl<T, A> GrayAlpha<T, A>
[src]
pub fn new(brightness: T, alpha: A) -> GrayAlpha<T, A>
[src]
New grayscale+alpha pixel
pub fn gray_mut(&mut self) -> &mut Gray<T>
[src]
Provide a mutable view of only Gray
component (leaving out alpha).
impl<T, A> GrayAlpha<T, A> where
A: Clone,
T: Copy,
[src]
A: Clone,
T: Copy,
pub fn alpha(&self, a: A) -> GrayAlpha<T, A>
[src]
Create a new GrayAlpha
with the new alpha value, but same gray value
pub fn map_alpha<F, B>(&self, f: F) -> GrayAlpha<T, B> where
F: FnOnce(A) -> B,
[src]
F: FnOnce(A) -> B,
Create a new GrayAlpha
with a new alpha value created by the callback.
pub fn map_gray<F, U, B>(&self, f: F) -> GrayAlpha<U, B> where
B: From<A> + Clone,
F: FnOnce(T) -> U,
U: Clone,
[src]
B: From<A> + Clone,
F: FnOnce(T) -> U,
U: Clone,
Create new GrayAlpha
with the same alpha value, but different Gray
value
Trait Implementations
impl<T, A> Add<GrayAlpha<T, A>> for GrayAlpha<T, A> where
A: Add<A>,
T: Add<T>,
[src]
A: Add<A>,
T: Add<T>,
px + px
type Output = GrayAlpha<<T as Add<T>>::Output, <A as Add<A>>::Output>
The resulting type after applying the +
operator.
fn add(
self,
other: GrayAlpha<T, A>
) -> <GrayAlpha<T, A> as Add<GrayAlpha<T, A>>>::Output
[src]
self,
other: GrayAlpha<T, A>
) -> <GrayAlpha<T, A> as Add<GrayAlpha<T, A>>>::Output
impl<T> Add<T> for GrayAlpha<T, T> where
T: Copy + Add<T, Output = T>,
[src]
T: Copy + Add<T, Output = T>,
px + 1
type Output = GrayAlpha<T, T>
The resulting type after applying the +
operator.
fn add(self, r: T) -> <GrayAlpha<T, T> as Add<T>>::Output
[src]
impl<T, A> AddAssign<GrayAlpha<T, A>> for GrayAlpha<T, A> where
A: Add<A, Output = A> + Copy,
T: Add<T, Output = T> + Copy,
[src]
A: Add<A, Output = A> + Copy,
T: Add<T, Output = T> + Copy,
px + px
fn add_assign(&mut self, other: GrayAlpha<T, A>)
[src]
impl<T> AddAssign<T> for GrayAlpha<T, T> where
T: Copy + Add<T, Output = T>,
[src]
T: Copy + Add<T, Output = T>,
px + 1
fn add_assign(&mut self, r: T)
[src]
impl<T> AsMut<T> for GrayAlpha<T, T>
[src]
impl<T> AsRef<T> for GrayAlpha<T, T>
[src]
impl<ComponentType, AlphaComponentType> Clone for GrayAlpha<ComponentType, AlphaComponentType> where
AlphaComponentType: Clone,
ComponentType: Clone,
[src]
AlphaComponentType: Clone,
ComponentType: Clone,
fn clone(&self) -> GrayAlpha<ComponentType, AlphaComponentType>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T, B> ComponentMap<GrayAlpha<B, B>, T, B> for GrayAlpha<T, T> where
T: Copy,
[src]
T: Copy,
impl<T> ComponentSlice<T> for GrayAlpha<T, T>
[src]
impl<ComponentType, AlphaComponentType> Copy for GrayAlpha<ComponentType, AlphaComponentType> where
AlphaComponentType: Copy,
ComponentType: Copy,
[src]
AlphaComponentType: Copy,
ComponentType: Copy,
impl<ComponentType, AlphaComponentType> Debug for GrayAlpha<ComponentType, AlphaComponentType> where
AlphaComponentType: Debug,
ComponentType: Debug,
[src]
AlphaComponentType: Debug,
ComponentType: Debug,
impl<ComponentType, AlphaComponentType> Default for GrayAlpha<ComponentType, AlphaComponentType> where
AlphaComponentType: Default,
ComponentType: Default,
[src]
AlphaComponentType: Default,
ComponentType: Default,
impl<T> Div<T> for GrayAlpha<T, T> where
T: Copy + Div<T, Output = T>,
[src]
T: Copy + Div<T, Output = T>,
px / 1
type Output = GrayAlpha<T, T>
The resulting type after applying the /
operator.
fn div(self, r: T) -> <GrayAlpha<T, T> as Div<T>>::Output
[src]
impl<T> DivAssign<T> for GrayAlpha<T, T> where
T: Copy + Div<T, Output = T>,
[src]
T: Copy + Div<T, Output = T>,
px * 1
fn div_assign(&mut self, r: T)
[src]
impl<ComponentType, AlphaComponentType> Eq for GrayAlpha<ComponentType, AlphaComponentType> where
AlphaComponentType: Eq,
ComponentType: Eq,
[src]
AlphaComponentType: Eq,
ComponentType: Eq,
impl<T> From<Gray<T>> for GrayAlpha<T, u8> where
T: Copy,
[src]
T: Copy,
Assumes 255 is opaque
impl<T> From<Gray<T>> for GrayAlpha<T, u16> where
T: Copy,
[src]
T: Copy,
Assumes 65535 is opaque
impl<ComponentType, AlphaComponentType> Hash for GrayAlpha<ComponentType, AlphaComponentType> where
AlphaComponentType: Hash,
ComponentType: Hash,
[src]
AlphaComponentType: Hash,
ComponentType: Hash,
fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
[src]
__H: Hasher,
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T> Mul<T> for GrayAlpha<T, T> where
T: Copy + Mul<T, Output = T>,
[src]
T: Copy + Mul<T, Output = T>,
px * 1
type Output = GrayAlpha<T, T>
The resulting type after applying the *
operator.
fn mul(self, r: T) -> <GrayAlpha<T, T> as Mul<T>>::Output
[src]
impl<T> MulAssign<T> for GrayAlpha<T, T> where
T: Copy + Mul<T, Output = T>,
[src]
T: Copy + Mul<T, Output = T>,
px * 1
fn mul_assign(&mut self, r: T)
[src]
impl<ComponentType, AlphaComponentType> Ord for GrayAlpha<ComponentType, AlphaComponentType> where
AlphaComponentType: Ord,
ComponentType: Ord,
[src]
AlphaComponentType: Ord,
ComponentType: Ord,
fn cmp(&self, other: &GrayAlpha<ComponentType, AlphaComponentType>) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<ComponentType, AlphaComponentType> PartialEq<GrayAlpha<ComponentType, AlphaComponentType>> for GrayAlpha<ComponentType, AlphaComponentType> where
AlphaComponentType: PartialEq<AlphaComponentType>,
ComponentType: PartialEq<ComponentType>,
[src]
AlphaComponentType: PartialEq<AlphaComponentType>,
ComponentType: PartialEq<ComponentType>,
fn eq(&self, other: &GrayAlpha<ComponentType, AlphaComponentType>) -> bool
[src]
fn ne(&self, other: &GrayAlpha<ComponentType, AlphaComponentType>) -> bool
[src]
impl<ComponentType, AlphaComponentType> PartialOrd<GrayAlpha<ComponentType, AlphaComponentType>> for GrayAlpha<ComponentType, AlphaComponentType> where
AlphaComponentType: PartialOrd<AlphaComponentType>,
ComponentType: PartialOrd<ComponentType>,
[src]
AlphaComponentType: PartialOrd<AlphaComponentType>,
ComponentType: PartialOrd<ComponentType>,
fn partial_cmp(
&self,
other: &GrayAlpha<ComponentType, AlphaComponentType>
) -> Option<Ordering>
[src]
&self,
other: &GrayAlpha<ComponentType, AlphaComponentType>
) -> Option<Ordering>
fn lt(&self, other: &GrayAlpha<ComponentType, AlphaComponentType>) -> bool
[src]
fn le(&self, other: &GrayAlpha<ComponentType, AlphaComponentType>) -> bool
[src]
fn gt(&self, other: &GrayAlpha<ComponentType, AlphaComponentType>) -> bool
[src]
fn ge(&self, other: &GrayAlpha<ComponentType, AlphaComponentType>) -> bool
[src]
impl<T, A> Pod for GrayAlpha<T, A> where
A: Pod,
T: Pod,
[src]
A: Pod,
T: Pod,
impl<T, A> Sub<GrayAlpha<T, A>> for GrayAlpha<T, A> where
A: Sub<A>,
T: Sub<T>,
[src]
A: Sub<A>,
T: Sub<T>,
px - px
type Output = GrayAlpha<<T as Sub<T>>::Output, <A as Sub<A>>::Output>
The resulting type after applying the -
operator.
fn sub(
self,
other: GrayAlpha<T, A>
) -> <GrayAlpha<T, A> as Sub<GrayAlpha<T, A>>>::Output
[src]
self,
other: GrayAlpha<T, A>
) -> <GrayAlpha<T, A> as Sub<GrayAlpha<T, A>>>::Output
impl<T> Sub<T> for GrayAlpha<T, T> where
T: Copy + Sub<T, Output = T>,
[src]
T: Copy + Sub<T, Output = T>,
px - 1
type Output = GrayAlpha<<T as Sub<T>>::Output, <T as Sub<T>>::Output>
The resulting type after applying the -
operator.
fn sub(self, r: T) -> <GrayAlpha<T, T> as Sub<T>>::Output
[src]
impl<T, A> SubAssign<GrayAlpha<T, A>> for GrayAlpha<T, A> where
A: Sub<A, Output = A> + Copy,
T: Sub<T, Output = T> + Copy,
[src]
A: Sub<A, Output = A> + Copy,
T: Sub<T, Output = T> + Copy,
px - px
fn sub_assign(&mut self, other: GrayAlpha<T, A>)
[src]
impl<T> SubAssign<T> for GrayAlpha<T, T> where
T: Copy + Sub<T, Output = T>,
[src]
T: Copy + Sub<T, Output = T>,
px - 1
fn sub_assign(&mut self, r: T)
[src]
impl<T, A> Zeroable for GrayAlpha<T, A> where
A: Zeroable,
T: Zeroable,
[src]
A: Zeroable,
T: Zeroable,
fn zeroed() -> Self
Auto Trait Implementations
impl<ComponentType, AlphaComponentType> RefUnwindSafe for GrayAlpha<ComponentType, AlphaComponentType> where
AlphaComponentType: RefUnwindSafe,
ComponentType: RefUnwindSafe,
AlphaComponentType: RefUnwindSafe,
ComponentType: RefUnwindSafe,
impl<ComponentType, AlphaComponentType> Send for GrayAlpha<ComponentType, AlphaComponentType> where
AlphaComponentType: Send,
ComponentType: Send,
AlphaComponentType: Send,
ComponentType: Send,
impl<ComponentType, AlphaComponentType> Sync for GrayAlpha<ComponentType, AlphaComponentType> where
AlphaComponentType: Sync,
ComponentType: Sync,
AlphaComponentType: Sync,
ComponentType: Sync,
impl<ComponentType, AlphaComponentType> Unpin for GrayAlpha<ComponentType, AlphaComponentType> where
AlphaComponentType: Unpin,
ComponentType: Unpin,
AlphaComponentType: Unpin,
ComponentType: Unpin,
impl<ComponentType, AlphaComponentType> UnwindSafe for GrayAlpha<ComponentType, AlphaComponentType> where
AlphaComponentType: UnwindSafe,
ComponentType: UnwindSafe,
AlphaComponentType: UnwindSafe,
ComponentType: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> 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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,