diff --git a/Sources/Private/NodeRenderSystem/Nodes/PathNodes/PolygonNode.swift b/Sources/Private/NodeRenderSystem/Nodes/PathNodes/PolygonNode.swift index efddc9e39b..57af7df6ab 100644 --- a/Sources/Private/NodeRenderSystem/Nodes/PathNodes/PolygonNode.swift +++ b/Sources/Private/NodeRenderSystem/Nodes/PathNodes/PolygonNode.swift @@ -149,7 +149,7 @@ extension BezierPath { vertices[vertices.endIndex - 1] = CurveVertex( previousVertex.inTangent, previousVertex.point, - previousVertex.point - cp1 + position) + previousVertex.point - cp1) vertices.append(CurveVertex(point: point + position, inTangentRelative: cp2, outTangentRelative: .zero)) } else { vertices.append(CurveVertex(point: point + position, inTangentRelative: .zero, outTangentRelative: .zero)) diff --git a/Sources/Private/NodeRenderSystem/Nodes/PathNodes/StarNode.swift b/Sources/Private/NodeRenderSystem/Nodes/PathNodes/StarNode.swift index 83dea68431..11ef751d6d 100644 --- a/Sources/Private/NodeRenderSystem/Nodes/PathNodes/StarNode.swift +++ b/Sources/Private/NodeRenderSystem/Nodes/PathNodes/StarNode.swift @@ -201,7 +201,7 @@ extension BezierPath { vertices[vertices.endIndex - 1] = CurveVertex( previousVertex.inTangent, previousVertex.point, - previousVertex.point - cp1 + position) + previousVertex.point - cp1) vertices.append(CurveVertex(point: point + position, inTangentRelative: cp2, outTangentRelative: .zero)) } currentAngle += dTheta diff --git a/Tests/Samples/Issues/pr_1536.json b/Tests/Samples/Issues/pr_1536.json new file mode 100644 index 0000000000..bd99fb63b1 --- /dev/null +++ b/Tests/Samples/Issues/pr_1536.json @@ -0,0 +1 @@ +{"v":"5.9","ddd":0,"ip":0,"op":300,"fr":60,"w":500,"h":500,"layers":[{"nm":"Shape layer","ind":1,"ty":4,"ddd":0,"ip":0,"op":300,"st":0,"ks":{"a":{"k":[0,0,0]},"p":{"k":[0,0,0]},"s":{"k":[100,100,100]},"r":{"k":0},"o":{"k":100}},"bm":0,"hasMask":false,"sr":1,"tt":0,"hd":false,"shapes":[{"ty":"sr","nm":"Star","hd":false,"d":1,"p":{"k":[245.665346,220.021378,0]},"or":{"k":50},"os":{"k":77.002817},"r":{"k":0},"pt":{"k":5},"sy":2},{"ty":"fl","nm":"Fill","hd":false,"o":{"k":100},"c":{"k":[0.800971,0.91038,0.709053,1]},"r":2},{"ty":"st","nm":"Stroke","hd":false,"o":{"k":100},"c":{"k":[0,0,0,1]},"w":{"k":2},"lc":2,"lj":2,"ml":0}]}]}