Each item placed once, shared by the drawing and the keyboard (spec/11 §5.5), copied
from visualize's Visualize.Chart.Placements (#811, #1064, D-202).
A realization that draws the Frame places every layer of a cartesian model once
(Macaw.Frame.Layer.Read.pixels/3, the layer's pixel columns by channel) as the layer
is drawn, and the drawing holds that placement: the kind draws from it, the summary's
contribution reads it, and the keyboard's points read their positions from it by index.
new/1 answers it, %{layer index => %{layer, table, read}}: the checked layer, the
rows it was placed over, and their pixels, never transposed to a row each.
A reader uses an entry only for the same layer over the same rows (fetch/2, a
term compared with itself is one comparison, not a walk), and places anything else
itself: a facet's panels, a polar or geographic model, a layer of another realization.
So a placement is a saving and never a different answer.
Summary
Functions
The pixels of entry's layer when placements placed that same layer over those same
rows (a drawn layer's %{index, layer, table}), else nil.
Each data layer's items of a realized Frame placed once (§5.5): the placements its
drawing made, by layer index. A value with no drawing places nothing: %{}.
Types
@type entry() :: %{ layer: map(), table: Macaw.Data.Table.t(), read: Macaw.Frame.Layer.Read.t() }
@type t() :: %{optional(non_neg_integer()) => entry()}
Functions
@spec fetch(t() | nil, map()) :: Macaw.Frame.Layer.Read.t() | nil
The pixels of entry's layer when placements placed that same layer over those same
rows (a drawn layer's %{index, layer, table}), else nil.
Each data layer's items of a realized Frame placed once (§5.5): the placements its
drawing made, by layer index. A value with no drawing places nothing: %{}.