canvas.js
1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.adaptor = void 0;
function adaptor(ctx) {
// @ts-ignore
return Object.assign(ctx, {
setStrokeStyle (val) {
ctx.strokeStyle = val;
},
setLineWidth (val) {
ctx.lineWidth = val;
},
setLineCap (val) {
ctx.lineCap = val;
},
setFillStyle (val) {
ctx.fillStyle = val;
},
setFontSize (val) {
ctx.font = String(val);
},
setGlobalAlpha (val) {
ctx.globalAlpha = val;
},
setLineJoin (val) {
ctx.lineJoin = val;
},
setTextAlign (val) {
ctx.textAlign = val;
},
setMiterLimit (val) {
ctx.miterLimit = val;
},
setShadow (offsetX, offsetY, blur, color) {
ctx.shadowOffsetX = offsetX;
ctx.shadowOffsetY = offsetY;
ctx.shadowBlur = blur;
ctx.shadowColor = color;
},
setTextBaseline (val) {
ctx.textBaseline = val;
},
createCircularGradient () {},
draw () {},
});
}
exports.adaptor = adaptor;