Ar1: Multiple ways to do that: a filled polygon or two filled circles and a filled polygon...
Ar2: Ar1 for circle, and for rectangle: filled polygons or simply 3 filled rectangles.
Think of composition.
PS: You can study some code at https://www.espruino.com/ui - where mainly the composition concept is used: drawing one simple shape over another simple one renders usually faster than otherwise. This UI stuff was developed for 1 bit serial display. BangleJS has 8bit serial display, so it will render faster already from the get go.
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.
Ar1: Multiple ways to do that: a filled polygon or two filled circles and a filled polygon...
Ar2: Ar1 for circle, and for rectangle: filled polygons or simply 3 filled rectangles.
Think of composition.
PS: You can study some code at https://www.espruino.com/ui - where mainly the composition concept is used: drawing one simple shape over another simple one renders usually faster than otherwise. This UI stuff was developed for 1 bit serial display. BangleJS has 8bit serial display, so it will render faster already from the get go.