mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Group: Implement clipping support.
This commit is contained in:
parent
2635326b24
commit
2a1e00d127
1 changed files with 2 additions and 0 deletions
|
@ -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();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue