maske = new cc.ClippingNode();
maske.setContentSize(400,400 );
maske.setAnchorPoint(0, 0);
maske.setPosition(0, 0);
this.addChild(maske,5);
var stencil = cc.DrawNode.create();
var rectangle = [cc.p(0, 0),cc.p(maske.getContentSize().width, 0),
cc.p(maske.getContentSize().width, maske.getContentSize().height),
cc.p(0, maske.getContentSize().height)];
var white = cc.color(1, 1, 1, 1);
stencil.drawPoly(rectangle, white, 1, white);
maske.setStencil(stencil);
maske.setInverted(true);
maske.setAlphaThreshold(0.5);
maske.addChild(scrolView);
Is this code wrong? Because it is not mask my scrollView. All of scrollView is shown in screen although it must be 400x400. ScrollView’s contentSize is 1720*1080