#[repr(u32)]pub enum Tvg_Mask_Method {
TVG_MASK_METHOD_NONE = 0,
TVG_MASK_METHOD_ALPHA = 1,
TVG_MASK_METHOD_INVERSE_ALPHA = 2,
TVG_MASK_METHOD_LUMA = 3,
TVG_MASK_METHOD_INVERSE_LUMA = 4,
TVG_MASK_METHOD_ADD = 5,
TVG_MASK_METHOD_SUBTRACT = 6,
TVG_MASK_METHOD_INTERSECT = 7,
TVG_MASK_METHOD_DIFFERENCE = 8,
TVG_MASK_METHOD_LIGHTEN = 9,
TVG_MASK_METHOD_DARKEN = 10,
}Expand description
@brief Enumeration indicating the method used in the masking of two objects - the target and the source.
@ingroup ThorVGCapi_Paint
Variants§
TVG_MASK_METHOD_NONE = 0
< No Masking is applied.
TVG_MASK_METHOD_ALPHA = 1
< Alpha Masking using the masking target’s pixels as an alpha value.
TVG_MASK_METHOD_INVERSE_ALPHA = 2
< Alpha Masking using the complement to the masking target’s pixels as an alpha value.
TVG_MASK_METHOD_LUMA = 3
< Alpha Masking using the grayscale (0.2126R + 0.7152G + 0.0722*B) of the masking target’s pixels. @since 0.9
TVG_MASK_METHOD_INVERSE_LUMA = 4
< Alpha Masking using the grayscale (0.2126R + 0.7152G + 0.0722*B) of the complement to the masking target’s pixels. @since 0.11
TVG_MASK_METHOD_ADD = 5
< Combines the target and source objects pixels using target alpha. (T * TA) + (S * (255 - TA)) @since 1.0
TVG_MASK_METHOD_SUBTRACT = 6
< Subtracts the source color from the target color while considering their respective target alpha. (T * TA) - (S * (255 - TA)) @since 1.0
TVG_MASK_METHOD_INTERSECT = 7
< Computes the result by taking the minimum value between the target alpha and the source alpha and multiplies it with the target color. (T * min(TA, SA)) @since 1.0
TVG_MASK_METHOD_DIFFERENCE = 8
< Calculates the absolute difference between the target color and the source color multiplied by the complement of the target alpha. abs(T - S * (255 - TA)) @since 1.0
TVG_MASK_METHOD_LIGHTEN = 9
< Where multiple masks intersect, the highest transparency value is used. @since 1.0
TVG_MASK_METHOD_DARKEN = 10
< Where multiple masks intersect, the lowest transparency value is used. @since 1.0
Trait Implementations§
Source§impl Clone for Tvg_Mask_Method
impl Clone for Tvg_Mask_Method
Source§fn clone(&self) -> Tvg_Mask_Method
fn clone(&self) -> Tvg_Mask_Method
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Tvg_Mask_Method
impl Debug for Tvg_Mask_Method
Source§impl Hash for Tvg_Mask_Method
impl Hash for Tvg_Mask_Method
Source§impl PartialEq for Tvg_Mask_Method
impl PartialEq for Tvg_Mask_Method
Source§fn eq(&self, other: &Tvg_Mask_Method) -> bool
fn eq(&self, other: &Tvg_Mask_Method) -> bool
self and other values to be equal, and is used by ==.