日期:2010-08-17 浏览次数:20494 次
该类实现代码如下:
1using System.Drawing;
2using System.Drawing.Drawing2D;
3using System.Drawing.Imaging;
4
5namespace Ycweb.Controls.Utility
6{
7 /**//// <summary>
8 /// WaterMark
9 /// </summary>
10 public class Watermark
11 {
12 private int _width;
13 private int _height;
14 private string _fontFamily;
15 private int _fontSize;
16 private bool _adaptable;
17 private FontStyle _fontStyle;
18 private bool _shadow;
19 private string _backgroundImage;
20 private Color _bgColor;
21 private int _left;
22 private string _resultImage;
23 private string _text;
24 private int _top;
25 private int _alpha;
26 private int _red;
27 private int _green;
28 private int _blue;
29 private long _quality;
30
31
32
33 public Watermark()
34 {
35 //
36 // TODO: Add constructor logic here
37 //
38 _width=460;
39 _height=30;
40 _fontFamily = "华文行楷";
41 _fontSize = 20;
42 _fontStyle=FontStyle.Regular;
43 _adaptable=true;
44 _shadow=false;
45 _left = 0;
46 _top = 0;
47 _alpha = 255;
48 _red = 0;
49 _green = 0;
50 _blue = 0;
51