- wxCoord xx1 = XLOG2DEV(x1);
- wxCoord yy1 = YLOG2DEV(y1);
- wxCoord xx2 = XLOG2DEV(x2);
- wxCoord yy2 = YLOG2DEV(y2);
-
- ::MoveTo(xx1 - offset, yy1 - offset);
- ::LineTo(xx2 - offset, yy2 - offset);
+ wxCoord xx1 = XLOG2DEV(x1) - offset;
+ wxCoord yy1 = YLOG2DEV(y1) - offset;
+ wxCoord xx2 = XLOG2DEV(x2) - offset;
+ wxCoord yy2 = YLOG2DEV(y2) - offset;
+
+ if ((m_pen.GetCap() == wxCAP_ROUND) &&
+ (m_pen.GetWidth() <= 1))
+ {
+ // Implement LAST_NOT for MAC at least for
+ // orthogonal lines. RR.
+ if (xx1 == xx2)
+ {
+ if (yy1 < yy2)
+ yy2--;
+ if (yy1 > yy2)
+ yy2++;
+ }
+ if (yy1 == yy2)
+ {
+ if (xx1 < xx2)
+ xx2--;
+ if (xx1 > xx2)
+ xx2++;
+ }
+ }
+
+ ::MoveTo(xx1, yy1);
+ ::LineTo(xx2, yy2);