code: function(viewport, bounds) {
              if (!viewport ||
                  viewport.degrees === 0 ||
                  this.rotationMode === $.OverlayRotationMode.EXACT) {
                  return bounds;
              }
              if (this.rotationMode === $.OverlayRotationMode.BOUNDING_BOX) {
                  // If overlay not fully scalable, BOUNDING_BOX falls back to EXACT
                  if (this.width === null || this.height === null) {
                      return bounds;
                  }
                  // It is easier to just compute the position and size and
                  // convert to viewport coordinates.
                  var positionAndSize = this._getOverlayPositionAndSize(viewport);
                  return viewport.viewerElementToViewportRectangle(new $.Rect(
                      positionAndSize.position.x,
                      positionAndSize.position.y,
                      positionAndSize.size.x,
                      positionAndSize.size.y));
              }
  
              // NO_ROTATION case
              return bounds.rotate(-viewport.degrees,
                  this._getPlacementPoint(bounds));
          }
docs: private