1
我想保存KineticJS舞臺的一部分。此代碼工作完美:從舞臺用膠版KineticJS保存圖像HTML5
stage.toDataURL({
width: 350,
height: 350,
mimeType: "image/jpeg",
callback: function(dataUrl) {
/*
* here you can do anything you like with the data url.
* In this tutorial we'll just open the url with the browser
* so that you can see the result as an image
*/
window.open(dataUrl);
}
});
}, false);
但我想要的是加一個偏移量這一點,所以圖像將開始和舞臺區域的座標(75,75)。任何想法?