Fix drawing of corners in wxGraphicsContext::DrawLines()

Close the path corresponding to the polygon to ensure that the starting
and finishing edges are joined correctly, which wasn't the case before
as could be easily seen when using thicker pens.

Closes #22440.
This commit is contained in:
Vadim Zeitlin
2022-05-20 01:32:07 +02:00
parent dd80f16fc2
commit f43efa6b46

View File

@@ -835,6 +835,7 @@ void wxGraphicsContext::DrawLines( size_t n, const wxPoint2DDouble *points, wxPo
path.MoveToPoint(points[0].m_x, points[0].m_y);
for ( size_t i = 1; i < n; ++i)
path.AddLineToPoint( points[i].m_x, points[i].m_y );
path.CloseSubpath();
DrawPath( path , fillStyle);
}