Type Alias slint_interpreter::Rgba8Pixel
pub type Rgba8Pixel = Rgba<u8>;
Expand description
Convenience alias for a pixel with four color channels (red, green, blue and alpha), each encoded as u8.
Aliased Type§
struct Rgba8Pixel {
pub r: u8,
pub g: u8,
pub b: u8,
pub a: u8,
}
Fields§
§r: u8
Red Component
g: u8
Green Component
b: u8
Blue Component
a: u8
Alpha Component
Implementations
Trait Implementations
source§impl<T> AddAssign<T> for Rgba<T>
impl<T> AddAssign<T> for Rgba<T>
px + 1
source§fn add_assign(&mut self, r: T)
fn add_assign(&mut self, r: T)
Performs the
+=
operation. Read moresource§impl<T, A> AddAssign for Rgba<T, A>
impl<T, A> AddAssign for Rgba<T, A>
px + px
source§fn add_assign(&mut self, other: Rgba<T, A>)
fn add_assign(&mut self, other: Rgba<T, A>)
Performs the
+=
operation. Read moresource§impl<T, A, B> ColorComponentMap<Rgba<B, A>, T, B> for Rgba<T, A>
impl<T, A, B> ColorComponentMap<Rgba<B, A>, T, B> for Rgba<T, A>
source§impl<T> ComponentSlice<T> for Rgba<T>
impl<T> ComponentSlice<T> for Rgba<T>
source§impl<T> DivAssign<T> for Rgba<T>
impl<T> DivAssign<T> for Rgba<T>
px * 1
source§fn div_assign(&mut self, r: T)
fn div_assign(&mut self, r: T)
Performs the
/=
operation. Read moresource§impl<R, S> From<(R, R, R, R)> for Rgba<S>where
R: Into<S>,
impl<R, S> From<(R, R, R, R)> for Rgba<S>where
R: Into<S>,
source§fn from(value: (R, R, R, R)) -> Rgba<S>
fn from(value: (R, R, R, R)) -> Rgba<S>
Converts to this type from the input type.
source§impl<T, A> From<GrayAlpha_v08<T, A>> for Rgba<T, A>where
T: Clone,
impl<T, A> From<GrayAlpha_v08<T, A>> for Rgba<T, A>where
T: Clone,
source§fn from(other: GrayAlpha_v08<T, A>) -> Rgba<T, A>
fn from(other: GrayAlpha_v08<T, A>) -> Rgba<T, A>
Converts to this type from the input type.
source§impl<T> FromIterator<T> for Rgba<T>
impl<T> FromIterator<T> for Rgba<T>
source§fn from_iter<I>(into_iter: I) -> Rgba<T>where
I: IntoIterator<Item = T>,
fn from_iter<I>(into_iter: I) -> Rgba<T>where
I: IntoIterator<Item = T>,
Takes exactly 4 elements from the iterator and creates a new instance. Panics if there are fewer elements in the iterator.
source§impl<T> MulAssign<T> for Rgba<T>
impl<T> MulAssign<T> for Rgba<T>
px * 1
source§fn mul_assign(&mut self, r: T)
fn mul_assign(&mut self, r: T)
Performs the
*=
operation. Read moresource§impl<T, A> Ord for Rgba<T, A>
impl<T, A> Ord for Rgba<T, A>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<T, A> PartialEq for Rgba<T, A>
impl<T, A> PartialEq for Rgba<T, A>
source§impl<T, A> PartialOrd for Rgba<T, A>where
T: PartialOrd,
A: PartialOrd,
impl<T, A> PartialOrd for Rgba<T, A>where
T: PartialOrd,
A: PartialOrd,
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<T> SubAssign<T> for Rgba<T>
impl<T> SubAssign<T> for Rgba<T>
px - 1
source§fn sub_assign(&mut self, r: T)
fn sub_assign(&mut self, r: T)
Performs the
-=
operation. Read moresource§impl<T, A> SubAssign for Rgba<T, A>
impl<T, A> SubAssign for Rgba<T, A>
px - px
source§fn sub_assign(&mut self, other: Rgba<T, A>)
fn sub_assign(&mut self, other: Rgba<T, A>)
Performs the
-=
operation. Read moresource§impl<T, A> Zeroable for Rgba<T, A>where
T: Zeroable,
A: Zeroable,
impl<T, A> Zeroable for Rgba<T, A>where
T: Zeroable,
A: Zeroable,
This is unsound. You can disable as-bytes
feature, enable bytemuck
, and use bytemuck::cast_slice()
instead.
impl<T, A> Copy for Rgba<T, A>
impl<T, A> Eq for Rgba<T, A>
impl<T, A> Pod for Rgba<T, A>where
T: Pod,
A: Pod,
This is unsound. You can disable as-bytes
feature, enable bytemuck
, and use bytemuck::cast_slice()
instead.