123456789101112131415161718192021222324252627282930 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace WindowsFormsGDIDrawPie
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- //创建画布
- Graphics ghs = this.CreateGraphics();
- //创建画笔
- Pen mypen = new Pen(Color.Black, 3);
- //绘制扇形
- ghs.DrawPie(mypen, 50, 50, 120, 100, 210, 120);
- }
- }
- }
|