Gallery

71 figures · Open a figure to explore its code.

layout (11)

geometry (10)

plotting (16)

maps (9)

networks (6)

text (5)

math (12)

api (2)

(repeated)

Reusing fragments

A custom parent queries one Rect description at two exact sizes. It places the smaller fragment twice and the larger fragment once. Placing a completed fragment does not run layout again; all three rectangles keep the same 3px stroke.

Use tree output with --stats to inspect allocations and layout queries. See Custom elements for the parent protocol and Rendering for the source-to-fragment pipeline.