From: Stefan Csomor Date: Tue, 27 May 2008 04:49:30 +0000 (+0000) Subject: fixing arc filling for angles > 180 X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/47c1bb951559435fe15ac316218f318a1f650f70 fixing arc filling for angles > 180 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53771 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/dcgraph.cpp b/src/common/dcgraph.cpp index 6d70a954c7..0c51ae0773 100644 --- a/src/common/dcgraph.cpp +++ b/src/common/dcgraph.cpp @@ -551,21 +551,19 @@ void wxGCDCImpl::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord w, wxCoord h, { wxGraphicsPath path = m_graphicContext->CreatePath(); path.MoveToPoint( 0, 0 ); - path.AddLineToPoint( h / 2.0 * cos(DegToRad(sa)) , h / 2.0 * sin(DegToRad(-sa)) ); - path.AddLineToPoint( h / 2.0 * cos(DegToRad(ea)) , h / 2.0 * sin(DegToRad(-ea)) ); + path.AddArc( 0, 0, h/2.0 , DegToRad(-sa) , DegToRad(-ea), sa > ea ); path.AddLineToPoint( 0, 0 ); m_graphicContext->FillPath( path ); path = m_graphicContext->CreatePath(); path.AddArc( 0, 0, h/2.0 , DegToRad(-sa) , DegToRad(-ea), sa > ea ); - m_graphicContext->FillPath( path ); m_graphicContext->StrokePath( path ); } else { wxGraphicsPath path = m_graphicContext->CreatePath(); - path.AddArc( 0, 0, h/2.0 , DegToRad(-sa) , DegToRad(-ea), sa > ea ); - m_graphicContext->DrawPath( path ); + path.AddArc( 0, 0, h/2.0 , DegToRad(-sa) , DegToRad(-ea), sa > ea ); + m_graphicContext->DrawPath( path ); } m_graphicContext->PopState();