Make results of wxDC::DrawEllipticArc() consistent across all platforms.

And also consistent with wxGraphicsContext method with the same name.

Document the rules determining what is drawn.

Closes #4437.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78125 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-11-11 01:02:14 +00:00
parent f9637c9626
commit 8b72652a28
5 changed files with 25 additions and 18 deletions

View File

@@ -1290,17 +1290,6 @@ void wxMSWDCImpl::DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord h,doub
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));