Ask for a slice of segments instead of ownership in LineDash
This commit is contained in:
parent
76c03de587
commit
f56c8a7361
5 changed files with 26 additions and 26 deletions
|
|
@ -100,14 +100,14 @@ impl canvas::Program<Message> for Clock {
|
|||
|
||||
let wide_stroke = Stroke {
|
||||
width: thin_stroke.width * 3.0,
|
||||
..thin_stroke.clone()
|
||||
..thin_stroke
|
||||
};
|
||||
|
||||
frame.translate(Vector::new(center.x, center.y));
|
||||
|
||||
frame.with_save(|frame| {
|
||||
frame.rotate(hand_rotation(self.now.hour(), 12));
|
||||
frame.stroke(&short_hand, wide_stroke.clone());
|
||||
frame.stroke(&short_hand, wide_stroke);
|
||||
});
|
||||
|
||||
frame.with_save(|frame| {
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ impl<Message> canvas::Program<Message> for State {
|
|||
color: Color::from_rgba8(0, 153, 255, 0.1),
|
||||
line_dash: canvas::LineDash {
|
||||
offset: 0,
|
||||
segments: vec![3.0, 6.0],
|
||||
segments: &[3.0, 6.0],
|
||||
},
|
||||
..Stroke::default()
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue