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
//! Geometry, paths, affine transforms and colours shared by every pltrs crate.
//!
//! This crate is the vocabulary of pltrs. It deliberately mirrors the
//! semantics of matplotlib's `transforms.Affine2D`, `transforms.Bbox` and
//! `path.Path` so that higher layers can follow matplotlib's algorithms
//! faithfully:
//!
//! * [`Point`] — a 2-D point / vector in `f64`.
//! * [`Affine2D`] — an affine map with matplotlib's "append" composition
//! order (`Affine2D::identity().scale(2.0, 2.0).rotate_deg(90.0)` scales
//! first, then rotates).
//! * [`Bbox`] — a possibly-inverted axis-aligned box (`x0` may exceed `x1`).
//! * [`Path`] — vertices plus optional [`PathCode`]s, iterated as
//! [`Segment`]s; see [`path`] for matplotlib's unit shapes, containment,
//! intersection, clipping and extents queries, and [`path::convert`] for
//! the conditioning pipeline every backend runs before drawing
//! (NaN removal, clipping, snapping, simplification, curve flattening,
//! sketching).
//! * [`alloc`] — allocations that fail as errors ([`alloc::OutOfMemory`],
//! matplotlib's `MemoryError`) instead of ending the process.
//! * [`archive`] — values written to bytes and read back exactly (what
//! pickling a figure rests on).
//! * [`bezier`] — evaluation, subdivision and extrema of Bézier curves.
//! * `fuzz` (with the feature `fuzzing`) — the harness of the workspace's
//! robustness tests.
//! * [`hatch`] — matplotlib's hatch patterns.
//! * [`interned`] — run-time strings kept as `&'static str`.
//! * [`json`] — JSON values, read as Python's `json` module writes them
//! (the spec's goldens) or strictly by RFC 8259 (untrusted messages),
//! and written back.
//! * [`numeric`] — Python's and numpy's float semantics (`divmod`, `%`,
//! `min`/`max`, `minimum`/`maximum`, `sign`, `linspace`) that
//! matplotlib's results depend on, as the binaries pltrs reproduces
//! compute them: the copy of numpy's loops a processor runs
//! ([`numeric::CpuLevel`]), the products their compiler fuses
//! ([`numeric::Contraction`]), and numpy's own ufuncs where a last bit
//! decides something discrete ([`numeric::Ufunc`]).
//! * [`os`] — the conventions that differ between Linux, macOS and
//! Windows (programs on `PATH`, resolved paths), as functions of the
//! system so that each is tested on any.
//! * [`pyfmt`] — Python's float formatting (`repr`, `%`-formatting and the
//! `str.format` mini-language), which matplotlib's labels and documents
//! are written with.
//! * [`rng`] — the `SplitMix64` generator behind pltrs's reproducible
//! pseudo-random streams.
//! * [`Rgba`] — a straight-alpha colour with components in `[0, 1]`.
//! * [`stack`] — room on the thread's stack for work that goes deep: on a
//! thread of its own where the caller's stack is short.
//! * [`state`] — the state pltrs keeps where matplotlib keeps
//! process-wide variables: per thread ([`thread_state!`]), unless
//! threads work with one [`state::State`] together.
pub use Affine2D;
pub use ;
pub use Rgba;
pub use interned;
pub use ;
pub use Point;