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
This commit is contained in:
Artur Wieczorek
2016-05-06 18:49:05 +02:00
parent 984e54ffdd
commit dc75ae2bf7

View File

@@ -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 },