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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
// Copyright 2025 the Vello Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT
//! A collection of vector graphics paths, for use in 2d rendering.
//!
//! This is an internal implementation detail of [`Scene`](crate::Scene).
//! If you're a consumer of Vello API writing an application, you do not need to use this API.
//! Instead, this is exposed for use by renderers.
//!
//! This design has been made with "path caching" in mind, which will allow using rasterised forms of
//! paths (such as glyphs) directly in the renderer, instead of rasterising from scratch each frame.
//! This can massively improve performance and efficiency on subsequent frames.
//! This is however not implemented by any backend, so isn't provided for in Vello API.
//! It also ensures that there are very few per-frame allocations (i.e. avoids allocating
//! for each path).
use Vec;
use ;
use crateExactPathElements;
/// The id for a single path within a given [`PathSet`].
/// This is an index into the [`meta`](PathSet::meta) field.
// In a future world with path caching, this would be paired with a path group id.
// For "scene-local" paths, you would then use a marker "local" path group id.
;
/// A collection of filled or stroked paths, each associated with an id.
///
/// As noted in the [module level documentation](crate::paths), this type is an implementation
/// detail of [`Scene`](crate::Scene).
/// As such, the fields are public, allowing implementations of Vello API to read the contained paths.
///
/// This representation of paths is not simply the path points (as in, for example, an svg "path" attribute).
/// Instead, this also contains the attributes which describe the shape for which the
/// path points provide the outline.
/// That is, the elements of this type are either a filled shape, or a stroked path,
/// without any brush information.
/// Each `Scene` stores a sequence of these, with the associated brush, to create a 2d scene.
///
/// This separation is designed for a future path caching mechanism, where the rasterised geometry
/// of a path can be computed once, then re-used with multiple brushed, to increase efficiency.
/// Note however that this plan is not proven in the current version of Vello API.
// The same "reason about visibility" comment applies as in `Scene`
/// Metadata about a single path in a [`PathSet`].