deprecated the clipFunc method. replaced it with clip, which has an x, y, width, and height

This commit is contained in:
Eric Rowell
2013-08-10 22:00:29 -07:00
parent 64d6c79a6a
commit 8654391de4
3 changed files with 136 additions and 10 deletions

View File

@@ -222,11 +222,16 @@
this.context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);
},
_clip: function(container) {
var context = this.getContext();
var context = this.getContext(),
clipX = container.getClipX() || 0,
clipY = container.getClipY() || 0,
clipWidth = container.getClipWidth(),
clipHeight = container.getClipHeight();
context.save();
this._applyAncestorTransforms(container);
context.beginPath();
container.getClipFunc()(this);
context.rect(clipX, clipY, clipWidth, clipHeight);
context.clip();
context.setTransform(1, 0, 0, 1, 0, 0);
}