Group: Implement clipping support.

This commit is contained in:
Jonathan Puckey 2011-02-17 16:37:29 +01:00
parent 2635326b24
commit 2a1e00d127

View file

@ -14,6 +14,8 @@ Group = Item.extend({
draw: function(ctx) { draw: function(ctx) {
for (var i = 0, l = this.children.length; i < l; i++) { for (var i = 0, l = this.children.length; i < l; i++) {
this.children[i].draw(ctx); this.children[i].draw(ctx);
if(this.clipped & i == 0)
ctx.clip();
} }
}, },