fix crash in wxGCDC::DrawEllipticArc() after r76954, closes #16623
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78023 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -646,13 +646,12 @@ void wxGCDCImpl::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord w, wxCoord h,
|
|||||||
m_graphicContext->PushState();
|
m_graphicContext->PushState();
|
||||||
m_graphicContext->Translate(dx, dy);
|
m_graphicContext->Translate(dx, dy);
|
||||||
m_graphicContext->Scale(factor, 1.0);
|
m_graphicContext->Scale(factor, 1.0);
|
||||||
wxGraphicsPath path;
|
wxGraphicsPath path = m_graphicContext->CreatePath();
|
||||||
|
|
||||||
// since these angles (ea,sa) are measured counter-clockwise, we invert them to
|
// since these angles (ea,sa) are measured counter-clockwise, we invert them to
|
||||||
// get clockwise angles
|
// get clockwise angles
|
||||||
if ( m_brush.GetStyle() != wxTRANSPARENT )
|
if ( m_brush.GetStyle() != wxTRANSPARENT )
|
||||||
{
|
{
|
||||||
path = m_graphicContext->CreatePath();
|
|
||||||
path.MoveToPoint( 0, 0 );
|
path.MoveToPoint( 0, 0 );
|
||||||
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 );
|
||||||
path.AddLineToPoint( 0, 0 );
|
path.AddLineToPoint( 0, 0 );
|
||||||
@@ -664,7 +663,6 @@ void wxGCDCImpl::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord w, wxCoord h,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
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 );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user