From 43be7073cd2b2b420e001accbe0edc0308f1d87c Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Thu, 12 May 2016 21:26:25 +0200 Subject: [PATCH] Make closing sub-path of wxGraphicsPath with GDI+ renderer compatible with Cairo renderer. Cairo renderer places MOVE_TO element into the path immediately after after the CLOSE_PATH element so to ensure that GDI+ will behave in the same way the new sub-path should be started at the joined endpoint of the current just closed sub-path. See #17532 --- src/msw/graphics.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/msw/graphics.cpp b/src/msw/graphics.cpp index 579782467c..807d6818d5 100644 --- a/src/msw/graphics.cpp +++ b/src/msw/graphics.cpp @@ -1245,8 +1245,7 @@ void wxGDIPlusPathData::CloseSubpath() // Since native GDI+ renderer doesn't move its current point // to the starting point of the figure we need to maintain // it on our own in this case. - m_logCurrentPoint = m_figureStart; - m_logCurrentPointSet = true; + MoveToPoint(m_figureStart.X, m_figureStart.Y); } } @@ -1322,8 +1321,7 @@ void wxGDIPlusPathData::AddRectangle( wxDouble x, wxDouble y, wxDouble w, wxDoub // current point is not moved to the starting point of the figure // (the same case as with CloseFigure) so we need to maintain it // on our own in this case. - m_logCurrentPoint = PointF((REAL)x, (REAL)y); - m_logCurrentPointSet = true; + MoveToPoint(x, y); } void wxGDIPlusPathData::AddPath( const wxGraphicsPathData* path )