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
This commit is contained in:
Artur Wieczorek
2016-05-04 22:48:53 +02:00
parent 008a162241
commit a28f1b7f44

View File

@@ -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);