public void Draw(Grid grid) { Graphics g = Panel.CreateGraphics(); g.DrawImage(Image, 0, 0, Width, Height); g.Dispose(); if (grid != null) { grid.Draw(Panel); } }
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); } }
public void DrawTileSet() { if (tileSet != null) { Grid grid = new Grid(tileSet.Width / TilePixelWidth, tileSet.Height / TilePixelHeight, TilePixelWidth, TilePixelHeight, tileBorderColor); tileSet.Draw(ShowGrid ? grid : null); } }
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); } }