scaling is nu gefixed, maar.. die colonies gaan ons altijd fucken

This commit is contained in:
BuildTools
2020-08-06 14:20:51 +02:00
parent 6fca4f27cc
commit 6f9f68a937
27 changed files with 34 additions and 22 deletions

View File

@@ -34,9 +34,9 @@ namespace Globals
private void UpdateMaximumEnMinimum(PolygonPunten polygon)
{
if (polygon.MaximumX > MaximumX) MaximumX = polygon.MaximumX;
else if (polygon.MinimumX < MinimumX) MinimumX = polygon.MinimumX;
if (polygon.MinimumX < MinimumX) MinimumX = polygon.MinimumX;
if (polygon.MaximumY > MaximumY) MaximumY = polygon.MaximumY;
else if (polygon.MinimumY < MinimumY) MinimumY = polygon.MinimumY;
if (polygon.MinimumY < MinimumY) MinimumY = polygon.MinimumY;
}
public void UpdateMaximumEnMinimum()

View File

@@ -14,13 +14,22 @@ namespace Globals
{
Punten = punten;
Naam = naam;
MaximumX = Double.MinValue;
MaximumY = Double.MinValue;
MinimumX = Double.MaxValue;
MinimumY = Double.MaxValue;
UpdateMaxEnMinPunt();
}
public PolygonPunten(GeoJSON.Net.Geometry.Polygon polygon, string naam = "", bool reverse = true)
public PolygonPunten(Polygon polygon, string naam = "", bool reverse = true)
{
Naam = naam;
Punten = new List<Punt>();
MaximumX = Double.MinValue;
MaximumY = Double.MinValue;
MinimumX = Double.MaxValue;
MinimumY = Double.MaxValue;
foreach (LineString linestring in polygon.Coordinates)
{

View File

@@ -12,8 +12,8 @@ namespace Globals
Naam = naam;
if (Graden)
{
X = ConvertToPercentage(x) * 100;
Y = ConvertToPercentage(y) * 100;
X = ConvertToPercentage(x) * 50 + 50;
Y = ConvertToPercentage(y) * 50 + 50;
}
else
{
@@ -30,7 +30,7 @@ namespace Globals
public double ConvertToPercentage(double angle)
{
if (angle < 0) angle += 360;
return angle / 360;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.