Patch [ 1816051 ] MSW DrawEllipticArc inconsistent with other platforms
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49338 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1123,6 +1123,17 @@ void wxDC::DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord h,double sa,d
|
|||||||
rx2 += (int)(100.0 * abs(w) * cos(ea));
|
rx2 += (int)(100.0 * abs(w) * cos(ea));
|
||||||
ry2 -= (int)(100.0 * abs(h) * m_signY * sin(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
|
// draw pie with NULL_PEN first and then outline otherwise a line is
|
||||||
// drawn from the start and end points to the centre
|
// drawn from the start and end points to the centre
|
||||||
HPEN hpenOld = (HPEN) ::SelectObject(GetHdc(), (HPEN) ::GetStockObject(NULL_PEN));
|
HPEN hpenOld = (HPEN) ::SelectObject(GetHdc(), (HPEN) ::GetStockObject(NULL_PEN));
|
||||||
|
Reference in New Issue
Block a user