The time to draw the dial on a Bangle2 (with radius 88 rather that 120) with the code above took 376ms. The time using a version of drawRotRect that does not use transformVertices was 490ms - or 114ms slower. Timed using:
var tt = Date.now();
dial();
console.log("Time: "+Math.ceil(Date.now()-tt)+"ms");
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
The time to draw the dial on a Bangle2 (with radius 88 rather that 120) with the code above took 376ms. The time using a version of
drawRotRect
that does not usetransformVertices
was 490ms - or 114ms slower. Timed using: