UNPKG

804 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.scale = void 0;
4/* eslint-disable @typescript-eslint/no-unused-vars */
5var matrix_util_1 = require("@antv/matrix-util");
6/**
7 * Apply scale transformation for current vector.
8 * @param params [sx, sy]
9 * @param x x of the the bounding box of coordinate
10 * @param y y of the the bounding box of coordinate
11 * @param width width of the the bounding box of coordinate
12 * @param height height of the the bounding box of coordinate
13 * @returns transformer
14 */
15var scale = function (params, x, y, width, height) {
16 var _a = params, sx = _a[0], sy = _a[1];
17 var matrix = matrix_util_1.mat3.create();
18 return matrix_util_1.mat3.fromScaling(matrix, [sx, sy]);
19};
20exports.scale = scale;
21//# sourceMappingURL=scale.js.map
\No newline at end of file