Exemplo n.º 1
0
        public void Draw(Grid grid)
        {
            Graphics g = Panel.CreateGraphics();
            g.DrawImage(Image, 0, 0, Width, Height);
            g.Dispose();

            if (grid != null)
            {
                grid.Draw(Panel);
            }
        }
Exemplo n.º 2
0
        public void Draw(Grid grid, TileSet tileSet)
        {
            // Screen block entries
            for (int x = 0; x < Width; x++)
            for (int y = 0; y < Height; y++)
            {
                DrawTile(x, y, tileSet);
            }

            if (grid != null)
            {
                grid.Draw(Panel);
            }
        }
Exemplo n.º 3
0
 public void DrawTileSet()
 {
     if (tileSet != null)
     {
         Grid grid = new Grid(tileSet.Width / TilePixelWidth, tileSet.Height / TilePixelHeight, TilePixelWidth, TilePixelHeight, tileBorderColor);
         tileSet.Draw(ShowGrid ? grid : null);
     }
 }
Exemplo n.º 4
0
 public void DrawMap()
 {
     PanelDrawingHelper.Clear(MapPanel, Brushes.White);
     if (tileSet != null)
     {
         Grid grid = new Grid(MapWidth / SnapWidth, MapHeight / SnapHeight, SnapPixelWidth, SnapPixelHeight, mapTileBorderColor);
         map.Draw(ShowGrid ? grid : null, tileSet);
     }
 }