|
@@ -64,7 +64,7 @@ export default {
|
|
},
|
|
},
|
|
drawWatermark(ctx, { width, height }) {
|
|
drawWatermark(ctx, { width, height }) {
|
|
const angle = (315 * Math.PI) / 180;
|
|
const angle = (315 * Math.PI) / 180;
|
|
- const fontSize = 100;
|
|
|
|
|
|
+ const fontSize = 50;
|
|
ctx.font = `${fontSize}px serif`;
|
|
ctx.font = `${fontSize}px serif`;
|
|
ctx.fillStyle = "rgba(212,212,212,0.5)";
|
|
ctx.fillStyle = "rgba(212,212,212,0.5)";
|
|
ctx.textAlign = "center";
|
|
ctx.textAlign = "center";
|
|
@@ -72,7 +72,7 @@ export default {
|
|
// 获取内容的宽度
|
|
// 获取内容的宽度
|
|
const cInfo = ctx.measureText(this.content);
|
|
const cInfo = ctx.measureText(this.content);
|
|
|
|
|
|
- const spacing = [Math.max(500, width / 4), Math.max(500, height / 4)];
|
|
|
|
|
|
+ const spacing = [Math.max(300, width / 8), Math.max(300, height / 8)];
|
|
const spaceWH = [cInfo.width + spacing[0], fontSize + spacing[1]];
|
|
const spaceWH = [cInfo.width + spacing[0], fontSize + spacing[1]];
|
|
const spaceSize = Math.max(width, height);
|
|
const spaceSize = Math.max(width, height);
|
|
const wCount = Math.ceil(spaceSize / spaceWH[0]);
|
|
const wCount = Math.ceil(spaceSize / spaceWH[0]);
|