Skip to content

Commit

Permalink
Fix issue with Polygon rendering (#1537)
Browse files Browse the repository at this point in the history
Co-authored-by: Denis Koryttsev <[email protected]>
  • Loading branch information
calda and k-o-d-e-n authored Mar 28, 2022
1 parent 73ed646 commit 5278d30
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions Tests/Samples/Issues/pr_1536.json
Original file line number Diff line number Diff line change
@@ -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}]}]}

0 comments on commit 5278d30

Please sign in to comment.