From f3a471f4773eab77c1f2c53f9a739e3dd473faa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Desr=C3=A9?= Date: Thu, 14 Sep 2023 16:04:19 -0700 Subject: [PATCH] Update lyon_geom to 1.0 --- Cargo.toml | 4 ++-- src/draw_target.rs | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0450591..0bb71d1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ authors = ["Jeff Muizelaar "] edition = "2018" name = "raqote" -version = "0.8.2" +version = "0.8.3" description = "2D graphics library" license = "BSD-3-Clause" repository = "https://github.com/jrmuizel/raqote" @@ -14,7 +14,7 @@ categories = ["graphics"] [dependencies] euclid = "0.22" font-kit = { version = "0.11", optional = true } -lyon_geom = "0.17" +lyon_geom = "1.0" pathfinder_geometry = { version = "0.5", optional = true } png = { version = "0.17", optional = true } typed-arena = "2.0" diff --git a/src/draw_target.rs b/src/draw_target.rs index 8206a5d..5a9e095 100644 --- a/src/draw_target.rs +++ b/src/draw_target.rs @@ -8,7 +8,6 @@ use crate::geom::*; use crate::path_builder::*; pub use crate::path_builder::Winding; -use lyon_geom::cubic_to_quadratic::cubic_to_quadratics; use lyon_geom::CubicBezierSegment; #[cfg(feature = "text")] @@ -500,7 +499,7 @@ impl + AsMut<[u32]>> DrawTarget { ctrl2: cpt2, to: pt, }; - cubic_to_quadratics(&c, 0.01, &mut |q| { + c.for_each_quadratic_bezier(0.01, &mut |q| { let curve = [q.from, q.ctrl, q.to]; self.add_quad(curve); });