You can just use the library to draw an arc like this:
g.clear(); const GU = require("graphics_utils"); let centreX = 0.5 * g.getWidth(); let centreY = 0.5 * g.getWidth(); let startAngle = GU.degreesToRadians(20); let endAngle = GU.degreesToRadians(135); let minRadius = 0.3 * g.getWidth(); let maxRadius = 0.45 * g.getWidth(); GU.fillArc(g, centreX, centreY, minRadius, maxRadius, startAngle, endAngle);
Gordons code does very similar things by constructing a polygon that approximates the arc.
1 Attachment
@halemmerich started
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.
You can just use the library to draw an arc like this:
Gordons code does very similar things by constructing a polygon that approximates the arc.
1 Attachment