]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dc.cpp
cleanup mac
[wxWidgets.git] / src / msw / dc.cpp
index 56748f75185151b079b48008ecb9eb04b6f262c4..fa9c434fb42869c77117581e0b8f4ffd376f414d 100644 (file)
@@ -1122,6 +1122,17 @@ void wxDC::DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord h,double sa,d
     rx2 += (int)(100.0 * abs(w) * cos(ea));
     ry2 -= (int)(100.0 * abs(h) * m_signY * sin(ea));
 
+    // Swap start and end positions if the end angle is less than the start angle.
+    if (ea < sa) {
+       int temp;
+       temp = rx2;
+       rx2 = rx1;
+       rx1 = temp;
+       temp = ry2;
+       ry2 = ry1;
+       ry1 = temp;
+    }
+
     // draw pie with NULL_PEN first and then outline otherwise a line is
     // drawn from the start and end points to the centre
     HPEN hpenOld = (HPEN) ::SelectObject(GetHdc(), (HPEN) ::GetStockObject(NULL_PEN));