Changed Colors for weights and created variable for pointsize
This commit is contained in:
parent
601200a8d6
commit
7fd9047ac4
@ -12,9 +12,9 @@ public static class Renderer
|
|||||||
private const int ImageMaxSize = 20000;
|
private const int ImageMaxSize = 20000;
|
||||||
private const float PenThickness = 3;
|
private const float PenThickness = 3;
|
||||||
private static readonly Color RouteColor = Color.Red;
|
private static readonly Color RouteColor = Color.Red;
|
||||||
private static readonly Color WeightStartColor = Color.FromArgb(127, 0, 0, 255);
|
private static readonly Color WeightStartColor = Color.FromArgb(200, 0, 0, 255);
|
||||||
private static readonly Color WeightCenterColor = Color.FromArgb(127,255, 255, 0);
|
private static readonly Color WeightCenterColor = Color.FromArgb(200,255, 255, 0);
|
||||||
private static readonly Color WeightEndColor = Color.FromArgb(127,0, 255, 0);
|
private static readonly Color WeightEndColor = Color.FromArgb(200,0, 255, 0);
|
||||||
private static readonly Color RoadPrioStart = Color.FromArgb(100, 100, 100, 100);
|
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 RoadPrioCenter = Color.FromArgb(255, 100, 200, 255);
|
||||||
private static readonly Color RoadPrioEnd = Color.FromArgb(255, 255, 180, 0);
|
private static readonly Color RoadPrioEnd = Color.FromArgb(255, 255, 180, 0);
|
||||||
@ -156,6 +156,8 @@ public static class Renderer
|
|||||||
Graphics g = Graphics.FromImage(ret);
|
Graphics g = Graphics.FromImage(ret);
|
||||||
if(renderOver is null)
|
if(renderOver is null)
|
||||||
g.Clear(Color.White);
|
g.Clear(Color.White);
|
||||||
|
|
||||||
|
float pointSize = PenThickness * 1.5f;
|
||||||
|
|
||||||
foreach (KeyValuePair<OsmNode, double> kv in gScoreDict)
|
foreach (KeyValuePair<OsmNode, double> kv in gScoreDict)
|
||||||
{
|
{
|
||||||
@ -165,9 +167,9 @@ public static class Renderer
|
|||||||
float x = (kv.Key.coordinates.longitude - minLon) * scaleFactor;
|
float x = (kv.Key.coordinates.longitude - minLon) * scaleFactor;
|
||||||
float y = (maxLat - kv.Key.coordinates.latitude) * scaleFactor;
|
float y = (maxLat - kv.Key.coordinates.latitude) * scaleFactor;
|
||||||
|
|
||||||
x -= PenThickness / 2;
|
x -= pointSize / 2;
|
||||||
y -= PenThickness / 2;
|
y -= pointSize / 2;
|
||||||
g.FillEllipse(b, x, y, PenThickness, PenThickness);
|
g.FillEllipse(b, x, y, pointSize, pointSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new ValueTuple<Image, Bounds>(ret, new Bounds(minLat,minLon,maxLat,maxLon));
|
return new ValueTuple<Image, Bounds>(ret, new Bounds(minLat,minLon,maxLat,maxLon));
|
||||||
|
Reference in New Issue
Block a user