c# 画圆的问题 请问如何画出一个平滑的圆圈,没有锯齿的那种,我用的函数是DrawEllipse. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Form程序,直接用PictureBox就行了 画圆:无填充色private void button1_Click(object sender, EventArgs e) { Graphics gra = this.pictureBox1.CreateGraphics(); Pen pen = new Pen(Color.Pink);//画笔颜色 gra.DrawEllipse(pen, 10, 10, 100, 100);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 }画圆:有填充色private void button1_Click(object sender, EventArgs e) { Graphics gra = this.pictureBox1.CreateGraphics(); Brush bush = new SolidBrush(Color.Green);//填充的颜色 gra.FillEllipse(bush,10,10,100,100);//画填充椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50 }以下是web程序,需要保存。int w = Convert.ToInt32(TextBox1.Text) * 2; int h = Convert.ToInt32(TextBox1.Text) * 2; Image1.Width = w; Image1.Height = h; Bitmap bmp = new Bitmap(w, h); Graphics g = Graphics.FromImage(bmp); g.FillEllipse(new SolidBrush(Color.Red),0,0,w,h); bmp.Save(Server.MapPath("~/a.bmp")); Image1.ImageUrl = "~/a.bmp"; g.Dispose(); DrawEllipse函数画出的园就是有锯齿 你加上这句,就平滑多了 gra.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; c#中关于字符串的处理 HyperLink 控件无法实现超链? 关于为画面提供F1帮助信息的问题 VS2005(C#)的TIMER控件怎么显示不出来啊! 100分求助,Enterprise Library 5.0记录文本日志,为何重复记录至defaultCategory? 求助.如何在窗体中屏蔽Ctrl+Alt+Del? 谁有cs版本的FTP代码呀? 程序员找工作时注意了 调查 如何防止软件被截包程序截包? 一个关于动态加载属性的问题 请教一个LINQ语句的写法
画圆:无填充色private void button1_Click(object sender, EventArgs e)
{
Graphics gra = this.pictureBox1.CreateGraphics();
Pen pen = new Pen(Color.Pink);//画笔颜色
gra.DrawEllipse(pen, 10, 10, 100, 100);//画椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50
}画圆:有填充色private void button1_Click(object sender, EventArgs e)
{
Graphics gra = this.pictureBox1.CreateGraphics();
Brush bush = new SolidBrush(Color.Green);//填充的颜色
gra.FillEllipse(bush,10,10,100,100);//画填充椭圆的方法,x坐标、y坐标、宽、高,如果是100,则半径为50
}以下是web程序,需要保存。int w = Convert.ToInt32(TextBox1.Text) * 2;
int h = Convert.ToInt32(TextBox1.Text) * 2;
Image1.Width = w;
Image1.Height = h;
Bitmap bmp = new Bitmap(w, h);
Graphics g = Graphics.FromImage(bmp);
g.FillEllipse(new SolidBrush(Color.Red),0,0,w,h);
bmp.Save(Server.MapPath("~/a.bmp"));
Image1.ImageUrl = "~/a.bmp";
g.Dispose();