【修改】修改ziti
This commit is contained in:
@@ -22,11 +22,12 @@ Vue.directive('watermark', {
|
||||
can.style.display = 'none'
|
||||
const cans = can.getContext('2d')
|
||||
cans.rotate(-20 * Math.PI / 180)
|
||||
cans.font = font || '13px Microsoft Yahei'
|
||||
cans.font = font || '13px Helvetica Neue'
|
||||
cans.fillStyle = textColor || 'rgba(100, 100, 100, 0.2)'
|
||||
cans.textAlign = 'left'
|
||||
cans.textBaseline = 'Middle'
|
||||
cans.fillText(str, fillTextX, can.height)
|
||||
console.log(cans)
|
||||
// 设置背景图(整个项目中都添加水印建议使用此方法)
|
||||
// parentNode.style.backgroundImage = "url(" + can.toDataURL("image/png") + ")";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user