[−][src]Enum tiny_skia::AlphaType
Describes how to interpret the alpha component of a pixel.
A pixel may be opaque, or alpha, describing multiple levels of transparency.
In simple blending, alpha weights the draw color and the destination color to create a new color. If alpha describes a weight from zero to one:
new color = draw color * alpha + destination color * (1 - alpha)
In practice alpha is encoded in two or more bits, where 1.0 equals all bits set.
RGB may have alpha included in each component value; the stored value is the original RGB multiplied by alpha. Premultiplied color components improve performance.
Variants
Trait Implementations
impl Clone for AlphaType
[src]
impl Copy for AlphaType
[src]
impl Debug for AlphaType
[src]
impl Eq for AlphaType
[src]
impl Hash for AlphaType
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<AlphaType> for AlphaType
[src]
impl StructuralEq for AlphaType
[src]
impl StructuralPartialEq for AlphaType
[src]
Auto Trait Implementations
impl RefUnwindSafe for AlphaType
impl Send for AlphaType
impl Sync for AlphaType
impl Unpin for AlphaType
impl UnwindSafe for AlphaType
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>,