Fix elliptic arc drawing for complete circle in wxQT, thanks @seandepagnier
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77919 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
2c8b781550
commit
30184d9f4a
@ -498,8 +498,17 @@ void wxQtDCImpl::DoDrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
|
||||
y += penWidth / 2;
|
||||
w -= penWidth;
|
||||
h -= penWidth;
|
||||
|
||||
m_qtPainter->drawPie( x, y, w, h, (int)( sa * 16 ), (int)( ( ea - sa ) * 16 ) );
|
||||
|
||||
double spanAngle = sa - ea;
|
||||
if (spanAngle < -180)
|
||||
spanAngle += 360;
|
||||
if (spanAngle > 180)
|
||||
spanAngle -= 360;
|
||||
|
||||
if ( spanAngle == 0 )
|
||||
m_qtPainter->drawEllipse( x, y, w, h );
|
||||
else
|
||||
m_qtPainter->drawPie( x, y, w, h, (int)( sa * 16 ), (int)( ( ea - sa ) * 16 ) );
|
||||
}
|
||||
|
||||
void wxQtDCImpl::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
|
||||
|
Loading…
Reference in New Issue
Block a user