src/drawer.js
function(tile, drawingHandler, useSketch, scale, translate) {
        $.console.assert(tile, '[Drawer.drawTile] tile is required');
        $.console.assert(drawingHandler, '[Drawer.drawTile] drawingHandler is required');

        if (this.useCanvas) {
            var context = this._getContext(useSketch);
            scale = scale || 1;
            tile.drawCanvas(context, drawingHandler, scale, translate);
        } else {
            tile.drawHTML( this.canvas );
        }
    }
function(tile, drawingHandler, useSketch, scale, translate) {
        $.console.assert(tile, '[Drawer.drawTile] tile is required');
        $.console.assert(drawingHandler, '[Drawer.drawTile] drawingHandler is required');

        if (this.useCanvas) {
            var context = this._getContext(useSketch);
            scale = scale || 1;
            tile.drawCanvas(context, drawingHandler, scale, translate);
        } else {
            tile.drawHTML( this.canvas );
        }
    }
function ( tile , drawingHandler , useSketch , scale , translate ) { $ . console . assert ( tile , '[Drawer.drawTile] tile is required' ) ; $ . console . assert ( drawingHandler , '[Drawer.drawTile] drawingHandler is required' ) ; if ( this . useCanvas ) { var context = this . _getContext ( useSketch ) ; scale = scale || 1 ; tile . drawCanvas ( context , drawingHandler , scale , translate ) ; } else { tile . drawHTML ( this . canvas ) ; } }
Draws the given tile.
@param {OpenSeadragon.Tile} tile - The tile to draw.
@param {Function} drawingHandler - Method for firing the drawing event if using canvas.
drawingHandler({context, tile, rendered})
@param {Boolean} useSketch - Whether to use the sketch canvas or not.
where <code>rendered</code> is the context with the pre-drawn image.
@param {Float} [scale=1] - Apply a scale to tile position and size. Defaults to 1.
@param {OpenSeadragon.Point} [translate] A translation vector to offset tile position
Draws the given tile .