improved gradient direction parsing. simplified display: box check