message: Fix spikes from wide strokes
diff: @@ -358,6 +358,14 @@ function buildNonNativeLine(graphicsData: GraphicsData, graphicsGeometry: Graphi
  const omx = x1 - ((px - x1) * outerWeight);
  const omy = y1 - ((py - y1) * outerWeight);
  + /* Is the inside miter point too far away, creating a spike? */
  + const smallerInsideSegmentSq = Math.min((dx0 * dx0) + (dy0 * dy0), (dx1 * dx1) + (dy1 * dy1));
  + const insideWeight = clockwise ? innerWeight : outerWeight;
  + const smallerInsideDiagonalSq = smallerInsideSegmentSq + (insideWeight * insideWeight * widthSquared);
  + const insideMiterOk = pdist <= smallerInsideDiagonalSq;
  +
  + if (insideMiterOk)
  + {
  if (style.join === LINE_JOIN.BEVEL || pdist / widthSquared > miterLimitSquared)
  {
  if (clockwise) /* rotating at inner angle */
  @@ -416,6 +424,54 @@ function buildNonNativeLine(graphicsData: GraphicsData, graphicsGeometry: Graphi
  verts.push(omx, omy);
  }
  }
  + else // inside miter is NOT ok
  + {
  + 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 (clockwise) /* arc is outside */
  + {
  + indexCount += round(
  + x1, y1,
  + x1 + (perpx * outerWeight), y1 + (perpy * outerWeight),
  + x1 + (perp1x * outerWeight), y1 + (perp1y * outerWeight),
  + verts, true
  + ) + 2;
  + }
  + else /* arc is inside */
  + {
  + indexCount += round(
  + x1, y1,
  + x1 - (perpx * innerWeight), y1 - (perpy * innerWeight),
  + x1 - (perp1x * innerWeight), y1 - (perp1y * innerWeight),
  + verts, false
  + ) + 2;
  + }
  + }
  + else
  + {
  + if (clockwise)
  + {
  + verts.push(omx, omy); // inner miter point
  + verts.push(omx, omy); // inner miter point
  + }
  + else
  + {
  + verts.push(imx, imy); // outer miter point
  + verts.push(imx, imy); // outer miter point
  + }
  + indexCount += 2;
  + }
  + verts.push(x1 - (perp1x * innerWeight), y1 - (perp1y * innerWeight)); // second segment's inner vertex
  + verts.push(x1 + (perp1x * outerWeight), y1 + (perp1y * outerWeight)); // second segment's outer vertex
  + indexCount += 2;
  + }
  + }
  x0 = points[(length - 2) * 2];
  y0 = points[((length - 2) * 2) + 1];
  