0 | |
This patch is based on the upstream commit described below, adapted
|
1 | |
for use in the Debian package by Peter Michael Green.
|
2 | |
|
3 | |
commit 67ad0177d1efddfb4f5e7d6c451a9202a7ff2158
|
4 | |
Author: Violeta Hernández <eric.ivan.hdz@gmail.com>
|
5 | |
Date: Wed Jun 9 23:36:49 2021 -0500
|
6 | |
|
7 | |
Bump `arrayvec` to 0.7
|
8 | |
|
9 | |
only in patch2:
|
10 | |
Index: lyon-geom/src/cubic_bezier.rs
|
11 | |
===================================================================
|
12 | |
--- lyon-geom.orig/src/cubic_bezier.rs
|
13 | |
+++ lyon-geom/src/cubic_bezier.rs
|
14 | |
@@ -70,7 +70,7 @@ impl<S: Scalar> CubicBezierSegment<S> {
|
15 | |
|
16 | |
/// Return the parameter values corresponding to a given x coordinate.
|
17 | |
/// See also solve_t_for_x for monotonic curves.
|
18 | |
- pub fn solve_t_for_x(&self, x: S) -> ArrayVec<[S; 3]> {
|
19 | |
+ pub fn solve_t_for_x(&self, x: S) -> ArrayVec<S, 3> {
|
20 | |
if self.is_a_point(S::ZERO)
|
21 | |
|| (self.non_point_is_linear(S::ZERO) && self.from.x == self.to.x)
|
22 | |
{
|
23 | |
@@ -82,7 +82,7 @@ impl<S: Scalar> CubicBezierSegment<S> {
|
24 | |
|
25 | |
/// Return the parameter values corresponding to a given y coordinate.
|
26 | |
/// See also solve_t_for_y for monotonic curves.
|
27 | |
- pub fn solve_t_for_y(&self, y: S) -> ArrayVec<[S; 3]> {
|
28 | |
+ pub fn solve_t_for_y(&self, y: S) -> ArrayVec<S, 3> {
|
29 | |
if self.is_a_point(S::ZERO)
|
30 | |
|| (self.non_point_is_linear(S::ZERO) && self.from.y == self.to.y)
|
31 | |
{
|
32 | |
@@ -99,7 +99,7 @@ impl<S: Scalar> CubicBezierSegment<S> {
|
33 | |
ctrl1: S,
|
34 | |
ctrl2: S,
|
35 | |
to: S,
|
36 | |
- ) -> ArrayVec<[S; 3]> {
|
37 | |
+ ) -> ArrayVec<S, 3> {
|
38 | |
let mut result = ArrayVec::new();
|
39 | |
|
40 | |
let a = -from + S::THREE * ctrl1 - S::THREE * ctrl2 + to;
|
41 | |
@@ -321,10 +321,10 @@ impl<S: Scalar> CubicBezierSegment<S> {
|
42 | |
where
|
43 | |
F: FnMut(S),
|
44 | |
{
|
45 | |
- let mut x_extrema: ArrayVec<[S; 3]> = ArrayVec::new();
|
46 | |
+ let mut x_extrema: ArrayVec<S, 3> = ArrayVec::new();
|
47 | |
self.for_each_local_x_extremum_t(&mut|t| { x_extrema.push(t) });
|
48 | |
|
49 | |
- let mut y_extrema: ArrayVec<[S; 3]> = ArrayVec::new();
|
50 | |
+ let mut y_extrema: ArrayVec<S, 3> = ArrayVec::new();
|
51 | |
self.for_each_local_y_extremum_t(&mut|t| { y_extrema.push(t) });
|
52 | |
|
53 | |
let mut it_x = x_extrema.iter().cloned();
|
54 | |
@@ -654,15 +654,15 @@ impl<S: Scalar> CubicBezierSegment<S> {
|
55 | |
/// but not endpoint/endpoint intersections.
|
56 | |
///
|
57 | |
/// Returns no intersections if either curve is a point.
|
58 | |
- pub fn cubic_intersections_t(&self, curve: &CubicBezierSegment<S>) -> ArrayVec<[(S, S); 9]> {
|
59 | |
+ pub fn cubic_intersections_t(&self, curve: &CubicBezierSegment<S>) -> ArrayVec<(S, S), 9> {
|
60 | |
cubic_bezier_intersections_t(self, curve)
|
61 | |
}
|
62 | |
|
63 | |
/// Computes the intersection points (if any) between this segment and another one.
|
64 | |
- pub fn cubic_intersections(&self, curve: &CubicBezierSegment<S>) -> ArrayVec<[Point<S>; 9]> {
|
65 | |
+ pub fn cubic_intersections(&self, curve: &CubicBezierSegment<S>) -> ArrayVec<Point<S>, 9> {
|
66 | |
let intersections = self.cubic_intersections_t(curve);
|
67 | |
|
68 | |
- let mut result_with_repeats = ArrayVec::<[_; 9]>::new();
|
69 | |
+ let mut result_with_repeats = ArrayVec::<_, 9>::new();
|
70 | |
for (t, _) in intersections {
|
71 | |
result_with_repeats.push(self.sample(t));
|
72 | |
}
|
73 | |
@@ -718,12 +718,12 @@ impl<S: Scalar> CubicBezierSegment<S> {
|
74 | |
/// but not endpoint/endpoint intersections.
|
75 | |
///
|
76 | |
/// Returns no intersections if either curve is a point.
|
77 | |
- pub fn quadratic_intersections_t(&self, curve: &QuadraticBezierSegment<S>) -> ArrayVec<[(S, S); 9]> {
|
78 | |
+ pub fn quadratic_intersections_t(&self, curve: &QuadraticBezierSegment<S>) -> ArrayVec<(S, S), 9> {
|
79 | |
self.cubic_intersections_t(&curve.to_cubic())
|
80 | |
}
|
81 | |
|
82 | |
/// Computes the intersection points (if any) between this segment and a quadratic bézier segment.
|
83 | |
- pub fn quadratic_intersections(&self, curve: &QuadraticBezierSegment<S>) -> ArrayVec<[Point<S>; 9]> {
|
84 | |
+ pub fn quadratic_intersections(&self, curve: &QuadraticBezierSegment<S>) -> ArrayVec<Point<S>, 9> {
|
85 | |
self.cubic_intersections(&curve.to_cubic())
|
86 | |
}
|
87 | |
|
88 | |
@@ -732,7 +732,7 @@ impl<S: Scalar> CubicBezierSegment<S> {
|
89 | |
/// The result is provided in the form of the `t` parameters of each
|
90 | |
/// point along curve. To get the intersection points, sample the curve
|
91 | |
/// at the corresponding values.
|
92 | |
- pub fn line_intersections_t(&self, line: &Line<S>) -> ArrayVec<[S; 3]> {
|
93 | |
+ pub fn line_intersections_t(&self, line: &Line<S>) -> ArrayVec<S, 3> {
|
94 | |
if line.vector.square_length() < S::EPSILON {
|
95 | |
return ArrayVec::new();
|
96 | |
}
|
97 | |
@@ -768,7 +768,7 @@ impl<S: Scalar> CubicBezierSegment<S> {
|
98 | |
}
|
99 | |
|
100 | |
/// Computes the intersection points (if any) between this segment and a line.
|
101 | |
- pub fn line_intersections(&self, line: &Line<S>) -> ArrayVec<[Point<S>; 3]> {
|
102 | |
+ pub fn line_intersections(&self, line: &Line<S>) -> ArrayVec<Point<S>, 3> {
|
103 | |
let intersections = self.line_intersections_t(&line);
|
104 | |
|
105 | |
let mut result = ArrayVec::new();
|
106 | |
@@ -784,7 +784,7 @@ impl<S: Scalar> CubicBezierSegment<S> {
|
107 | |
/// The result is provided in the form of the `t` parameters of each
|
108 | |
/// point along curve and segment. To get the intersection points, sample
|
109 | |
/// the segments at the corresponding values.
|
110 | |
- pub fn line_segment_intersections_t(&self, segment: &LineSegment<S>) -> ArrayVec<[(S, S); 3]> {
|
111 | |
+ pub fn line_segment_intersections_t(&self, segment: &LineSegment<S>) -> ArrayVec<(S, S), 3> {
|
112 | |
if !self.fast_bounding_rect().intersects(&segment.bounding_rect()) {
|
113 | |
return ArrayVec::new();
|
114 | |
}
|
115 | |
@@ -821,7 +821,7 @@ impl<S: Scalar> CubicBezierSegment<S> {
|
116 | |
#[inline]
|
117 | |
pub fn to(&self) -> Point<S> { self.to }
|
118 | |
|
119 | |
- pub fn line_segment_intersections(&self, segment: &LineSegment<S>) -> ArrayVec<[Point<S>; 3]> {
|
120 | |
+ pub fn line_segment_intersections(&self, segment: &LineSegment<S>) -> ArrayVec<Point<S>, 3> {
|
121 | |
let intersections = self.line_segment_intersections_t(&segment);
|
122 | |
|
123 | |
let mut result = ArrayVec::new();
|
124 | |
@@ -1106,7 +1106,7 @@ fn test_monotonic() {
|
125 | |
#[test]
|
126 | |
fn test_line_segment_intersections() {
|
127 | |
use crate::math::point;
|
128 | |
- fn assert_approx_eq(a: ArrayVec<[(f32, f32); 3]>, b: &[(f32, f32)], epsilon: f32) {
|
129 | |
+ fn assert_approx_eq(a: ArrayVec<(f32, f32), 3>, b: &[(f32, f32)], epsilon: f32) {
|
130 | |
for i in 0..a.len() {
|
131 | |
if f32::abs(a[i].0 - b[i].0) > epsilon || f32::abs(a[i].1 - b[i].1) > epsilon {
|
132 | |
println!("{:?} != {:?}", a, b);
|
133 | |
@@ -1142,7 +1142,7 @@ fn test_line_segment_intersections() {
|
134 | |
#[test]
|
135 | |
fn test_parameters_for_value() {
|
136 | |
use crate::math::point;
|
137 | |
- fn assert_approx_eq(a: ArrayVec<[f32; 3]>, b: &[f32], epsilon: f32) {
|
138 | |
+ fn assert_approx_eq(a: ArrayVec<f32, 3>, b: &[f32], epsilon: f32) {
|
139 | |
for i in 0..a.len() {
|
140 | |
if f32::abs(a[i] - b[i]) > epsilon {
|
141 | |
println!("{:?} != {:?}", a, b);
|
142 | |
Index: lyon-geom/src/cubic_bezier_intersections.rs
|
143 | |
===================================================================
|
144 | |
--- lyon-geom.orig/src/cubic_bezier_intersections.rs
|
145 | |
+++ lyon-geom/src/cubic_bezier_intersections.rs
|
146 | |
@@ -23,7 +23,7 @@ use std::ops::Range;
|
147 | |
pub fn cubic_bezier_intersections_t<S: Scalar>(
|
148 | |
curve1: &CubicBezierSegment<S>,
|
149 | |
curve2: &CubicBezierSegment<S>,
|
150 | |
-) -> ArrayVec<[(S, S); 9]> {
|
151 | |
+) -> ArrayVec<(S, S), 9> {
|
152 | |
if !curve1.fast_bounding_rect().intersects(&curve2.fast_bounding_rect())
|
153 | |
|| curve1 == curve2
|
154 | |
|| (curve1.from == curve2.to
|
155 | |
@@ -89,7 +89,7 @@ fn point_curve_intersections<S: Scalar>(
|
156 | |
pt: &Point<S>,
|
157 | |
curve: &CubicBezierSegment<S>,
|
158 | |
epsilon: S,
|
159 | |
-) -> ArrayVec<[S; 9]> {
|
160 | |
+) -> ArrayVec<S, 9> {
|
161 | |
let mut result = ArrayVec::new();
|
162 | |
|
163 | |
// (If both endpoints are epsilon close, we only return S::ZERO.)
|
164 | |
@@ -139,7 +139,7 @@ fn point_curve_intersections<S: Scalar>(
|
165 | |
// diagonally just outside the hull. This is a rare case (could we even ignore it?).
|
166 | |
#[inline]
|
167 | |
fn maybe_add<S: Scalar>(t: S, pt: &Point<S>, curve: &CubicBezierSegment<S>, epsilon: S,
|
168 | |
- result: &mut ArrayVec<[S; 9]>) -> bool
|
169 | |
+ result: &mut ArrayVec<S, 9>) -> bool
|
170 | |
{
|
171 | |
if (curve.sample(t) - *pt).square_length() < epsilon {
|
172 | |
result.push(t);
|
173 | |
@@ -160,7 +160,7 @@ fn line_curve_intersections<S: Scalar>(
|
174 | |
line_as_curve: &CubicBezierSegment<S>,
|
175 | |
curve: &CubicBezierSegment<S>,
|
176 | |
flip: bool,
|
177 | |
-) -> ArrayVec<[(S, S); 9]> {
|
178 | |
+) -> ArrayVec<(S, S), 9> {
|
179 | |
let mut result = ArrayVec::new();
|
180 | |
let baseline = line_as_curve.baseline();
|
181 | |
let curve_intersections = curve.line_intersections_t(&baseline.to_line());
|
182 | |
@@ -186,7 +186,7 @@ fn line_curve_intersections<S: Scalar>(
|
183 | |
fn line_line_intersections<S: Scalar>(
|
184 | |
curve1: &CubicBezierSegment<S>,
|
185 | |
curve2: &CubicBezierSegment<S>,
|
186 | |
-) -> ArrayVec<[(S, S); 9]> {
|
187 | |
+) -> ArrayVec<(S, S), 9> {
|
188 | |
let mut result = ArrayVec::new();
|
189 | |
|
190 | |
let intersection = curve1.baseline().to_line().intersection(&curve2.baseline().to_line());
|
191 | |
@@ -200,7 +200,7 @@ fn line_line_intersections<S: Scalar>(
|
192 | |
fn parameters_for_line_point<S: Scalar>(
|
193 | |
curve: &CubicBezierSegment<S>,
|
194 | |
pt: &Point<S>,
|
195 | |
- ) -> ArrayVec<[S; 3]> {
|
196 | |
+ ) -> ArrayVec<S, 3> {
|
197 | |
let line_is_mostly_vertical =
|
198 | |
S::abs(curve.from.y - curve.to.y) >= S::abs(curve.from.x - curve.to.x);
|
199 | |
if line_is_mostly_vertical {
|
200 | |
@@ -245,7 +245,7 @@ fn add_curve_intersections<S: Scalar>(
|
201 | |
curve2: &CubicBezierSegment<S>,
|
202 | |
domain1: &Range<S>,
|
203 | |
domain2: &Range<S>,
|
204 | |
- intersections: &mut ArrayVec<[(S, S); 9]>,
|
205 | |
+ intersections: &mut ArrayVec<(S, S), 9>,
|
206 | |
flip: bool,
|
207 | |
mut recursion_count: u32,
|
208 | |
mut call_count: u32,
|
209 | |
@@ -388,7 +388,7 @@ fn add_point_curve_intersection<S: Scala
|
210 | |
curve: &CubicBezierSegment<S>,
|
211 | |
pt_domain: &Range<S>,
|
212 | |
curve_domain: &Range<S>,
|
213 | |
- intersections: &mut ArrayVec<[(S, S); 9]>,
|
214 | |
+ intersections: &mut ArrayVec<(S, S), 9>,
|
215 | |
flip: bool,
|
216 | |
) {
|
217 | |
let pt = pt_curve.from;
|
218 | |
@@ -466,7 +466,7 @@ fn add_intersection<S: Scalar>(
|
219 | |
t2: S,
|
220 | |
orig_curve2: &CubicBezierSegment<S>,
|
221 | |
flip: bool,
|
222 | |
- intersections: &mut ArrayVec<[(S, S); 9]>,
|
223 | |
+ intersections: &mut ArrayVec<(S, S), 9>,
|
224 | |
) {
|
225 | |
let (t1, t2) = if flip { (t2, t1) } else { (t1, t2) };
|
226 | |
// (This should probably depend in some way on how large our input coefficients are.)
|
227 | |
Index: lyon-geom/src/monotonic.rs
|
228 | |
===================================================================
|
229 | |
--- lyon-geom.orig/src/monotonic.rs
|
230 | |
+++ lyon-geom/src/monotonic.rs
|
231 | |
@@ -128,7 +128,7 @@ impl<S: Scalar> Monotonic<QuadraticBezie
|
232 | |
&self, self_t_range: Range<S>,
|
233 | |
other: &Self, other_t_range: Range<S>,
|
234 | |
tolerance: S,
|
235 | |
- ) -> ArrayVec<[(S, S);2]> {
|
236 | |
+ ) -> ArrayVec<(S, S),2> {
|
237 | |
monotonic_segment_intersecions(
|
238 | |
self, self_t_range,
|
239 | |
other, other_t_range,
|
240 | |
@@ -140,7 +140,7 @@ impl<S: Scalar> Monotonic<QuadraticBezie
|
241 | |
&self, self_t_range: Range<S>,
|
242 | |
other: &Self, other_t_range: Range<S>,
|
243 | |
tolerance: S,
|
244 | |
- ) -> ArrayVec<[Point<S>;2]> {
|
245 | |
+ ) -> ArrayVec<Point<S>,2> {
|
246 | |
let intersections = monotonic_segment_intersecions(
|
247 | |
self, self_t_range,
|
248 | |
other, other_t_range,
|
249 | |
@@ -348,7 +348,7 @@ pub(crate) fn monotonic_segment_intersec
|
250 | |
a: &A, a_t_range: Range<S>,
|
251 | |
b: &B, b_t_range: Range<S>,
|
252 | |
tolerance: S,
|
253 | |
-) -> ArrayVec<[(S, S); 2]>
|
254 | |
+) -> ArrayVec<(S, S), 2>
|
255 | |
where
|
256 | |
A: Segment<Scalar=S> + MonotonicSegment<Scalar=S> + BoundingRect<Scalar=S>,
|
257 | |
B: Segment<Scalar=S> + MonotonicSegment<Scalar=S> + BoundingRect<Scalar=S>,
|
258 | |
Index: lyon-geom/src/quadratic_bezier.rs
|
259 | |
===================================================================
|
260 | |
--- lyon-geom.orig/src/quadratic_bezier.rs
|
261 | |
+++ lyon-geom/src/quadratic_bezier.rs
|
262 | |
@@ -444,7 +444,7 @@ impl<S: Scalar> QuadraticBezierSegment<S
|
263 | |
/// The result is provided in the form of the `t` parameters of each
|
264 | |
/// point along curve. To get the intersection points, sample the curve
|
265 | |
/// at the corresponding values.
|
266 | |
- pub fn line_intersections_t(&self, line: &Line<S>) -> ArrayVec<[S; 2]> {
|
267 | |
+ pub fn line_intersections_t(&self, line: &Line<S>) -> ArrayVec<S, 2> {
|
268 | |
// TODO: a specific quadratic bézier vs line intersection function
|
269 | |
// would allow for better performance.
|
270 | |
let intersections = self.to_cubic().line_intersections_t(line);
|
271 | |
@@ -458,7 +458,7 @@ impl<S: Scalar> QuadraticBezierSegment<S
|
272 | |
}
|
273 | |
|
274 | |
/// Computes the intersection points (if any) between this segment a line.
|
275 | |
- pub fn line_intersections(&self, line: &Line<S>) -> ArrayVec<[Point<S>;2]> {
|
276 | |
+ pub fn line_intersections(&self, line: &Line<S>) -> ArrayVec<Point<S>,2]> {
|
277 | |
let intersections = self.to_cubic().line_intersections_t(line);
|
278 | |
|
279 | |
let mut result = ArrayVec::new();
|
280 | |
@@ -474,7 +474,7 @@ impl<S: Scalar> QuadraticBezierSegment<S
|
281 | |
/// The result is provided in the form of the `t` parameters of each
|
282 | |
/// point along curve and segment. To get the intersection points, sample
|
283 | |
/// the segments at the corresponding values.
|
284 | |
- pub fn line_segment_intersections_t(&self, segment: &LineSegment<S>) -> ArrayVec<[(S, S); 2]> {
|
285 | |
+ pub fn line_segment_intersections_t(&self, segment: &LineSegment<S>) -> ArrayVec<(S, S), 2> {
|
286 | |
// TODO: a specific quadratic bézier vs line intersection function
|
287 | |
// would allow for better performance.
|
288 | |
let intersections = self.to_cubic().line_segment_intersections_t(&segment);
|
289 | |
@@ -495,7 +495,7 @@ impl<S: Scalar> QuadraticBezierSegment<S
|
290 | |
pub fn to(&self) -> Point<S> { self.to }
|
291 | |
|
292 | |
/// Computes the intersection points (if any) between this segment a line segment.
|
293 | |
- pub fn line_segment_intersections(&self, segment: &LineSegment<S>) -> ArrayVec<[Point<S>; 2]> {
|
294 | |
+ pub fn line_segment_intersections(&self, segment: &LineSegment<S>) -> ArrayVec<Point<S>, 2> {
|
295 | |
let intersections = self.to_cubic().line_segment_intersections_t(&segment);
|
296 | |
assert!(intersections.len() <= 2);
|
297 | |
|
298 | |
Index: lyon-geom/src/utils.rs
|
299 | |
===================================================================
|
300 | |
--- lyon-geom.orig/src/utils.rs
|
301 | |
+++ lyon-geom/src/utils.rs
|
302 | |
@@ -50,7 +50,7 @@ pub fn directed_angle2<S: Scalar>(center
|
303 | |
directed_angle(a - center, b - center)
|
304 | |
}
|
305 | |
|
306 | |
-pub fn cubic_polynomial_roots<S: Scalar>(a: S, b: S, c: S, d: S) -> ArrayVec<[S; 3]> {
|
307 | |
+pub fn cubic_polynomial_roots<S: Scalar>(a: S, b: S, c: S, d: S) -> ArrayVec<S, 3> {
|
308 | |
let mut result = ArrayVec::new();
|
309 | |
|
310 | |
if S::abs(a) < S::EPSILON {
|
311 | |
@@ -112,7 +112,7 @@ pub fn cubic_polynomial_roots<S: Scalar>
|
312 | |
|
313 | |
#[test]
|
314 | |
fn cubic_polynomial() {
|
315 | |
- fn assert_approx_eq(a: ArrayVec<[f32; 3]>, b: &[f32], epsilon: f32) {
|
316 | |
+ fn assert_approx_eq(a: ArrayVec<f32, 3>, b: &[f32], epsilon: f32) {
|
317 | |
for i in 0..a.len() {
|
318 | |
if f32::abs(a[i] - b[i]) > epsilon {
|
319 | |
println!("{:?} != {:?}", a, b);
|
320 | |
Index: lyon-geom/Cargo.toml
|
321 | |
===================================================================
|
322 | |
--- lyon-geom.orig/Cargo.toml
|
323 | |
+++ lyon-geom/Cargo.toml
|
324 | |
@@ -24,7 +24,7 @@ repository = "https://github.com/nical/l
|
325 | |
[lib]
|
326 | |
name = "lyon_geom"
|
327 | |
[dependencies.arrayvec]
|
328 | |
-version = "0.5"
|
329 | |
+version = "0.7"
|
330 | |
|
331 | |
[dependencies.euclid]
|
332 | |
version = "0.20.0"
|
333 | |
Index: lyon-geom/src/cubic_to_quadratic.rs
|
334 | |
===================================================================
|
335 | |
--- lyon-geom.orig/src/cubic_to_quadratic.rs
|
336 | |
+++ lyon-geom/src/cubic_to_quadratic.rs
|
337 | |
@@ -95,7 +95,7 @@ fn make_monotonic<S: Scalar>(curve: &Qua
|
338 | |
/*
|
339 | |
pub struct MonotonicQuadraticBezierSegments<S> {
|
340 | |
curve: CubicBezierSegment<S>,
|
341 | |
- splits: ArrayVec<[S; 4]>,
|
342 | |
+ splits: ArrayVec<S, 4>,
|
343 | |
t0: S,
|
344 | |
idx: u8,
|
345 | |
}
|
346 | |
Index: lyon-geom/src/flatten_cubic.rs
|
347 | |
===================================================================
|
348 | |
--- lyon-geom.orig/src/flatten_cubic.rs
|
349 | |
+++ lyon-geom/src/flatten_cubic.rs
|
350 | |
@@ -30,7 +30,7 @@ impl<S: Scalar> Flattened<S> {
|
351 | |
/// Creates an iterator that yields points along a cubic bezier segment, useful to build a
|
352 | |
/// flattened approximation of the curve given a certain tolerance.
|
353 | |
pub fn new(bezier: CubicBezierSegment<S>, tolerance: S) -> Self {
|
354 | |
- let mut inflections: ArrayVec<[S; 2]> = ArrayVec::new();
|
355 | |
+ let mut inflections: ArrayVec<S, 2> = ArrayVec::new();
|
356 | |
find_cubic_bezier_inflection_points(&bezier, &mut|t| { inflections.push(t); });
|
357 | |
|
358 | |
let mut iter = Flattened {
|
359 | |
@@ -121,7 +121,7 @@ pub fn flatten_cubic_bezier<S: Scalar, F
|
360 | |
tolerance: S,
|
361 | |
call_back: &mut F,
|
362 | |
) {
|
363 | |
- let mut inflections: ArrayVec<[S; 2]> = ArrayVec::new();
|
364 | |
+ let mut inflections: ArrayVec<S, 2> = ArrayVec::new();
|
365 | |
find_cubic_bezier_inflection_points(&bezier, &mut|t| { inflections.push(t); });
|
366 | |
|
367 | |
if let Some(&t1) = inflections.get(0) {
|
368 | |
@@ -142,7 +142,7 @@ pub fn flatten_cubic_bezier_with_t<S: Sc
|
369 | |
tolerance: S,
|
370 | |
call_back: &mut F,
|
371 | |
) {
|
372 | |
- let mut inflections: ArrayVec<[S; 2]> = ArrayVec::new();
|
373 | |
+ let mut inflections: arrayvec<S, 2> = ArrayVec::new();
|
374 | |
find_cubic_bezier_inflection_points(&bezier, &mut|t| { inflections.push(t); });
|
375 | |
|
376 | |
let mut t = S::ZERO;
|