-
Notifications
You must be signed in to change notification settings - Fork 0
/
draw1.html
45 lines (44 loc) · 1.19 KB
/
draw1.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>drawImg1.0版本演示</title>
<script src="./js/drawImg.1.2.js"></script>
<style>
*{
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<script>
window.onload=function(){
var obj={
//素材路径
src:'./images/1.png',
// 素材大小
size:{width:'750',height:'440'},
// 文本内容
text:"三大饿哦大家饿哦的加偶外会发疯的佛阿文swda万网w11",
textAlign:'left',
textBaseline:'top',
textPosition:{wx:'20',hx:'20',width:'300',maxWidth:"710"},
colorPosition:{x0:'0',y0:'0',x1:'750',y1:'440'},
color:[["0","yellow"],["0.3","pink"],["1.0","blue"]],
font:"30px microsoft yahei",
initHeight:0,
hHeight:40,
sync:'sync',
times:{delay:100,interval:200},
// img:'',
colorRandoming:true,
};
var abc=new Watermark(obj);
abc.init(function(){
document.body.appendChild(abc.img);
});
}
</script>
</body>
</html>