画图问题,在线等,解决就结贴 以一点(x,y)为圆心,r为半径画一个实心园,C#怎么实现?谢谢! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 private void button1_Click(object sender, EventArgs e) { Graphics _Graphcis =Graphics.FromHwnd(panel1.Handle); _Graphcis.DrawEllipse(new Pen(Brushes.Yellow),GetEllopse(new Point(100,100),100)); } public Rectangle GetEllopse(Point p_CenterPoint, int p_Radius) { int _X = p_CenterPoint.X - p_Radius; int _Y = p_CenterPoint.Y - p_Radius; return new Rectangle(_X, _Y, p_Radius * 2, p_Radius * 2); } 先计算出外截矩形,然后参考下面代码。外截矩形宽=2r 高=2rint 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(); 我就想在picturebox里面画一个实心圆,没有bmp需要在控件的paint里面画出来 g.FillEllipse(new SolidBrush(Color.Red),0,0,w,h);正解 Dictionary如何倒序输出? 在c#中创建oracle用户 .net framework 3.5的权限管理问题 sql 语句问题 取部分时间问题 关于在一个窗口中触发另一个窗口重绘(OnPaint) 高手请进~~~~~~~~~~~ 倒分玩 12个串口,同一时间段要打开至少五六个串口,每个串口每隔十几毫秒接收一帧数据,如何存入oracle数据库中? 如何共享事件,比如说一个toolbarbutton共享一个menuitem的事件 为什么向数据库中插入不了数据? C# 使用ArrayList类建立了个二维表,想要删除其中的某条记录,怎么做?
{
Graphics _Graphcis =Graphics.FromHwnd(panel1.Handle); _Graphcis.DrawEllipse(new Pen(Brushes.Yellow),GetEllopse(new Point(100,100),100)); } public Rectangle GetEllopse(Point p_CenterPoint, int p_Radius)
{
int _X = p_CenterPoint.X - p_Radius;
int _Y = p_CenterPoint.Y - p_Radius;
return new Rectangle(_X, _Y, p_Radius * 2, p_Radius * 2);
}
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();