[][src]Enum tiny_skia::AlphaType

pub enum AlphaType {
    Unknown,
    Opaque,
    Premultiplied,
    Unpremultiplied,
}

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

Unknown
Opaque
Premultiplied
Unpremultiplied

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]

impl PartialEq<AlphaType> for AlphaType[src]

impl StructuralEq for AlphaType[src]

impl StructuralPartialEq for AlphaType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.