Docsv3.31.0
Back to API Reference
Class

HighlightModifier

sealed

Paints non-interactive backgrounds for matched text ranges. The same presentation model renders live text selection without routing selection changes through the parser.

public HighlightPresentation Presentation{ get; set }

Visual definition used for every range emitted by this modifier.

protected IPaintProvider DecorationPaintProvider{ get }
protected bool RequiresExactVisualGlyphs{ get }
public IPaintProvider Provider{ get; set }

Source of named solid, gradient and texture paints.

public PaintRef Paint{ get; set }

Authored highlight paint.

public GeometryMapping GeometryMapping{ get; set }

How the logical range is split into visual figures.

public RangePaintMapping PaintMapping{ get; set }

How gradient or texture coordinates restart independently of geometry topology.

public PaintProjectionKind Shape{ get; set }

Gradient geometry; Inherit uses the selected swatch.

public PaintFit Fit{ get; set }

Texture fitting; Inherit uses the selected swatch.

public float Angle{ get; set }

Paint projection rotation in degrees; NaN uses the selected swatch.

public float Scale{ get; set }

Paint projection zoom; NaN uses the selected swatch.

public Vector2 PaintOffset{ get; set }

Paint projection offset in normalized frame units.

public RangeHeight Height{ get; set }

Vertical extent used for visual fragments.

public UnitVector2 Padding{ get; set }

Additional expansion around each figure; rounded corners contribute a geometric safe inset separately.

public UnitValue CornerRadius{ get; set }

Corner radius of the range surface.

public UnitValue MergeThreshold{ get; set }

Edge differences below this value snap to a shared edge across adjacent lines; a negative value uses the radius.

public RangeDecorationOrder Order{ get; set }

Whether the surface renders behind or above the text.

public Color32 Tint{ get; set }

Colour multiplied with the resolved solid, gradient, or texture paint.

public LayerBlend Blend{ get; set }

How the highlight composites; Inherit uses the selected paint.

protected override void OnDecorationEnable()
protected override void OnDecorationDisable()
protected override void OnDecorationDestroy()
protected override void OnBuildDecoration(in RangeDecorationContext context, ref RangeMeshWriter writer)