Skip to main content

mask_combine_definition

Function mask_combine_definition 

Source
pub fn mask_combine_definition(count: usize) -> EffectDef
Expand description

The pass combining count masks (1 to MAX_SHAPE_MASKS) into its source’s coverage. Mask i is the named input m{i}, whose alpha is the mask’s coverage (drawn by the vector pass, feathered by a blur), inverted when invert{i} is set, and combined with the masks before it by mode{i}: coverage starts empty when the first mask adds and full otherwise; add is c + m - c m, subtract c (1 - m), intersect c m. The source is kept by the result.

§Panics

When count is zero or more than MAX_SHAPE_MASKS.