日期:2014-05-20 浏览次数:21119 次
Graphics g = this.CreateGraphics();
//矩形区域
GraphicsPath path = new GraphicsPath();
path.AddRectangle(new Rectangle(0, 0, 200, 100));
//径向渐变刷
PathGradientBrush brush = new PathGradientBrush(path);
//中心颜色;
brush.CenterColor = Color.Red;
//边缘颜色;
brush.SurroundColors = new Color[] { Color.White };
g.FillPath(brush, path);