summaryrefslogtreecommitdiffstats
path: root/graphics/src/widget/canvas/path.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2022-07-11 18:22:04 +0200
committerLibravatar GitHub <noreply@github.com>2022-07-11 18:22:04 +0200
commit1404b88ea6ecf5b082d5c33d5f17dc15ce70b310 (patch)
tree6bb6c6159f8d5c08e4dc996720f51e6638fd34ac /graphics/src/widget/canvas/path.rs
parentd1505a98d967f36679f8b7d98347ba03a4c2af1c (diff)
parentf7059a1c9a6ce46ba833400dde860912da780464 (diff)
downloadiced-1404b88ea6ecf5b082d5c33d5f17dc15ce70b310.tar.gz
iced-1404b88ea6ecf5b082d5c33d5f17dc15ce70b310.tar.bz2
iced-1404b88ea6ecf5b082d5c33d5f17dc15ce70b310.zip
Merge pull request #1384 from iced-rs/update-lyon
Update `lyon` to `1.0`
Diffstat (limited to 'graphics/src/widget/canvas/path.rs')
-rw-r--r--graphics/src/widget/canvas/path.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/graphics/src/widget/canvas/path.rs b/graphics/src/widget/canvas/path.rs
index f834e286..608507ad 100644
--- a/graphics/src/widget/canvas/path.rs
+++ b/graphics/src/widget/canvas/path.rs
@@ -10,7 +10,7 @@ pub use builder::Builder;
use crate::canvas::LineDash;
use iced_native::{Point, Size};
-use lyon::algorithms::walk::{walk_along_path, RepeatedPattern};
+use lyon::algorithms::walk::{walk_along_path, RepeatedPattern, WalkerEvent};
use lyon::path::iterator::PathIterator;
/// An immutable set of points that may or may not be connected.
@@ -81,13 +81,12 @@ pub(super) fn dashed(path: &Path, line_dash: LineDash<'_>) -> Path {
walk_along_path(
path.raw().iter().flattened(0.01),
0.0,
+ lyon::tessellation::StrokeOptions::DEFAULT_TOLERANCE,
&mut RepeatedPattern {
- callback: |position: lyon::algorithms::math::Point,
- _tangent,
- _distance| {
+ callback: |event: WalkerEvent<'_>| {
let point = Point {
- x: position.x,
- y: position.y,
+ x: event.position.x,
+ y: event.position.y,
};
if draw_line {