"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const conversion = require("../geometry/conversion.js");
const deltaApply = require("../geometry/delta-apply.js");
function measureViewportBox(instance, transformPoint) {
  return conversion.convertBoundingBoxToBox(conversion.transformBoxPoints(instance.getBoundingClientRect(), transformPoint));
}
function measurePageBox(element, rootProjectionNode, transformPagePoint) {
  var viewportBox = measureViewportBox(element, transformPagePoint);
  var scroll = rootProjectionNode.scroll;
  if (scroll) {
    deltaApply.translateAxis(viewportBox.x, scroll.x);
    deltaApply.translateAxis(viewportBox.y, scroll.y);
  }
  return viewportBox;
}
exports.measurePageBox = measurePageBox;
exports.measureViewportBox = measureViewportBox;
//# sourceMappingURL=measure.js.map
