mirror of
https://github.com/bvanroll/cs-map-project.git
synced 2025-09-02 13:52:41 +00:00
scaling is nu gefixed, maar.. die colonies gaan ons altijd fucken
This commit is contained in:
@@ -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()
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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.
Reference in New Issue
Block a user