Expand description
Bridge between text-document snapshot types and text-typeset layout params.
Converts FlowSnapshot, BlockSnapshot, TextFormat, etc. into
BlockLayoutParams, FragmentParams, TableLayoutParams, etc.
Structs§
- Bridge
Options - Per-call knobs threaded through the conversion functions so that a host widget can override defaults driven by its active theme.
- Flow
Elements - Converted flow elements, ordered by their position in the flow.
Functions§
- collect_
paint_ spans - Walk a whole
FlowSnapshot(top-level blocks, table cells, and frames recursively) and collect the paint-only overlay for every block that has one, keyed by block_id. Blocks without paint highlights are omitted (the engine resets those to their base colors). - convert_
block - convert_
block_ with - Same as
convert_blockbut with theme-drivenBridgeOptionsfor code-block colour overrides. - convert_
flow - Convert a FlowSnapshot into layout params that can be fed to a
DocumentFlow. - convert_
flow_ with - Same as
convert_flowbut accepts host-suppliedBridgeOptionsfor theme-driven colour overrides. - convert_
frame - convert_
frame_ with - convert_
paint_ spans - Convert a block snapshot’s paint-only highlight overlay into the typesetter’s
PaintSpans. Char offsets pass through unchanged (both sides are block-relative char offsets — the space post-layout glyph clusters live in). Underline is expressed throughunderline_style: an explicitunderline_stylewins, elsefont_underlinemaps to Single / None. - convert_
table - convert_
table_ with