@minofrk/xelto-diagram-canvas
Version:
An implementation of <xelto-diagram> in TypeScript.
16 lines • 718 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const scale_1 = require("../scale");
const point_ops_1 = require("../../point-ops");
function getPhysicalValues({ virtualArea, virtualFontSize, }, canvasSize) {
const physicalScale = scale_1.getMaxScale(canvasSize);
const physicalSize = point_ops_1.times(virtualArea.size, physicalScale);
return {
size: physicalSize,
center: point_ops_1.plus(point_ops_1.times(virtualArea.leftTop, physicalScale), point_ops_1.times(physicalSize, 1 / 2)),
scale: physicalScale,
fontSize: virtualFontSize * physicalScale,
};
}
exports.default = getPhysicalValues;
//# sourceMappingURL=get-physical-values.js.map