Commit 4ef5c8fb authored by 李超鹏's avatar 李超鹏

水印文字

parent 7aa7b434
...@@ -362,14 +362,14 @@ ...@@ -362,14 +362,14 @@
for (let i = settingTxtArr.length - 1; i >= 0; i--) { for (let i = settingTxtArr.length - 1; i >= 0; i--) {
txtHeight = 20 txtHeight = 20
canvas.setFontSize(16) canvas.setFontSize(15)
canvas.setFillStyle('#f2f2f2') canvas.setFillStyle('#f2f2f2')
let txt = settingTxtArr[i] let txt = settingTxtArr[i]
if(txt.indexOf('时间')>=0){ if(txt.indexOf('时间')>=0){
canvas.fillText(txt, 10, canvasHeight - txtHeight * h++); canvas.fillText(txt, 10, canvasHeight - txtHeight * h++);
}else{ }else{
if(txt.length>22){ if(txt.length>22){
canvas.fillText(txt.substr(18,22), 10, canvasHeight - txtHeight * h++); canvas.fillText(txt.substr(22,22), 10, canvasHeight - txtHeight * h++);
canvas.fillText(txt.substr(0,22), 10, canvasHeight - txtHeight * h++); canvas.fillText(txt.substr(0,22), 10, canvasHeight - txtHeight * h++);
}else{ }else{
canvas.fillText(txt, 10, canvasHeight - txtHeight * h++); canvas.fillText(txt, 10, canvasHeight - txtHeight * h++);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment