From 23ab209aa5de77b1a9f392306565885a18bf0eea Mon Sep 17 00:00:00 2001 From: dev7355608 Date: Mon, 9 May 2022 16:03:48 +0200 Subject: [PATCH] Fix round line-join with extreme angles (#8325) --- packages/graphics/src/utils/buildLine.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/graphics/src/utils/buildLine.ts b/packages/graphics/src/utils/buildLine.ts index e228562adf..21c16374b3 100644 --- a/packages/graphics/src/utils/buildLine.ts +++ b/packages/graphics/src/utils/buildLine.ts @@ -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 */ { @@ -452,7 +448,7 @@ function buildNonNativeLine(graphicsData: GraphicsData, graphicsGeometry: Graphi ) + 2; } } - else + else if (style.join === LINE_JOIN.MITER && pdist / widthSquared <= miterLimitSquared) { if (clockwise) {