Draws Drafter.Widget.Digits text as a transmitted terminal image.
On a terminal supporting the kitty, iTerm2, or sixel protocol, the glyph bitmaps are scaled into a raster and sent as a picture, so strokes land on pixel rather than cell boundaries.
Every function returns nil when no protocol is available, and the widget
renders cells instead.
Summary
Functions
The pixel protocol in use, or nil when the terminal has none.
Rasterises text at the largest whole scale that fits a cell box.
Renders text as a transmitted image sized to a cell box.
Functions
The pixel protocol in use, or nil when the terminal has none.
@spec raster([String.t()], {pos_integer(), pos_integer()}, tuple()) :: FrenchCurve.Raster.t()
Rasterises text at the largest whole scale that fits a cell box.
Scale is never below one; a box too small for native size is handled by the
encoder's fit, which scales the finished picture down.
@spec render( String.t(), {pos_integer(), pos_integer()}, tuple(), atom() | nil, term() ) :: {iodata(), iodata()} | nil
Renders text as a transmitted image sized to a cell box.
Returns {paint, clear} as Drafter.Widget's image/3 expects, or nil
when the text is empty, the box has no area, or the terminal cannot display
an image.