private void MainForm_Load(object sender, EventArgs e) { _rendering = new MapRendering(boardPic); _rnd = new Random(); ResetGame(); _rendering.Render(_map); }
public RenderContext(MapRendering rendering) { this.rendering = rendering; Bitmap image = rendering.image; if (image == null || image.Size != rendering.target.ClientSize) { image = new Bitmap(rendering.target.ClientSize.Width, rendering.target.ClientSize.Height); rendering.image = image; } graphics = Graphics.FromImage(image); }