Added presentation

This commit is contained in:
2015-07-01 10:03:14 +03:00
parent 6b008cfa9a
commit 566a993bad
9 changed files with 78 additions and 12 deletions

View File

@ -51,7 +51,7 @@ namespace TransportGame.MapViewer
///<param name="file"></param>
///<param name="map"></param>
///<param name="layers"></param>
public Bitmap24 Render(Map map, Layers layers = Layers.All)
public Bitmap24 Render(CityMap map, Layers layers = Layers.All)
{
lock (this)
{
@ -60,7 +60,7 @@ namespace TransportGame.MapViewer
// Elevation, population
DrawPixels(bitmap, map, (layers & Layers.Elevation) > 0, (layers & Layers.Population) > 0);
// Roads
if ((layers & Layers.RoadArticulations) > 0)
DrawRoads(bitmap, map);
@ -80,7 +80,7 @@ namespace TransportGame.MapViewer
return Color.FromScRgb(A, R, G, B);
}
private void DrawPixels(Bitmap24 bitmap, Map map, bool elevation, bool population)
private void DrawPixels(Bitmap24 bitmap, CityMap map, bool elevation, bool population)
{
for (int x = 0; x < bitmap.Width; x++)
for (int y = 0; y < bitmap.Height; y++)
@ -120,7 +120,7 @@ namespace TransportGame.MapViewer
}
}
private void DrawRoads(Bitmap24 bitmap, Map map)
private void DrawRoads(Bitmap24 bitmap, CityMap map)
{
// Draw road segments
foreach (var pair in map.RoadNetwork.ArticulationSegments)