| 123456789101112131415161718192021 |
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.translate = void 0;
- /* eslint-disable @typescript-eslint/no-unused-vars */
- var matrix_util_1 = require("@antv/matrix-util");
- /**
- * Apply translate transformation for current vector.
- * @param params [tx, ty]
- * @param x x of the the bounding box of coordinate
- * @param y y of the the bounding box of coordinate
- * @param width width of the the bounding box of coordinate
- * @param height height of the the bounding box of coordinate
- * @returns transformer
- */
- var translate = function (params, x, y, width, height) {
- var _a = params, tx = _a[0], ty = _a[1];
- var matrix = matrix_util_1.mat3.create();
- return matrix_util_1.mat3.fromTranslation(matrix, [tx, ty]);
- };
- exports.translate = translate;
- //# sourceMappingURL=translate.js.map
|