Skip to content

Commit 1a03e9e

Browse files
committed
Merge pull request #2409 from dingpinglv/Iss2408_ClippingNode
Fixed #2408: Fixed a bug of cc.ClippineNode
2 parents d0f900f + 9bfe05f commit 1a03e9e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

cocos2d/clipping-nodes/CCClippingNode.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -511,12 +511,11 @@ cc.ClippingNode = cc.Node.extend(/** @lends cc.ClippingNode# */{
511511
var context = ctx || cc._renderContext;
512512
var t = this._node._transformWorld;
513513
context.save();
514+
context.transform(t.a, t.b, t.c, t.d, t.tx * scaleX, -t.ty * scaleY);
515+
514516
context.beginPath();
515517
for (var i = 0; i < stencil._buffer.length; i++) {
516-
var element = stencil._buffer[i];
517-
var vertices = element.verts;
518-
519-
context.transform(t.a, t.b, t.c, t.d, t.tx, -t.ty);
518+
var vertices = stencil._buffer[i].verts;
520519
//cc.assert(cc.vertexListIsClockwise(vertices),
521520
// "Only clockwise polygons should be used as stencil");
522521

0 commit comments

Comments
 (0)