mirror of
https://github.com/bvanroll/cs-map-project.git
synced 2025-08-29 20:02:43 +00:00
terug oude semi kapotte versie
This commit is contained in:
@@ -44,16 +44,26 @@ namespace Logica
|
||||
|
||||
public PolygonPunten ScalePolygon(PolygonPunten polygon, double scaleX, double scaleY, double offsetX = 180, double offsetY = 180)
|
||||
{
|
||||
double maxX = polygon.MaximumX;
|
||||
double maxY = polygon.MaximumY;
|
||||
double maxX = polygon.MaximumX - polygon.MinimumX;
|
||||
double maxY = polygon.MaximumY - polygon.MinimumY;
|
||||
double minX = polygon.MinimumX;
|
||||
double minY = polygon.MinimumY;
|
||||
List<Punt> returnWaarde = new List<Punt>();
|
||||
foreach (Punt punt in polygon.Punten)
|
||||
{
|
||||
Punt x = ScalePoint(scaleX, scaleY,punt, maxX, maxY, offsetX, offsetY);
|
||||
x.Naam = punt.Naam;
|
||||
returnWaarde.Add(x);
|
||||
//Punt x = ScalePoint(scaleX, scaleY, punt, maxX, maxY, offsetX, offsetY);
|
||||
|
||||
double x = punt.X - minX;
|
||||
x /= maxX;
|
||||
x *= scaleX;
|
||||
x += offsetX;
|
||||
double y = punt.Y - minY;
|
||||
y /= maxY;
|
||||
y *= scaleY;
|
||||
y += offsetY;
|
||||
returnWaarde.Add(new Punt(x, y, punt.Naam));
|
||||
//x.Naam = punt.Naam;
|
||||
//returnWaarde.Add(x);
|
||||
}
|
||||
return new PolygonPunten(returnWaarde, polygon.Naam);
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
49af496af2f1df8211268fd2e6c93944e9ef3197
|
||||
19911095ba0015434cd13d58c152e22fd47e8005
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user