Vote count:
0
I'm trying to make a radar animation which draws echos (as bitmaps). I'm having a hard time figuring out the logic to make the radar re-draw bit-by-bit.
Right now, everything appears all at once. To add a bit of realism to it, I want to have the echos appear as the sweep passes by. This is the code I have to just make the bitmap all at once:
Graphics g;
Graphics g2;
Bitmap echos;
public Form1()
{
this.DoubleBuffered = true;
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
g = this.CreateGraphics();
g.Clear(Color.Black);
echos= new Bitmap(@"5NM.png"); // acutal bitmap file path shortened
g2 = Graphics.FromImage(echos);
}
// push button to draw echos
private void button2_Click(object sender, EventArgs e)
{
g.DrawImage(echos, 5, 0);
}
private void timer1_Tick(object sender, EventArgs e)
{
// this is the part I'm stuck at to make echos draw with a sweep
}
asked 23 secs ago
Radar re-draw sweep animation C#
Aucun commentaire:
Enregistrer un commentaire