pub enum Frag {
Show 20 variants
Solid,
Image,
ImageMatrix,
ImageBlend,
Linear,
Radial,
Sweep,
BlendSolid,
BlendTexture,
RRectBlur,
Blur,
MaskCombine,
DropShadow,
MaskComposite,
LinearRamp,
RadialRamp,
SweepRamp,
ColorMatrix,
ColorBlend,
Pattern,
}Expand description
Frag selects the fragment shader that colors a covered pixel.
Variants§
Solid
Image
ImageMatrix
Direct-image color filters run after texture sampling.
ImageBlend
Linear
Radial
Sweep
BlendSolid
Advanced blend, solid src × dst snapshot (group1 = snapshot).
BlendTexture
Advanced blend, texture src (layer / desugared draw) × dst snapshot (group1 = snapshot + src texture).
RRectBlur
Closed-form blurred solid (r)rect — soft coverage, zero filter passes.
Blur
One direction of a separable gaussian (filter passes only).
MaskCombine
Blur style combine: blurred layer × sharp layer → one texture (filter passes only; blend layout: 0 = blurred, 2 = sharp).
DropShadow
Drop-shadow combine: the sharp layer over its offset blurred shadow (filter passes only; blend layout: 0 = shadow, 2 = sharp).
MaskComposite
Mask layer composite: texture → coverage in alpha (luminance or alpha per payload flag), drawn with DstIn.
LinearRamp
Gradients past 8 stops sampling a baked 1D ramp texture.
RadialRamp
SweepRamp
ColorMatrix
Colour filters over a layer’s texture (filter passes only): a 4×5 matrix, or a constant colour blended as the source.
ColorBlend
Pattern
An image tiled across the shape, sampled through the paint’s own local matrix — Canvas2D’s pattern.
Trait Implementations§
impl Copy for Frag
impl Eq for Frag
impl StructuralPartialEq for Frag
Auto Trait Implementations§
impl Freeze for Frag
impl RefUnwindSafe for Frag
impl Send for Frag
impl Sync for Frag
impl Unpin for Frag
impl UnsafeUnpin for Frag
impl UnwindSafe for Frag
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.