NumberRenderer

Renderer for number elements

Supports two rendering modes: 1. Standard: Single text element (INTEGER, AUTO, FIXED formats) 2. Aligned: Two text elements for decimal point alignment (AUTO_ALIGNED, FIXED_ALIGNED formats) For AUTO_ALIGNED and FIXED_ALIGNED formats, renders the integer and decimal parts separately to keep the decimal point at the same x-position: - Integer part: text-anchor="end" (right-aligned at x=0) - Decimal part: text-anchor="start" (left-aligned at x=0) Both positioned at x=0, creating a fixed decimal point position. The actual number interpolation happens at the state level: - value field interpolates smoothly (0.0 → 100.0) - text field is regenerated at each interpolation step - format/decimals/prefix/suffix use step interpolation

Constructor

NumberRenderer(args, kwargs)

Methods

render

render(
    state: State,
    drawing: Optional[Drawing] = None
) -> DrawingElement