From dc75ae2bf7bf8e60f840282812a8fd8155516b4a Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Fri, 6 May 2016 18:49:05 +0200 Subject: [PATCH] Fixed appending a curve to wxGraphicsPath with Direct2D renderer. If there is necessary to start a new D2D figure prior to appending a curve to the path then this new figure should be started at the current point and not always at (0,0). Closes #17521 --- 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 013f0ea061..c29cc05d04 100644 --- a/src/msw/graphicsd2d.cpp +++ b/src/msw/graphicsd2d.cpp @@ -1175,7 +1175,7 @@ void wxD2DPathData::AddLineToPoint(wxDouble x, wxDouble y) // adds a cubic Bezier curve from the current point, using two control points and an end point void wxD2DPathData::AddCurveToPoint(wxDouble cx1, wxDouble cy1, wxDouble cx2, wxDouble cy2, wxDouble x, wxDouble y) { - EnsureFigureOpen(); + EnsureFigureOpen(m_currentPoint.x, m_currentPoint.y); D2D1_BEZIER_SEGMENT bezierSegment = { { (FLOAT)cx1, (FLOAT)cy1 }, { (FLOAT)cx2, (FLOAT)cy2 },