code: function (renderer, rect) {
              // use the offscreen canvas
              if (this.preRender) {
                  var width = Math.min(rect.width, this.width);
                  var height = Math.min(rect.height, this.height);
  
                  // draw using the cached canvas
                  renderer.drawImage(
                      this.canvasRenderer.getCanvas(),
                      rect.pos.x, rect.pos.y, // sx,sy
                      width, height,          // sw,sh
                      rect.pos.x, rect.pos.y, // dx,dy
                      width, height           // dw,dh
                  );
              }
              // dynamically render the layer
              else {
                  // draw the layer
                  this.renderer.drawTileLayer(renderer, this, rect);
              }
          }
docs: draw a tileset layer
  @ignore