您的位置:首页 > 编程语言 > C#

(C#)GDI+简单绘图画椭圆

2012-11-22 15:53 399 查看
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;

namespace _10._2._5
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void Form1_Paint(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
Pen pen = new Pen(Color.Red, 3);
Brush brush = new SolidBrush(Color.HotPink);
g.DrawEllipse(pen, 20, 20, 200, 100);
g.FillEllipse(brush, 230, 20, 200, 100);
}
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: