1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.rectPath = void 0;
|
4 | function 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 |
|
21 | }
|
22 | exports.rectPath = rectPath;
|
23 |
|
\ | No newline at end of file |