C# PathGradientBrush 处理颜色渐渐变
来源:互联网 发布:怎样用vba编写软件 编辑:程序博客网 时间:2024/06/05 09:15
效果
复制代码到Form.cs下
protected override void OnPaint(PaintEventArgs e)
{
Point _Left1 = new Point(0, 0);
Point _Left2 = new Point(this.Width / 2, 0);
Point _Left3 = new Point(this.Width / 2, this.Height);
Point _Left4 = new Point(0, this.Height);
Point[] _Point = new Point[] { _Left1, _Left2, _Left3, _Left4 };
PathGradientBrush _SetBruhs = new PathGradientBrush(_Point, WrapMode.TileFlipX);
_SetBruhs.CenterPoint = new PointF(0, 0);
_SetBruhs.FocusScales = new PointF(0, this.Height);
_SetBruhs.CenterColor = Color.Red;
_SetBruhs.SurroundColors=new Color[]{Color.Yellow};
e.Graphics.FillRectangle(_SetBruhs, new Rectangle(0, 0, this.Width, this.Height));
base.OnPaint(e);
}
- C# PathGradientBrush 处理颜色渐渐变
- PathGradientBrush
- 网页背景颜色,从上往下渐渐变淡~
- linux系统安装之后时间渐渐变慢怎么办
- Tensorflow训练渐渐变慢,迭代一段时间卡死
- 导航条变透明,并随着屏幕上划渐渐变非透明
- 表格行变颜色
- cxGrid 行变颜色
- cxGrid 行变颜色
- 时钟显示变颜色
- 鼠标移动变颜色
- OJ Shape 变颜色
- 搜索关键字变颜色
- 鼠标移动变颜色
- 使用PathGradientBrush类
- GDI+ PathGradientBrush OutOfMemoryException
- c#抗变 协变
- c# 抗变 协变
- 窗口置前的几种方法
- JAVA流在页面上显示图片
- 混乱的字符串转换(转)
- js 递归编程要注意的:return
- 隐藏开始按钮
- C# PathGradientBrush 处理颜色渐渐变
- 若干经典的字符串哈希函数(转)
- PB对Unicode的支持
- 在Visual C++中集成DDK/WDK
- 从SQL Server中导入/导出 Excel 的基本方法
- 使用PureMVC_pipe建立module应用程序中遇到的问题
- 验证码
- sql防注入的方法
- 程序开发中的优化