第十二周 C# 试验 《 2 》 .
来源:互联网 发布:高中数学矩阵与变换 编辑:程序博客网 时间:2024/05/18 15:56
private void Form1_Paint(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
Point centerPoint = new Point(160, 80);
int R = 60;
GraphicsPath path = new GraphicsPath();
path.AddEllipse(centerPoint.X - R, centerPoint.Y - R, 2 * R, 2 * R);
PathGradientBrush brush = new PathGradientBrush(path);
//指定路径中心点
brush.CenterPoint = centerPoint;
//指定路径中心点的颜色
brush.CenterColor = Color.White;
//Color类型的数组指定与路径上每个顶点对应的颜色
brush.SurroundColors = new Color[] { Color.Black };
g.FillEllipse(brush, centerPoint.X - R, centerPoint.Y - R, 2 * R, 2 * R);
}
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Drawing.Drawing2D;namespace WindowsFormsApplication2{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; Point centerPoint = new Point(160, 80); int R = 60; GraphicsPath path = new GraphicsPath(); path.AddEllipse(centerPoint.X - R, centerPoint.Y - R, 2 * R, 2 * R); PathGradientBrush brush = new PathGradientBrush(path); //指定路径中心点 brush.CenterPoint = centerPoint; //指定路径中心点的颜色 brush.CenterColor = Color.White; //Color类型的数组指定与路径上每个顶点对应的颜色 brush.SurroundColors = new Color[] { Color.Black }; g.FillEllipse(brush, centerPoint.X - R, centerPoint.Y - R, 2 * R, 2 * R);} } }
- 第十二周 C# 试验 《 2 》 .
- 第十二周 C# 试验 《 1 》
- 第十二周 C# 试验 《 3 》 .
- 第十二周 C# 试验 《 4 》
- C#第一次试验
- C#第三次试验
- 第十二周作业 2
- 第十二周作业2
- 第十二周任务2
- 第十二周任务2
- 第十二周任务2
- 第十二周任务2
- 第十二周作业2
- 第十二周项目2
- 第十二周 【项目2
- 第十二周 【项目2
- C#的UDP打洞试验
- C#基础第十二天
- remove_if
- onCreate中的savedInstanceState有何具体作用
- sysfs与kobject交互
- Ubuntu 下用python 获取当前时间 的方法
- 单页应用详解——(5)创建视图
- 第十二周 C# 试验 《 2 》 .
- 真机terminate called after throwing an instance
- PHP二维码生成的方法(google APi,PHP类库,libqrencode等)
- gridview中positon=0時 getview方法多次加載問題
- 记录一些自定义php函数
- 字符串反转函数,不定义局部变量,不使用库函数,不使用递归
- KVC,KVO学习
- 关于SQLLDR的VAR参数用法
- 产品架构安全------关注点