UNPKG

717 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.rectPath = void 0;
4function rectPath(x, y, w, h, r) {
5 if (r) {
6 return [
7 ['M', +x + +r, y],
8 ['l', w - r * 2, 0],
9 ['a', r, r, 0, 0, 1, r, r],
10 ['l', 0, h - r * 2],
11 ['a', r, r, 0, 0, 1, -r, r],
12 ['l', r * 2 - w, 0],
13 ['a', r, r, 0, 0, 1, -r, -r],
14 ['l', 0, r * 2 - h],
15 ['a', r, r, 0, 0, 1, r, -r],
16 ['z'],
17 ];
18 }
19 return [['M', x, y], ['l', w, 0], ['l', 0, h], ['l', -w, 0], ['z']];
20 // res.parsePathArray = parsePathArray;
21}
22exports.rectPath = rectPath;
23//# sourceMappingURL=rect-path.js.map
\No newline at end of file