vendor/kinetic-v5.1.0.js
function(config) {
            Kinetic.Util._getImage(this.toDataURL(config), function(img) {
                config.callback(img);
            });
        }
function(config) {
            Kinetic.Util._getImage(this.toDataURL(config), function(img) {
                config.callback(img);
            });
        }
function ( config ) { Kinetic . Util . _getImage ( this . toDataURL ( config ) , function ( img ) { config . callback ( img ) ; } ) ; }
converts node into an image.  Since the toImage
method is asynchronous, a callback is required.  toImage is most commonly used
to cache complex drawings as an image so that they don't have to constantly be redrawn
@method
@memberof Kinetic.Node.prototype
@param {Object} config
@param {Function} config.callback function executed when the composite has completed
@param {String} [config.mimeType] can be "image/png" or "image/jpeg".
"image/png" is the default
@param {Number} [config.x] x position of canvas section
@param {Number} [config.y] y position of canvas section
@param {Number} [config.width] width of canvas section
@param {Number} [config.height] height of canvas section
@param {Number} [config.quality] jpeg quality.  If using an "image/jpeg" mimeType,
you can specify the quality from 0 to 1, where 0 is very poor quality and 1
is very high quality
@example
var image = node.toImage({<br>
callback: function(img) {<br>
// do stuff with img<br>
}<br>
});
converts node into an image . Since the toImage method is asynchronous a callback is required . toImage is most commonly used to cache complex drawings as an image so that they don t have to constantly be redrawn