如何在面板上绘制这张照片 [英] how to draw this picture on a panel
本文介绍了如何在面板上绘制这张照片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
好的我想在面板上尝试这张照片:
ok I am trying to this picture on a panel :
现在它有1- 8但是用户可以添加更多类似
right now it has 1-8 but the user can add more like
1-20或只需1-4。
1-20 or just do 1-4 .
这里是我的代码:
int start_X = Cube_Panel.Width / 16;
int start_Y = Cube_Panel.Height / 16;
int X = start_X;
int Y = start_Y;
for (int i = 0; i < 9; i++)
{
e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
e.Graphics.FillEllipse(Brushes.Green, new Rectangle(X, Y, 25, 25));
X = (int) (X + Math.Cos(180 ) - 50) ;
Y = (int)(Y + Math.Sin(180 ) + 50);
}
Graphics l = e.Graphics;
Pen p = new Pen(Color.Gray, 5);
l.DrawEllipse(p,start_X, start_Y, 200, 200);
l.Dispose();
但它无效...
我做错了什么?
推荐答案
任何人?
这篇关于如何在面板上绘制这张照片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文