Skip to content

Commit 00616fe

Browse files
authored
Merge pull request #122 from elwerene/set-canvas-line-width
set line width in canvas backend
2 parents af02b2b + d7d7276 commit 00616fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/drawing/backend_impl/canvas.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ impl DrawingBackend for CanvasBackend {
112112
return Ok(());
113113
}
114114

115-
self.context
116-
.set_stroke_style(&make_canvas_color(style.as_color()));
115+
self.context.set_stroke_style(&make_canvas_color(style.as_color()));
116+
self.context.set_line_width(style.stroke_width() as f64);
117117
self.context.begin_path();
118118
self.context.move_to(f64::from(from.0), f64::from(from.1));
119119
self.context.line_to(f64::from(to.0), f64::from(to.1));

0 commit comments

Comments
 (0)