Changed Color and thickness values

This commit is contained in:
glax 2023-04-22 17:49:59 +02:00
parent ed46a419e3
commit a758c8c63e

View File

@ -10,13 +10,13 @@ namespace RenderPath;
public static class Renderer
{
private const int ImageMaxSize = 20000;
private const float PenThickness = 4;
private const float PenThickness = 3;
private static readonly Color RouteColor = Color.Red;
private static readonly Color WeightStartColor = Color.FromArgb(0, 0, 255);
private static readonly Color WeightCenterColor = Color.FromArgb(255, 255, 0);
private static readonly Color WeightEndColor = Color.FromArgb(0, 255, 0);
private static readonly Color RoadPrioStart = Color.FromArgb(155, 100, 100, 100);
private static readonly Color RoadPrioCenter = Color.FromArgb(255, 100, 200, 200);
private static readonly Color WeightStartColor = Color.FromArgb(127, 0, 0, 255);
private static readonly Color WeightCenterColor = Color.FromArgb(127,255, 255, 0);
private static readonly Color WeightEndColor = Color.FromArgb(127,0, 255, 0);
private static readonly Color RoadPrioStart = Color.FromArgb(100, 100, 100, 100);
private static readonly Color RoadPrioCenter = Color.FromArgb(255, 100, 200, 255);
private static readonly Color RoadPrioEnd = Color.FromArgb(255, 255, 180, 0);
public class Bounds
@ -65,7 +65,7 @@ public static class Renderer
int pixelsX = (int)(lonDiff * scaleFactor);
int pixelsY = (int)(latDiff * scaleFactor);
Image ret = new Bitmap(pixelsX, pixelsY, PixelFormat.Format32bppRgb);
Image ret = new Bitmap(pixelsX, pixelsY, PixelFormat.Format32bppPArgb);
Graphics g = Graphics.FromImage(ret);
g.Clear(Color.White);
@ -165,9 +165,9 @@ public static class Renderer
float x = (kv.Key.coordinates.longitude - minLon) * scaleFactor;
float y = (maxLat - kv.Key.coordinates.latitude) * scaleFactor;
x -= (PenThickness * 1.5f) / 2;
y -= (PenThickness * 1.5f) / 2;
g.FillEllipse(b, x, y, PenThickness * 1.5f, PenThickness * 1.5f);
x -= PenThickness / 2;
y -= PenThickness / 2;
g.FillEllipse(b, x, y, PenThickness, PenThickness);
}
return new ValueTuple<Image, Bounds>(ret, new Bounds(minLat,minLon,maxLat,maxLon));