Tables
using Luxor
Drawing(450, 350, "../images/Tiles.svg")
origin()
fontsize(12)
# tiles = Tiler(areawidth, areaheight, nrows, ncols, margin=20)
tiles = Tiler(400, 300, 4, 5, margin=5)
for (pos, n) in tiles
randomhue()
box(pos, tiles.tilewidth, tiles.tileheight, :fill)
sethue("white")
textcentered(string(n), pos + Point(0, 5))
end
finish()
Coding Lesson
Using 'Tiler'
It seems that the table is centred on the current point, the documentation doesn't say this but the table in the example above is centred on the origin, which is, I think, the current point.