_render(scene) {
      const m = markup();

      // svg tag
      m.open('svg', extend({}, metadata, {
        class: 'marks',
        width: this._width * this._scale,
        height: this._height * this._scale,
        viewBox: `0 0 ${this._width} ${this._height}`
      }));

      // background, if defined
      const bg = this._bgcolor;
      if (bg && bg !== 'transparent' && bg !== 'none') {
        m.open('rect', {
          width: this._width,
          height: this._height,
          fill: bg
        }).close();
      }

      // root content group
      m.open('g', rootAttributes, {
        transform: 'translate(' + this._origin + ')'
      });
      this.mark(m, scene);
      m.close(); // </g>

      // defs
      this.defs(m);

      // get SVG text string
      this._text = m.close() + '';
      return this;
    }
Internal rendering method.
@param {object} scene - The root mark of a scenegraph to render.