From 08da96c1c6f52ec35fb8844d93bd2b5582c9abb8 Mon Sep 17 00:00:00 2001 From: Marli Frost Date: Wed, 1 Apr 2020 23:02:33 +0100 Subject: Scale the clock hands to the same size as the face --- examples/clock/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/clock/src/main.rs') diff --git a/examples/clock/src/main.rs b/examples/clock/src/main.rs index d3a4261b..66c311b5 100644 --- a/examples/clock/src/main.rs +++ b/examples/clock/src/main.rs @@ -133,7 +133,7 @@ impl canvas::Drawable for LocalTime { frame.stroke( &hour_and_minute_hands, canvas::Stroke { - width: 6.0, + width: radius / 100. * 3., color: Color::WHITE, line_cap: canvas::LineCap::Round, ..canvas::Stroke::default() @@ -148,7 +148,7 @@ impl canvas::Drawable for LocalTime { frame.stroke( &second_hand, canvas::Stroke { - width: 3.0, + width: radius / 100., color: Color::WHITE, line_cap: canvas::LineCap::Round, ..canvas::Stroke::default() -- cgit