Fixed closing sub-path of wxGraphicsPath with GDI+ renderer.

Close sub-path only if it is really open.
This commit is contained in:
Artur Wieczorek
2016-05-06 18:51:00 +02:00
parent a6d97acc31
commit fab6d0e757

View File

@@ -1227,13 +1227,16 @@ void wxGDIPlusPathData::AddLineToPoint( wxDouble x , wxDouble y )
void wxGDIPlusPathData::CloseSubpath() void wxGDIPlusPathData::CloseSubpath()
{ {
m_path->CloseFigure(); if( m_figureOpened )
m_figureOpened = false; {
// Since native GDI+ renderer doesn't move its current point m_path->CloseFigure();
// to the starting point of the figure we need to maintain m_figureOpened = false;
// it on our own in this case. // Since native GDI+ renderer doesn't move its current point
m_logCurrentPoint = m_figureStart; // to the starting point of the figure we need to maintain
m_logCurrentPointSet = true; // it on our own in this case.
m_logCurrentPoint = m_figureStart;
m_logCurrentPointSet = true;
}
} }
void wxGDIPlusPathData::AddCurveToPoint( wxDouble cx1, wxDouble cy1, wxDouble cx2, wxDouble cy2, wxDouble x, wxDouble y ) void wxGDIPlusPathData::AddCurveToPoint( wxDouble cx1, wxDouble cy1, wxDouble cx2, wxDouble cy2, wxDouble x, wxDouble y )