correct drawing of rotated rects