C#GDI关于已经画出一条曲线上点运动的问题
我现在C#winform中画好的一条曲线,想把一个点在画好的曲线轨迹上做匀速运动。求大仙指教
public MapExample()
{
InitializeComponent();
Timer clock = new Timer();
clock.Interval =1000;
clock.Tick += delegate { Invalidate(); };
clock.Start();
}
//重载OnPaint
protected override void OnPaint(PaintEventArgs e)
{
DateTime time = DateTime.Now;
using (Graphics g = e.Graphics)
{
g.DrawEllipse(new Pen(Brushes.Blue, 1), 0, 0, 200, 200);//圈
g.TranslateTransform(100.0f,100.0f);
System.Drawing.Drawing2D.GraphicsState state = g.Save();
g.RotateTransform(time.Second * 6 - 90);//设置旋转的角度
g.FillEllipse(new SolidBrush(Color.Green), 65, 65, 10, 10);//小点
}
}