Skip to content

Commit

Permalink
Fix round line-join with extreme angles (pixijs#8325)
Browse files Browse the repository at this point in the history
  • Loading branch information
dev7355608 committed May 9, 2022
1 parent 25f4bbb commit 23ab209
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/graphics/src/utils/buildLine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -427,11 +427,7 @@ function buildNonNativeLine(graphicsData: GraphicsData, graphicsGeometry: Graphi
{
verts.push(x1 - (perpx * innerWeight), y1 - (perpy * innerWeight)); // first segment's inner vertex
verts.push(x1 + (perpx * outerWeight), y1 + (perpy * outerWeight)); // first segment's outer vertex
if (style.join === LINE_JOIN.BEVEL || pdist / widthSquared > miterLimitSquared)
{
// Nothing needed
}
else if (style.join === LINE_JOIN.ROUND)
if (style.join === LINE_JOIN.ROUND)
{
if (clockwise) /* arc is outside */
{
Expand All @@ -452,7 +448,7 @@ function buildNonNativeLine(graphicsData: GraphicsData, graphicsGeometry: Graphi
) + 2;
}
}
else
else if (style.join === LINE_JOIN.MITER && pdist / widthSquared <= miterLimitSquared)
{
if (clockwise)
{
Expand Down

0 comments on commit 23ab209

Please sign in to comment.