From e6d18909c9cb124feaab32966f2aa44c2f0b0617 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 22 Oct 2007 18:06:57 +0000 Subject: [PATCH] Patch [ 1816051 ] MSW DrawEllipticArc inconsistent with other platforms git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49337 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/dc.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index 56748f7518..fa9c434fb4 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -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)); -- 2.45.2