diff --git a/vstgui/lib/platform/win32/direct2d/d2dgraphicscontext.cpp b/vstgui/lib/platform/win32/direct2d/d2dgraphicscontext.cpp index 9a9e77426..c4f17a7db 100644 --- a/vstgui/lib/platform/win32/direct2d/d2dgraphicscontext.cpp +++ b/vstgui/lib/platform/win32/direct2d/d2dgraphicscontext.cpp @@ -432,6 +432,7 @@ bool D2DGraphicsDeviceContext::drawPolygon (const PointList& polygonPointList, { path->addLine (polygonPointList[i]); } + path->finishBuilding (); if (drawStyle == PlatformGraphicsDrawStyle::Filled || drawStyle == PlatformGraphicsDrawStyle::FilledAndStroked) { @@ -484,6 +485,8 @@ bool D2DGraphicsDeviceContext::drawArc (CRect rect, double startAngle1, double e if (impl->state.drawMode.integralMode ()) pixelAlign (impl->state.tm, rect); path->addArc (rect, startAngle1, endAngle2, true); + path->finishBuilding (); + if (drawStyle == PlatformGraphicsDrawStyle::Filled || drawStyle == PlatformGraphicsDrawStyle::FilledAndStroked) drawGraphicsPath (*path, PlatformGraphicsPathDrawMode::Filled, nullptr);