code: function(rectangle) {
          var topLeft = this.viewport.pixelFromPointNoRotate(rectangle.getTopLeft(), true);
          var size = this.viewport.deltaPixelsFromPointsNoRotate(rectangle.getSize(), true);
  
          return new $.Rect(
              topLeft.x * $.pixelDensityRatio,
              topLeft.y * $.pixelDensityRatio,
              size.x * $.pixelDensityRatio,
              size.y * $.pixelDensityRatio
          );
      }
docs: Scale from OpenSeadragon viewer rectangle to drawer rectangle
  (ignoring rotation)
  @param {OpenSeadragon.Rect} rectangle - The rectangle in viewport coordinate system.
  @return {OpenSeadragon.Rect} Rectangle in drawer coordinate system.