Back to API Reference
Struct

PaintSwatch

sealed
Implements:IStateSnapshot<PaintSwatch>

A named paint in a UniTextPaints — a solid colour, gradient, or texture, plus how it projects and composites. paint is the reusable authored appearance, while mapping selects its text bounds. The swatch is the weakest layer of the projection override hierarchy (swatch → modifier fields → default parameters → tag attributes); an inherited mapping resolves to Block.

public PaintSwatch CaptureStateSnapshot()

Captures the swatch with detached gradient-stop storage.

public bool StateEquals()

Compares all authored swatch state, including gradient contents.

public string name

Name referenced by paint parameters and markup.

public Paint paint

Authored source, projection, and compositing mode.

public PaintMapping mapping

Text-specific bounds owner used to build the projection frame.