UNPKG

@minofrk/xelto-diagram-canvas

Version:

An implementation of <xelto-diagram> in TypeScript.

10 lines 462 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function setCoordinateSystem(canvasContext, { center, rotate = 0, scale = { x: 1, y: 1 }, }) { canvasContext.setTransform(scale.x, 0, 0, scale.y, 0, 0); const cos = Math.cos(rotate); const sin = Math.sin(rotate); canvasContext.transform(cos, sin, -sin, cos, center.x, center.y); } exports.default = setCoordinateSystem; //# sourceMappingURL=set-coordinate-system.js.map