1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//! The mark on an egui painter (DESIGN §11) — the **third** emission of the one
//! walk in [`super`], and the only one that runs every frame.
//!
//! The other two build an artifact once: the window-icon raster and the
//! checked-in SVG both state the mark at rest. This one states it *live* — one
//! circle per agent, hue = what that agent is doing — so it is walked with a
//! [`Tints`] the caller assembled, and it must be cheap enough to run at the
//! §7.2 repaint cadence.
//!
//! **Each primitive is handed to egui as the thing it is.** A trace names a
//! centreline and a width, so it goes out as a stroked polyline and egui's own
//! tessellator does the joins and the antialiasing; the lune is a lens — convex,
//! because its two arcs bow apart — so it goes out as one filled polygon; a disc
//! is a circle. Nothing here re-derives an edge or re-decides a hue: the walk
//! settled both, and this file only chooses egui's word for each shape.
//!
//! Why not the rasterizer's pixels, uploaded as a texture: it is a
//! shapes×pixels sweep, tens of milliseconds for one 64 px image, and a live
//! mark would pay that on the render thread every time an agent changed what it
//! was doing — the one thing §7.2 does not allow. The vector path is the cheap
//! one *and* the crisp one at the ~28 pt this is drawn at.
use mark_with;
use ;
/// Paint the mark into `rect`, every circle at the hue `tints` gives it.
///
/// The unit square the walk works in maps to the largest centred square `rect`
/// holds, so a seat that hands over a non-square rect gets the mark centred in
/// it rather than stretched — the mark is round and a stretched one is a
/// different picture.