Skip to content

Commit d443ff3

Browse files
committed
Make WebGL Graphics closePath work the same as in Canvas.
1 parent d45784f commit d443ff3

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

src/renderer/webgl/pipelines/FlatTintPipeline.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -903,13 +903,9 @@ var FlatTintPipeline = new Class({
903903
break;
904904

905905
case Commands.CLOSE_PATH:
906-
if (lastPath !== null && lastPath.points.length > 0)
906+
if (lastPath && lastPath.points.length)
907907
{
908-
var firstPoint = lastPath.points[0];
909-
var lastPoint = lastPath.points[lastPath.points.length - 1];
910-
lastPath.points.push(firstPoint);
911-
lastPath = new Path(lastPoint.x, lastPoint.y, lastPoint.width, lastPoint.rgb, lastPoint.alpha);
912-
pathArray.push(lastPath);
908+
lastPath.points.push(lastPath.points[0]);
913909
}
914910
break;
915911

0 commit comments

Comments
 (0)