Struct tiny_skia::PremultipliedColor [−][src]
A premultiplied RGBA color value, holding four floating point components.
Guarantees
- All values are in 0..=1 range.
- RGB components are <= A.
Implementations
impl PremultipliedColor
[src]
pub fn red(&self) -> f32
[src]
Returns color’s red component.
- The value is guarantee to be in a 0..=1 range.
- The value is <= alpha.
pub fn green(&self) -> f32
[src]
Returns color’s green component.
- The value is guarantee to be in a 0..=1 range.
- The value is <= alpha.
pub fn blue(&self) -> f32
[src]
Returns color’s blue component.
- The value is guarantee to be in a 0..=1 range.
- The value is <= alpha.
pub fn alpha(&self) -> f32
[src]
Returns color’s alpha component.
- The value is guarantee to be in a 0..=1 range.
pub fn demultiply(&self) -> Color
[src]
Returns a demultiplied color.
pub fn to_color_u8(&self) -> PremultipliedColorU8
[src]
Converts into PremultipliedColorU8
.
Trait Implementations
impl Clone for PremultipliedColor
[src]
fn clone(&self) -> PremultipliedColor
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for PremultipliedColor
[src]
impl Debug for PremultipliedColor
[src]
impl PartialEq<PremultipliedColor> for PremultipliedColor
[src]
fn eq(&self, other: &PremultipliedColor) -> bool
[src]
fn ne(&self, other: &PremultipliedColor) -> bool
[src]
impl StructuralPartialEq for PremultipliedColor
[src]
Auto Trait Implementations
impl RefUnwindSafe for PremultipliedColor
impl Send for PremultipliedColor
impl Sync for PremultipliedColor
impl Unpin for PremultipliedColor
impl UnwindSafe for PremultipliedColor
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,
pub 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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,