#163 Validate bounds before drawing dots

Prevent dot details from being drawn in a rectangle with either a
negative width or height, which results in dots being drawn over buttons
in the caption area.