遇到一个LinearGradientBrush的问题,不包含采用“5”参数的构造函数!!
代码是Font font = new Font("Arial", 20, (FontStyle.Bold));
Rectangle rt = new Rectangle(0, 0, image.Width, image.Height);
System.Windows.Media.LinearGradientBrush brush = new System.Windows.Media.LinearGradientBrush(rt, Color.Blue, Color.DarkRed, 3, true);
g.DrawString(strValidCode, font, brush, 5, 2);
g.DrawRectangle(new Pen(Color.Silver), 0, 0, image.Width - 1, image.Height - 1);
ms = new ();
image.Save(ms, ImageFormat.Gif);
context.Response.ClearContent();
context.Response.ContentType = "image/gif";
context.Response.BinaryWrite(ms.ToArray);
报错误 1 “System.Windows.Media.LinearGradientBrush”不包含采用“5”参数的构造函数
谢谢了!急等!!代码是
Font font = new Font("Arial", 20, (FontStyle.Bold));
Rectangle rt = new Rectangle(0, 0, image.Width, image.Height);
System.Windows.Media.LinearGradientBrush brush = new System.Windows.Media.LinearGradientBrush(rt, Color.Blue, Color.DarkRed, 3, true);
g.DrawString(strValidCode, font, brush, 5, 2);
g.DrawRectangle(new Pen(Color.Silver), 0, 0, image.Width - 1, image.Height - 1);
ms = new ();
image.Save(ms, ImageFormat.Gif);
context.Response.ClearContent();
context.Response.ContentType = "image/gif";
context.Response.BinaryWrite(ms.ToArray);
报错误 1 “System.Windows.Media.LinearGradientBrush”不包含采用“5”参数的构造函数
谢谢了!急等!!