To be able to easily use the entire polygon x-y coordinate range, please consider changing from a ReadableBuffer data type to an integer list.
From #7471:
In my application, bitmaptools.draw_polygon would be very useful if it accepted a large (>200) list of integers instead of a ReadableBuffer object. For now, the application is iterating through a list and using draw_line instead.
The simpletest example shows converting a list to a byte array, but that doesn't allow coordinate values larger than 127. Using struct or a ulab.numpy array allows larger values up to 16-bits. However, ulab isn't available for all boards and struct is only practical for lists of just a few points.
A side benefit of changing the coordinate data type to integer would be UI consistency with other bitmaptool drawn objects. I'll open a new issue that specifically asks for coordinate integer lists.
BTW, being able to leave the polygon open is a big plus when plotting waveshapes and formulae, cartesian-style.
To be able to easily use the entire polygon x-y coordinate range, please consider changing from a ReadableBuffer data type to an integer list.
From #7471: