src/renderable/imagelayer.js
function (renderer) {
            var viewport = me.game.viewport,
                width = this.imagewidth,
                height = this.imageheight,
                bw = viewport.bounds.width,
                bh = viewport.bounds.height,
                ax = this.anchorPoint.x,
                ay = this.anchorPoint.y,
                x = this.pos.x,
                y = this.pos.y;

            if (this.ratio.x === this.ratio.y === 0) {
                x = x + ax * (bw - width);
                y = y + ay * (bh - height);
            }

            renderer.translate(x, y);
            renderer.drawPattern(
                this._pattern,
                0,
                0,
                viewport.width * 2,
                viewport.height * 2
            );
        }
function (renderer) {
            var viewport = me.game.viewport,
                width = this.imagewidth,
                height = this.imageheight,
                bw = viewport.bounds.width,
                bh = viewport.bounds.height,
                ax = this.anchorPoint.x,
                ay = this.anchorPoint.y,
                x = this.pos.x,
                y = this.pos.y;

            if (this.ratio.x === this.ratio.y === 0) {
                x = x + ax * (bw - width);
                y = y + ay * (bh - height);
            }

            renderer.translate(x, y);
            renderer.drawPattern(
                this._pattern,
                0,
                0,
                viewport.width * 2,
                viewport.height * 2
            );
        }
function ( renderer ) { var viewport = me . game . viewport , width = this . imagewidth , height = this . imageheight , bw = viewport . bounds . width , bh = viewport . bounds . height , ax = this . anchorPoint . x , ay = this . anchorPoint . y , x = this . pos . x , y = this . pos . y ; if ( this . ratio . x === this . ratio . y === 0 ) { x = x + ax * ( bw - width ) ; y = y + ay * ( bh - height ) ; } renderer . translate ( x , y ) ; renderer . drawPattern ( this . _pattern , 0 , 0 , viewport . width * 2 , viewport . height * 2 ) ; }
draw the image layer
@ignore
draw the image layer