#[repr(u32)]pub enum Tvg_Blend_Method {
Show 18 variants
TVG_BLEND_METHOD_NORMAL = 0,
TVG_BLEND_METHOD_MULTIPLY = 1,
TVG_BLEND_METHOD_SCREEN = 2,
TVG_BLEND_METHOD_OVERLAY = 3,
TVG_BLEND_METHOD_DARKEN = 4,
TVG_BLEND_METHOD_LIGHTEN = 5,
TVG_BLEND_METHOD_COLORDODGE = 6,
TVG_BLEND_METHOD_COLORBURN = 7,
TVG_BLEND_METHOD_HARDLIGHT = 8,
TVG_BLEND_METHOD_SOFTLIGHT = 9,
TVG_BLEND_METHOD_DIFFERENCE = 10,
TVG_BLEND_METHOD_EXCLUSION = 11,
TVG_BLEND_METHOD_HUE = 12,
TVG_BLEND_METHOD_SATURATION = 13,
TVG_BLEND_METHOD_COLOR = 14,
TVG_BLEND_METHOD_LUMINOSITY = 15,
TVG_BLEND_METHOD_ADD = 16,
TVG_BLEND_METHOD_COMPOSITION = 255,
}Expand description
@brief Enumeration indicates the method used for blending paint. Please refer to the respective formulas for each method.
@ingroup ThorVGCapi_Paint
@since 0.15
Variants§
TVG_BLEND_METHOD_NORMAL = 0
< Perform the alpha blending(default). S if (Sa == 255), otherwise (Sa * S) + (255 - Sa) * D
TVG_BLEND_METHOD_MULTIPLY = 1
< Takes the RGB channel values from 0 to 255 of each pixel in the top layer and multiples them with the values for the corresponding pixel from the bottom layer. (S * D)
TVG_BLEND_METHOD_SCREEN = 2
< The values of the pixels in the two layers are inverted, multiplied, and then inverted again. (S + D) - (S * D)
TVG_BLEND_METHOD_OVERLAY = 3
< Combines Multiply and Screen blend modes. (2 * S * D) if (2 * D < Da), otherwise (Sa * Da) - 2 * (Da - S) * (Sa - D)
TVG_BLEND_METHOD_DARKEN = 4
< Creates a pixel that retains the smallest components of the top and bottom layer pixels. min(S, D)
TVG_BLEND_METHOD_LIGHTEN = 5
< Only has the opposite action of Darken Only. max(S, D)
TVG_BLEND_METHOD_COLORDODGE = 6
< Divides the bottom layer by the inverted top layer. D / (255 - S)
TVG_BLEND_METHOD_COLORBURN = 7
< Divides the inverted bottom layer by the top layer, and then inverts the result. 255 - (255 - D) / S
TVG_BLEND_METHOD_HARDLIGHT = 8
< The same as Overlay but with the color roles reversed. (2 * S * D) if (S < Sa), otherwise (Sa * Da) - 2 * (Da - S) * (Sa - D)
TVG_BLEND_METHOD_SOFTLIGHT = 9
< The same as Overlay but with applying pure black or white does not result in pure black or white. (1 - 2 * S) * (D ^ 2) + (2 * S * D)
TVG_BLEND_METHOD_DIFFERENCE = 10
< Subtracts the bottom layer from the top layer or the other way around, to always get a non-negative value. (S - D) if (S > D), otherwise (D - S)
TVG_BLEND_METHOD_EXCLUSION = 11
< The result is twice the product of the top and bottom layers, subtracted from their sum. s + d - (2 * s * d)
TVG_BLEND_METHOD_HUE = 12
< Combine with HSL(Sh + Ds + Dl) then convert it to RGB.
TVG_BLEND_METHOD_SATURATION = 13
< Combine with HSL(Dh + Ss + Dl) then convert it to RGB.
TVG_BLEND_METHOD_COLOR = 14
< Combine with HSL(Sh + Ss + Dl) then convert it to RGB.
TVG_BLEND_METHOD_LUMINOSITY = 15
< Combine with HSL(Dh + Ds + Sl) then convert it to RGB.
TVG_BLEND_METHOD_ADD = 16
< Simply adds pixel values of one layer with the other. (S + D)
TVG_BLEND_METHOD_COMPOSITION = 255
< Used for intermediate composition. @since 1.0
Trait Implementations§
Source§impl Clone for Tvg_Blend_Method
impl Clone for Tvg_Blend_Method
Source§fn clone(&self) -> Tvg_Blend_Method
fn clone(&self) -> Tvg_Blend_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_Blend_Method
impl Debug for Tvg_Blend_Method
Source§impl Hash for Tvg_Blend_Method
impl Hash for Tvg_Blend_Method
Source§impl PartialEq for Tvg_Blend_Method
impl PartialEq for Tvg_Blend_Method
Source§fn eq(&self, other: &Tvg_Blend_Method) -> bool
fn eq(&self, other: &Tvg_Blend_Method) -> bool
self and other values to be equal, and is used by ==.