Docsv2.12.12
Back to API Reference
Class

ExtrudeModifier

Adds a 3D extrude/bevel effect by appending a stack of progressively offset duplicate quads behind the face.

Remarks

Layers are flushed back-to-front in layer-major order across all glyphs (every glyph's deepest slice first, then every glyph's next-deeper slice, …, then face). Naïve per-glyph fanout would invert that order at glyph boundaries when the cumulative offset exceeds glyph advance, leaving farther slices of glyph N+1 covering closer slices of glyph N. Per-layer buffers preserve the painter order regardless of overlap. Format: <extrude=offsetX,offsetY,#nearColor,#farColor,dilate,softness>. Defaults: offset = (3,-3), near = white, far = black, dilate = 0, softness = 0.
public int Steps{ get; set }

Number of extrude layers stacked behind the face (minimum 1). More layers produce a smoother depth gradient and a longer apparent extrusion at the cost of additional duplicate-quad geometry per glyph.

public bool Bevel{ get; set }

When, layers alternate between the near and far face colours rather than blending across, producing a faceted bevel highlight. The layer count effectively doubles (Steps × 2) because each step contributes a near face and a side face.

public bool FixedPixelSize{ get; set }

When, the per-range offsetX / offsetY / dilate / softness values are interpreted in fixed pixels and compensated by the glyph metric factor so the extrusion has constant on-screen geometry independent of font size.

protected override void OnEnable()
protected override void OnDestroy()
protected override void ResetOwnRequests()
protected override void OnApply()
protected override void OnGlyphEffect()
protected override void OnFlush()

Layer-major flush: every glyph's deepest slice first, then every glyph's next slice, …, then the face. Each layer maintains its own emit buffer, so painter order survives inter-glyph overlap when the cumulative extrusion offset exceeds glyph advance.

protected override void OnEmitQuad()

Not used — ExtrudeModifier bypasses the base emit-queue indirection and writes all per-layer slots directly inside its OnFlush override.