The lines are a real StaticBorderRenderer fed the same strokes the click would write, so every one of these buttons previews its own edit — the current line style and color included. The dots are the cells, and they are drawn only where no line covers them. A diagonal runs corner to corner across the whole grid.
Dots and lines share one device-pixel layout: each dot is an odd number of device pixels centered on the pixel a thin line at that boundary fills, so odd-width lines run through the dots' centers and an even-width line keeps its inner pixel on them.
A border button's icon: a 5x5 grid of dots with the border itself drawn across it.