Struct i_slint_core::RgbaColor
source · pub struct RgbaColor<T> {
pub alpha: T,
pub red: T,
pub green: T,
pub blue: T,
}Expand description
RgbaColor stores the red, green, blue and alpha components of a color
with the precision of the generic parameter T. For example if T is f32,
the values are normalized between 0 and 1. If T is u8, they values range
is 0 to 255.
This is merely a helper class for use with Color.
Fields§
§alpha: TThe alpha component.
red: TThe red channel.
green: TThe green channel.
blue: TThe blue channel.
Trait Implementations§
source§impl<T: PartialEq> PartialEq<RgbaColor<T>> for RgbaColor<T>
impl<T: PartialEq> PartialEq<RgbaColor<T>> for RgbaColor<T>
impl<T: Copy> Copy for RgbaColor<T>
impl<T> StructuralPartialEq for RgbaColor<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for RgbaColor<T>where
T: RefUnwindSafe,
impl<T> Send for RgbaColor<T>where
T: Send,
impl<T> Sync for RgbaColor<T>where
T: Sync,
impl<T> Unpin for RgbaColor<T>where
T: Unpin,
impl<T> UnwindSafe for RgbaColor<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> IsDefault for Twhere
T: Default + PartialEq<T> + Copy,
impl<T> IsDefault for Twhere
T: Default + PartialEq<T> + Copy,
source§fn is_default(&self) -> bool
fn is_default(&self) -> bool
Checks that type has a default value.