summaryrefslogtreecommitdiffstats
path: root/wgpu
diff options
context:
space:
mode:
Diffstat (limited to 'wgpu')
-rw-r--r--wgpu/src/widget/canvas/frame.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/wgpu/src/widget/canvas/frame.rs b/wgpu/src/widget/canvas/frame.rs
index f04c6e78..f22d7887 100644
--- a/wgpu/src/widget/canvas/frame.rs
+++ b/wgpu/src/widget/canvas/frame.rs
@@ -127,11 +127,13 @@ impl Frame {
///
/// [`Path`]: path/struct.Path.html
/// [`Frame`]: struct.Frame.html
- pub fn stroke(&mut self, path: &Path, stroke: Stroke) {
+ pub fn stroke(&mut self, path: &Path, stroke: impl Into<Stroke>) {
use lyon::tessellation::{
BuffersBuilder, StrokeOptions, StrokeTessellator,
};
+ let stroke = stroke.into();
+
let mut buffers = BuffersBuilder::new(
&mut self.buffers,
StrokeVertex(stroke.color.into_linear()),