code: function() {
          var canvasSize = this._calculateCanvasSize();
          if (this.viewport.getRotation() === 0) {
              return canvasSize;
          }
          // If the viewport is rotated, we need a larger sketch canvas in order
          // to support edge smoothing.
          var sketchCanvasSize = Math.ceil(Math.sqrt(
              canvasSize.x * canvasSize.x +
              canvasSize.y * canvasSize.y));
          return {
              x: sketchCanvasSize,
              y: sketchCanvasSize
          };
      }
docs: private