Convert drawnBorder to a bitmask