From 642485c0b1dd87612b5a43dfd04a559b5d73240b Mon Sep 17 00:00:00 2001 From: Ivor Hewitt Date: Thu, 12 Aug 2021 09:55:50 +0100 Subject: [PATCH] Adjust hand lengths to be relative to tick marks --- apps/boldclk/bold_clock.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/boldclk/bold_clock.js b/apps/boldclk/bold_clock.js index 191b6ec4f..4358b2e29 100644 --- a/apps/boldclk/bold_clock.js +++ b/apps/boldclk/bold_clock.js @@ -23,6 +23,10 @@ tick5.fillRect(0,0,tick5.getWidth()-1, tick5.getHeight()-1); let tick1 = Graphics.createArrayBuffer(8,4,1,{msb:true}); tick1.fillRect(0,0,tick1.getWidth()-1, tick1.getHeight()-1); +// Adjust hand lengths to be within 'tick' points +minute_hand.width=radius-tick1.getWidth()-6; +hour_hand.width=radius-tick5.getWidth()-6; + function big_wheel_x(angle){ return clock_center.x + radius * Math.cos(angle*p180); }