mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Add missing ImageData relating functions to ProxyContext and fix problem where values weren't being returned.
This commit is contained in:
parent
2fff5b4f79
commit
b0aa54bf56
1 changed files with 4 additions and 4 deletions
|
@ -42,9 +42,9 @@ var ProxyContext = new function() {
|
|||
'textAlign', 'textBaseline', 'fillText(text,x,y,maxWidth)',
|
||||
'strokeText(text,x,y,maxWidth)', 'measureText(text)',
|
||||
'drawImage(image,dx,dy)', 'drawImage(image,dx,dy,dw,dh)',
|
||||
'drawImage(image,sx,sy,sw,sh,dx,dy,dw,dh)', 'create(sw,sh)',
|
||||
'create(imagedata)', 'get(sx,sy,sw,sh)',
|
||||
'put(imagedata,dx,dy,dirtyX,dirtyY,dirtyWidth,dirtyHeight)'
|
||||
'drawImage(image,sx,sy,sw,sh,dx,dy,dw,dh)', 'createImageData(sw,sh)',
|
||||
'createImageData(imagedata)', 'getImageData(sx,sy,sw,sh)',
|
||||
'putImageData(imagedata,dx,dy,dirtyX,dirtyY,dirtyWidth,dirtyHeight)'
|
||||
];
|
||||
var param = {
|
||||
initialize: function(context) {
|
||||
|
@ -71,10 +71,10 @@ var ProxyContext = new function() {
|
|||
var args = Array.prototype.slice.call(arguments, 0).join(', '),
|
||||
string = 'ctx.' + name + '(' + args + ');';
|
||||
console.log(this.getIndentation() + string);
|
||||
this._ctx[name].apply(this._ctx, arguments);
|
||||
if (name == 'save') {
|
||||
this._indents++;
|
||||
}
|
||||
return this._ctx[name].apply(this._ctx, arguments);
|
||||
};
|
||||
} else {
|
||||
var capitalized = Base.capitalize(name);
|
||||
|
|
Loading…
Reference in a new issue