I stumbled across an anomaly in the Rect command. If FILL isn't specified, it works ad you'd expect, drawing an empty box at the specified coordinates. But… if you specify FILL, to get a solid box, that solid box is one pixel inside the coordinates. For example, if you issue: Rect 100, 100, 200, 200, 1 -> you get a solid box at 101, 101, 199, 199. So you either have to offset the coordinates by a pixel, or issue a Rect with Fill and another without Fill, to fill in the missing border.