private void pictureBox1_Paint(object sender, PaintEventArgs e) { Image img = ImageLoader.Instance().getImage(img_name); if (this.pictureBox1.Image != img) { this.pictureBox1.Image = img; } cursor.paint(e.Graphics); }
void paint(Graphics g) { foreach (Billboard b in billboards) { g.DrawImage(ImageLoader.Instance().getImage(b.file_name) , new Rectangle(b.x, b.y, b.w, b.h) , new Rectangle(b.refx, b.refy, b.w, b.h), GraphicsUnit.Pixel); } this.picbox.Size = data.Size; data.paint(g); cursor.paint(g); cursor_yellow.paint(g); }