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
use crateDrawCommand;
/// An immutable, ordered list of [`DrawCommand`]s captured during one paint pass.
///
/// A `Picture` can be replayed many times (scrolling, animations) without calling
/// any widget's `paint()` method again — this is the foundation of the cached
/// repaint model.
/// Accumulates [`DrawCommand`]s during the paint pass, then produces a [`Picture`].
///
/// `PaintCtx` holds a `&mut PictureRecorder`. Every drawing helper on `PaintCtx`
/// pushes a command here instead of writing pixels. After the full tree has been
/// painted, call [`finish`] to seal the recording.