Docsv3.12.0
Back to API Reference
Class

TruncateModifier

Truncation of overflowing text without an ellipsis, optionally fading the remaining text into the cut.

Remarks

Parameter: optional position (0-1) controlling where text is removed: 0 — from the start, 0.5 — from the middle, 1 (default) — from the end. With a positive fade length the text beside each cut dissolves into it, fully transparent at the cut; text that fits its container never fades. Only the truncated range's own glyphs on the cut's line fade, by where the layout places them rather than where a deformation such as a curve or a wave moves them, and every layer drawn from a glyph fades with it. Inline objects placed as scene objects and range backgrounds keep their own opacity. The fade is exact per pixel on every layer painted by its vertex colour. Layers painted by a gradient or a texture, colour glyphs, and copies drawn with a custom material fade through their vertex alpha instead, which bends the gradient across a glyph that straddles its ends.
public UnitValue FadeLength{ get; set }

Length of the gradient that fades the text into each cut, in pixels or em of the component's font size; zero or less cuts without fading.

public UnitValue FadeOffset{ get; set }

Distance from the cut to where the fade turns fully transparent: positive values reach it inside the text, negative ones leave the text at the cut partly visible.

protected bool ShowEllipsis{ get }
protected override void OnDisable()
protected override void OnDestroy()

See Also