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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
//! Artist scene graph and drawable primitives for rizzma.
//!
//! Defines the [`Artist`] trait every drawable implements plus the concrete
//! primitives [`Line2D`] and [`Patch`]. An [`Artist`] knows how to
//! [`draw`](Artist::draw) itself into a [`Renderer`] given a data-to-device
//! [`Affine2D`], and reports a [`zorder`](Artist::zorder),
//! [`visibility`](Artist::visible), and optional data-space
//! [`extents`](Artist::data_extents) for future autoscaling.
//!
//! `hatch` is deferred to follow-up work; this crate currently ships the trait
//! plus `Line2D`, the `Patch` shape hierarchy, point [`MarkerStyle`]s, the
//! batched scatter [`Collection`], the colormapped raster [`AxesImage`], the
//! colormapped [`QuadMesh`] (`pcolormesh`), and a small [`draw_artists`] scene
//! helper.
//!
//! Build-order home: Phase 5 of `design/04-implementation-plan.md`.
pub use Collection;
pub use AxesImage;
pub use Line2D;
pub use MarkerStyle;
pub use Patch;
pub use QuadMesh;
pub use crate;
pub use crate;
/// A drawable scene element.
///
/// Mirrors matplotlib's `Artist`: every visual is an [`Artist`] that draws
/// itself through a [`Renderer`] using a data-to-device [`Affine2D`]. The trait
/// is deliberately minimal — only [`draw`](Artist::draw) is required, and the
/// rest carry matplotlib-flavored defaults.
/// Draw `artists` into `renderer` in ascending [`zorder`](Artist::zorder),
/// skipping any that are not [`visible`](Artist::visible).
///
/// The sort is stable, so artists sharing a zorder draw in their original
/// order, matching matplotlib's behavior.
///
// TODO: arena/Figure ownership — this flat slice is a stepping stone to the
// Figure-owned arena tree that will own and order artists in a later PR.