You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • What I want to achieve is a 16 bit full-screen clockface.

    When the minute hand moves from say 0 to 1 am looking for an efficient way (both CPU and RAM efficient) to restore the area that has been overwritten

    The code I'd posted a few posts back would do that, and the ability to restrict the bounds you draw to just the area including the old and new hands would get the redrawn area down to something sensible. Obviously it's not as efficient as something purpose built, but I feel it's 'good enough' and it's also really flexible.

    But the best way to explain is with an example, so here's an analog clock with an image background, no flicker, and that's fast enough to include a second hand:

    https://github.com/espruino/BangleApps/commit/50a2df66d9835632bdddb0b5a44ba95ad9f651be

    If someone feels like a fun project it'd be nice to use the 'customiser' from the background image clock (https://github.com/espruino/BangleApps/tree/master/apps/imgclock) and add it here, so we could have a single clock with multiple different backgrounds.

    I'm definitely up for ways to boost the performance of drawImage and drawImages (without increasing memory usage too much) though.

About

Avatar for Gordon @Gordon started