mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
44 lines
1.1 KiB
JavaScript
44 lines
1.1 KiB
JavaScript
/*
|
|
html2canvas @VERSION@ <http://html2canvas.hertzen.com>
|
|
Copyright (c) 2011 Niklas von Hertzen. All rights reserved.
|
|
http://www.twitter.com/niklasvh
|
|
|
|
Released under MIT License
|
|
*/
|
|
html2canvas.canvasContext = function (width, height) {
|
|
var storage = [];
|
|
return {
|
|
storage: storage,
|
|
width: width,
|
|
height: height,
|
|
fillRect: function () {
|
|
storage.push({
|
|
type: "function",
|
|
name: "fillRect",
|
|
'arguments': arguments
|
|
});
|
|
},
|
|
drawImage: function () {
|
|
storage.push({
|
|
type: "function",
|
|
name: "drawImage",
|
|
'arguments': arguments
|
|
});
|
|
},
|
|
fillText: function () {
|
|
storage.push({
|
|
type: "function",
|
|
name: "fillText",
|
|
'arguments': arguments
|
|
});
|
|
},
|
|
setVariable: function (variable, value) {
|
|
storage.push({
|
|
type: "variable",
|
|
name: variable,
|
|
'arguments': value
|
|
});
|
|
}
|
|
};
|
|
};
|