From ea91c399c5da0b9617aa7f1610f10750862c9121 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 21 Feb 2007 22:24:02 +0000 Subject: [PATCH] Use floating point math in wxGCDC::DoDrawEllipticArc. Also removed the lines closing the arc since wxDC doesn't do that. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@44547 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/dcgraph.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/common/dcgraph.cpp b/src/common/dcgraph.cpp index 993cccf3db..d72c48e2a9 100644 --- a/src/common/dcgraph.cpp +++ b/src/common/dcgraph.cpp @@ -505,16 +505,16 @@ void wxGCDC::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord w, wxCoord h, wxGraphicsPath path = m_graphicContext->CreatePath(); m_graphicContext->PushState(); - m_graphicContext->Translate(x+w/2,y+h/2); + m_graphicContext->Translate(x+w/2.0,y+h/2.0); wxDouble factor = ((wxDouble) w) / h; m_graphicContext->Scale( factor , 1.0); - if ( fill && (sa!=ea) ) - path.MoveToPoint(0,0); +// if ( fill && (sa!=ea) ) +// path.MoveToPoint(0,0); // since these angles (ea,sa) are measured counter-clockwise, we invert them to // get clockwise angles - path.AddArc( 0, 0, h/2 , DegToRad(-sa) , DegToRad(-ea), sa > ea ); - if ( fill && (sa!=ea) ) - path.AddLineToPoint(0,0); + path.AddArc( 0, 0, h/2.0 , DegToRad(-sa) , DegToRad(-ea), sa > ea ); +// if ( fill && (sa!=ea) ) +// path.AddLineToPoint(0,0); m_graphicContext->DrawPath( path ); m_graphicContext->PopState(); }