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, powered by microcosm.
Report a problem