import { convertBoundingBoxToBox, transformBoxPoints } from "../geometry/conversion.js";
import { translateAxis } from "../geometry/delta-apply.js";
function measureViewportBox(instance, transformPoint) {
  return convertBoundingBoxToBox(transformBoxPoints(instance.getBoundingClientRect(), transformPoint));
}
function measurePageBox(element, rootProjectionNode, transformPagePoint) {
  var viewportBox = measureViewportBox(element, transformPagePoint);
  var scroll = rootProjectionNode.scroll;
  if (scroll) {
    translateAxis(viewportBox.x, scroll.x);
    translateAxis(viewportBox.y, scroll.y);
  }
  return viewportBox;
}
export {
  measurePageBox,
  measureViewportBox
};
//# sourceMappingURL=measure.js.map
