From a28f1b7f44577ef5d72cb6bd27d8c3e86bda3d51 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Wed, 4 May 2016 22:48:53 +0200 Subject: [PATCH] Fixed appending a line to wxGraphicsPath with Direct2D renderer. If there is necessary to start a new D2D figure prior to appending the line to the path it should be started at the current point and not always at (0,0). See #17520 --- src/msw/graphicsd2d.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msw/graphicsd2d.cpp b/src/msw/graphicsd2d.cpp index 3686a6c682..bb86cbdcd1 100644 --- a/src/msw/graphicsd2d.cpp +++ b/src/msw/graphicsd2d.cpp @@ -1153,7 +1153,7 @@ void wxD2DPathData::MoveToPoint(wxDouble x, wxDouble y) // adds a straight line from the current point to (x,y) void wxD2DPathData::AddLineToPoint(wxDouble x, wxDouble y) { - EnsureFigureOpen(); + EnsureFigureOpen(m_currentPoint.x, m_currentPoint.y); m_geometrySink->AddLine(D2D1::Point2F(x, y)); m_currentPoint = D2D1::Point2F(x, y);