Merge pull request #1225 from tarkah/feat/canvas-line-dash

Add line dash API
This commit is contained in:
Héctor Ramón 2022-02-04 14:44:08 +07:00 committed by GitHub
commit c15701581e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 80 additions and 10 deletions

View file

@ -163,6 +163,10 @@ impl<Message> canvas::Program<Message> for State {
Stroke {
width: 1.0,
color: Color::from_rgba8(0, 153, 255, 0.1),
line_dash: canvas::LineDash {
offset: 0,
segments: &[3.0, 6.0],
},
..Stroke::default()
},
);