修改海报的二维码
This commit is contained in:
16
src/util.js
16
src/util.js
@@ -219,18 +219,12 @@ export async function generateCanvasImage(canvasId, type, user, data) {
|
||||
renderLine(ctx, 77);
|
||||
renderLine(ctx, 185);
|
||||
renderScores(ctx, data.arrows);
|
||||
ctx.drawImage(
|
||||
"../static/device-icon.png",
|
||||
width * 0.06,
|
||||
height * 0.87,
|
||||
48,
|
||||
48
|
||||
);
|
||||
renderText(ctx, "射灵平台", 14, "#fff", width * 0.25, height * 0.9);
|
||||
ctx.drawImage("../static/qr-code.png", width * 0.06, height * 0.87, 52, 52);
|
||||
renderText(ctx, "射灵平台", 12, "#fff", width * 0.25, height * 0.9);
|
||||
renderText(
|
||||
ctx,
|
||||
"快加入我们一起玩吧~",
|
||||
10,
|
||||
9,
|
||||
"rgba(255, 255, 255, 0.5)",
|
||||
width * 0.25,
|
||||
height * 0.93
|
||||
@@ -238,12 +232,12 @@ export async function generateCanvasImage(canvasId, type, user, data) {
|
||||
renderText(
|
||||
ctx,
|
||||
"后羿就是这样练成的",
|
||||
10,
|
||||
9,
|
||||
"rgba(255, 255, 255, 0.5)",
|
||||
width * 0.25,
|
||||
height * 0.955
|
||||
);
|
||||
ctx.drawImage("../static/qr-code.png", width * 0.75, height * 0.86, 56, 56);
|
||||
// ctx.drawImage("../static/qr-code.png", width * 0.75, height * 0.86, 56, 56);
|
||||
ctx.draw();
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
|
||||
Reference in New Issue
Block a user