示例#1
0
 private void MainForm_Load(object sender, EventArgs e)
 {
     _rendering = new MapRendering(boardPic);
     _rnd       = new Random();
     ResetGame();
     _rendering.Render(_map);
 }
示例#2
0
            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);
            }