Skip to content

Commit

Permalink
fix rendering polygon and arc on Windows
Browse files Browse the repository at this point in the history
(cherry picked from commit e04e288)
  • Loading branch information
scheffle committed Oct 23, 2023
1 parent 34ce6ab commit 986368f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vstgui/lib/platform/win32/direct2d/d2dgraphicscontext.cpp
Expand Up @@ -432,6 +432,7 @@ bool D2DGraphicsDeviceContext::drawPolygon (const PointList& polygonPointList,
{
path->addLine (polygonPointList[i]);
}
path->finishBuilding ();
if (drawStyle == PlatformGraphicsDrawStyle::Filled ||
drawStyle == PlatformGraphicsDrawStyle::FilledAndStroked)
{
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 986368f

Please sign in to comment.