Draw a Grid or Coloured Boxes on a Canvas
This was purely a mental exercise, for me, but may be of use to others.
Following on from work done HERE, in creating a selection of colours to pick from on a canvas, i got to thinking about doing this programmatically, based upon knowing the size of the grid required and the size of each box, this then sets the canvas size. Once I had figured out the box co-ordinate requirements, it was a case of generating the pointList for each box, then using the drawShape block to create it on the canvas. I provided a choice of either just drawing a grid, or drawing coloured boxes. For the colours, I created a list of all the colours you find if you click on a colour block (70 in all)
Here is where the magic happens to generate each pointList:
Colour List Block