Back to API Reference
Class

FilterModifier

sealed
Inherits:BaseModifier
Implements:ILayerIModifierCommitChanges

Applies a ColorFilter to everything rendered below it in the style stack — an adjustment layer for text. Within its ranges it recolours the glyph face, every paint layer stacked beneath it, and colour emoji; stacked filters compose bottom-up, and a filter at the end of the style list recolours the whole styled text. The filter transforms each layer's colour as it composites; non-Normal blend layers keep their blend against the backdrop.

Remarks

Parameter: an optional strength scaling the whole filter for the range — 1 applies it as authored, 0 disables it (e.g. <sepia=0.5> with a sepia filter bound to the sepia tag).
public int LayerSequence{ get; set }
public bool RendersBehindFill{ get }
public bool ClaimsFill{ get }
public ColorFilter Filter{ get; set }

The colour adjustment applied below this position in the style stack. Null filters nothing; after mutating the assigned instance in place, reassign or mark the text dirty to re-render.

public float Strength{ get; set }

How far the filter is applied: 1 as authored, 0 not at all, values between fade it out. A per-range value overrides it.

public override string ToString()

The kind of filter applied, so the modifier reads as its choice rather than as its container.

protected override void OnEnable()
protected override void OnDisable()
protected override void OnDestroy()
protected override void BeforeApply()
protected override void OnApply()