Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

html2canvas.prototype.storageContext (simplified ?) #4

Closed
ainthek opened this issue Jul 28, 2011 · 0 comments
Closed

html2canvas.prototype.storageContext (simplified ?) #4

ainthek opened this issue Jul 28, 2011 · 0 comments

Comments

@ainthek
Copy link

ainthek commented Jul 28, 2011

html2canvas.prototype.storageContext = function(width,height){
/**
* Simplified (readable ?) version by a.in.the.k@gmail.com
*/
var _this=this, _push=function(name)
{
var _slice=Array.prototype.slice; //TODO: extract higher
return function(){
this.storage.push(
{
type: "function",
name:name,
arguments:_slice.call(arguments)
});
}
};

_this.storage = [];
_this.width = width;
_this.height = height;
//this.zIndex;

_this.fillRect = _push("fillRect" /*x, y, w, h*/);      
_this.drawImage = _push("drawImage" /*image,sx,sy,sw,sh,dx,dy,dw,dh*/);     
_this.fillText = _push("fillText" /*currentText,x,y*/);

return _this;

}

@niklasvh niklasvh closed this as completed Sep 5, 2011
JeOam pushed a commit to JeOam/html2canvas that referenced this issue May 27, 2021
…klasvh#4

[refs niklasvh#4] ビルダーのサムネイルキャプチャ時の挙動修正
Zefling referenced this issue in html2canvas/html2canvas May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants