_drawTile( tile, tiledImage, useSketch, scale, translate, shouldRoundPositionAndSize, source) {
        $.console.assert(tile, '[Drawer._drawTile] tile is required');
        $.console.assert(tiledImage, '[Drawer._drawTile] drawingHandler is required');

        if ( !tile.loaded ){
            $.console.warn(
                "Attempting to draw tile %s when it's not yet loaded.",
                tile.toString()
            );
            return;
        }

        const rendered = this.getDataToDraw(tile);
        if (!rendered) {
            return;
        }

        const context = this._getContext(useSketch);
        scale = scale || 1;

        let position = tile.position.times($.pixelDensityRatio),
            size     = tile.size.times($.pixelDensityRatio);

        context.save();

        if (typeof scale === 'number' && scale !== 1) {
            // draw tile at a different scale
            position = position.times(scale);
            size = size.times(scale);
        }

        if (translate instanceof $.Point) {
            // shift tile position slightly
            position = position.plus(translate);
        }

        //if we are supposed to be rendering fully opaque rectangle,
        //ie its done fading or fading is turned off, and if we are drawing
        //an image with an alpha channel, then the only way
        //to avoid seeing the tile underneath is to clear the rectangle
        if (context.globalAlpha === 1 && tile.hasTransparency) {
            if (shouldRoundPositionAndSize) {
                // Round to the nearest whole pixel so we don't get seams from overlap.
                position.x = Math.round(position.x);
                position.y = Math.round(position.y);
                size.x = Math.round(size.x);
                size.y = Math.round(size.y);
            }

            //clearing only the inside of the rectangle occupied
            //by the png prevents edge flikering
            context.clearRect(
                position.x,
                position.y,
                size.x,
                size.y
            );
        }

        this._raiseTileDrawingEvent(tiledImage, context, tile, rendered);

        let sourceWidth, sourceHeight;
        if (tile.sourceBounds) {
            sourceWidth = Math.min(tile.sourceBounds.width, rendered.canvas.width);
            sourceHeight = Math.min(tile.sourceBounds.height, rendered.canvas.height);
        } else {
            sourceWidth = rendered.canvas.width;
            sourceHeight = rendered.canvas.height;
        }

        context.translate(position.x + size.x / 2, 0);
        if (tile.flipped) {
            context.scale(-1, 1);
        }
        context.drawImage(
            rendered.canvas,
            0,
            0,
            sourceWidth,
            sourceHeight,
            -size.x / 2,
            position.y,
            size.x,
            size.y
        );

        context.restore();
    }
Draws the given tile.
@private
@param {OpenSeadragon.Tile} tile - The tile to draw.
@param {OpenSeadragon.TiledImage} tiledImage - The tiled image being drawn.
@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
@param {Boolean} [shouldRoundPositionAndSize] - Tells whether to round
position and size of tiles supporting alpha channel in non-transparency
context.
@param {OpenSeadragon.TileSource} source - The source specification of the tile.