fixing arc filling for angles > 180
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53771 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -551,21 +551,19 @@ void wxGCDCImpl::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord w, wxCoord h,
|
|||||||
{
|
{
|
||||||
wxGraphicsPath path = m_graphicContext->CreatePath();
|
wxGraphicsPath path = m_graphicContext->CreatePath();
|
||||||
path.MoveToPoint( 0, 0 );
|
path.MoveToPoint( 0, 0 );
|
||||||
path.AddLineToPoint( h / 2.0 * cos(DegToRad(sa)) , h / 2.0 * sin(DegToRad(-sa)) );
|
path.AddArc( 0, 0, h/2.0 , DegToRad(-sa) , DegToRad(-ea), sa > ea );
|
||||||
path.AddLineToPoint( h / 2.0 * cos(DegToRad(ea)) , h / 2.0 * sin(DegToRad(-ea)) );
|
|
||||||
path.AddLineToPoint( 0, 0 );
|
path.AddLineToPoint( 0, 0 );
|
||||||
m_graphicContext->FillPath( path );
|
m_graphicContext->FillPath( path );
|
||||||
|
|
||||||
path = m_graphicContext->CreatePath();
|
path = m_graphicContext->CreatePath();
|
||||||
path.AddArc( 0, 0, h/2.0 , DegToRad(-sa) , DegToRad(-ea), sa > ea );
|
path.AddArc( 0, 0, h/2.0 , DegToRad(-sa) , DegToRad(-ea), sa > ea );
|
||||||
m_graphicContext->FillPath( path );
|
|
||||||
m_graphicContext->StrokePath( path );
|
m_graphicContext->StrokePath( path );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxGraphicsPath path = m_graphicContext->CreatePath();
|
wxGraphicsPath path = m_graphicContext->CreatePath();
|
||||||
path.AddArc( 0, 0, h/2.0 , DegToRad(-sa) , DegToRad(-ea), sa > ea );
|
path.AddArc( 0, 0, h/2.0 , DegToRad(-sa) , DegToRad(-ea), sa > ea );
|
||||||
m_graphicContext->DrawPath( path );
|
m_graphicContext->DrawPath( path );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_graphicContext->PopState();
|
m_graphicContext->PopState();
|
||||||
|
Reference in New Issue
Block a user