#[repr(i32)]pub enum AlphaType {
Unknown = 0,
Opaque = 1,
Premul = 2,
Unpremul = 3,
}Expand description
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§
Implementations§
Source§impl SkAlphaType
impl SkAlphaType
pub const LastEnum: SkAlphaType = SkAlphaType::Unpremul
Trait Implementations§
Source§impl Clone for SkAlphaType
impl Clone for SkAlphaType
Source§fn clone(&self) -> SkAlphaType
fn clone(&self) -> SkAlphaType
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SkAlphaType
Source§impl Debug for SkAlphaType
impl Debug for SkAlphaType
impl Eq for SkAlphaType
Source§impl Hash for SkAlphaType
impl Hash for SkAlphaType
Source§impl PartialEq for SkAlphaType
impl PartialEq for SkAlphaType
impl StructuralPartialEq for SkAlphaType
Auto Trait Implementations§
impl Forget for SkAlphaType
impl Freeze for SkAlphaType
impl Move for SkAlphaType
impl RefUnwindSafe for SkAlphaType
impl Send for SkAlphaType
impl Sync for SkAlphaType
impl Unpin for SkAlphaType
impl UnsafeUnpin for SkAlphaType
impl UnwindSafe for SkAlphaType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more