From 8a0386a5c41b7e7006a0ecb5b4e30fa67a3e2951 Mon Sep 17 00:00:00 2001 From: BuildTools Date: Thu, 30 Jul 2020 09:54:07 +0200 Subject: [PATCH] mogelijkheid meerdere items te selecteren (nu mss betere kaart eu?) --- .vs/opdracht2/v16/.suo | Bin 128512 -> 122880 bytes Globals/PolygonPunten.cs | 5 + .../DesignTimeResolveAssemblyReferences.cache | Bin 424 -> 424 bytes Logica/PolygonManipulatie.cs | 32 +++++ opdracht2/MainWindow.xaml | 1 + opdracht2/MainWindow.xaml.cs | 84 +++++++++---- .../obj/Debug/netcoreapp3.1/MainWindow.g.i.cs | 118 ++++++++++-------- 7 files changed, 163 insertions(+), 77 deletions(-) diff --git a/.vs/opdracht2/v16/.suo b/.vs/opdracht2/v16/.suo index 77d43ad88b957ceaba5a8bc11dbe181f7cb8896f..625e69d94f888a293aab038c40726e570401cf56 100644 GIT binary patch delta 2277 zcmb7EeQZ-z6o04dYhSmHbz`GrY-_jS+CkacZUYuJY}Uz#9j+zFha$28hQuiY3L!#Z z(_~Sp(e|P@1R_}C(1j0arA-9cn(>D*feiy9aS8Ar7(_$*&onyEd3}W$oaoK_y>ma# zJ@=j8`Q6ujPuo4H{lLzr^93LM?BLJfCjPG{MN}Z}BA!B+5f(vMBp)~%2NWDr6owHs%D6u2egewfXysa1(txwRDO^Nj^eE&>Ybr zJ18$og}Rw&DZNTW9wJSL7W-*Bh(e+x7eRDPjDvKne8@)*E+QW?S40QVkanJo4(kLT zX+r;Rbg-~qg->XjTL%=d9vx*dF#oixYEqCgGOke1Pme@dVQj46+5fSLB|Tng0fwOZ zDnVO^*^t4({L9*O0?C88lb1vZk3JL~Gg?&4>^vrWC7oV&akHKIYXhOm7O56}N%2ak z$~NY1bg(4Z8VtFrjSX3vLak&z+QHW+z?!k8Yh%276uP1B2T+CThD0D?r|3v_jz~Hj&7~RoC2?01s3rQ#Pz!a; zhahX{Fu_5#rel?wWXQfOw6f6-FO;!48{EN-bp=16=QITIUZB|NLE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D@ZMRJHne5RZS$U;e)@fTZpDcgFV$vj$aZ>89+gYn&|9qk7yr*37sD>a2XDe$_UiJI(=P>ZiKwYo#Pr9xPI zfvKJpl!xD@>te1%35RMsEN+2Yw8Az!R~)=Kp6(O28q3x_lp;5_(g1O?HqWreIj$(* zSs>bOt`MuLGyEQVza5%&VwC3tVJplMJ%=T+yTPR_YY@4|ZSuUyu;08{i^;38lJK+(zwMft(`H;PL9 zs>Qfz2U(FvdZ}2k_bK665fJ7r-GRlrKSP%*j`yfC36E z-8YA(=xLWcRZmu0FE7zk#a06iqEz`MJ!Q$C>d7KcH&B{9&_Fj7R@bgrP`k`qv#55= zEHl4|2EfSwc_bnuA2&!Tq4NiOId)&-e9MEvKp)bGp(mRIi%i>Gl76>lSnn?HdT7p- z`+vQD5D5&B#|32jq7)5+@oEkvX6)LvDzt+4A>Bnn#&(bv%{G zISG_u;^DjoZV7UIJf*Y$!zKsm0?$iL6G$Iu);76G8)(rt6_Jh$s+hMVli1U76PGMl zH;L{VD7*So-oC}uRuF7^m?}t~ww!FlxAyJ3v&)|;dFx!c sNhq6UC?vZ&s9m-?s4Q6a9v$f?tgGWi&zRKUkQ4M-!qujVO}F0rJHOL`sQ>@~ diff --git a/Globals/PolygonPunten.cs b/Globals/PolygonPunten.cs index 20ab643..c68ff8a 100644 --- a/Globals/PolygonPunten.cs +++ b/Globals/PolygonPunten.cs @@ -49,6 +49,11 @@ namespace Globals if (string.Equals(Naam, "", StringComparison.Ordinal)) return "UNKNOWN"; else return Naam; } + + public MultiPolygonPunten ToMultiPolygonPunten() + { + return new MultiPolygonPunten(new List() { this }, this.Naam); + } } } diff --git a/Globals/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/Globals/obj/Debug/DesignTimeResolveAssemblyReferences.cache index a8085e851b21311119fe9791b40f67170dfcba87..a8ec8df2f43e93a2dd1b8774dfda5924b6abc9bd 100644 GIT binary patch delta 13 UcmZ3%yn=ayKO-a0 delta 13 UcmZ3%yn=ayKO-a8 ScaleMultiPolygons(List multiPolygons, double scaleX, double scaleY) + { + double maxX = multiPolygons.Max(m => m.MaximumX); + double maxY = multiPolygons.Max(m => m.MaximumY); + double minX = multiPolygons.Min(m => m.MinimumX); + double minY = multiPolygons.Min(m => m.MinimumY); + List mpps = new List(); + foreach (MultiPolygonPunten mp in multiPolygons) + { + List pp = new List(); + foreach (PolygonPunten poly in mp.PolygonPunten) + { + List punten = new List(); + foreach (Punt punt in poly.Punten) + { + + double x = punt.X - minX; + x /= maxX; + x *= scaleX; + double y = punt.Y - minY; + y /= maxY; + y *= scaleY; + punten.Add(new Punt(x, y, punt.Naam)); + } + pp.Add(new PolygonPunten(punten, poly.Naam)); + } + mpps.Add(new MultiPolygonPunten(pp, mp.Naam)); + } + return mpps; + + } public List GetAllPolygons() { List lijst = new List(); diff --git a/opdracht2/MainWindow.xaml b/opdracht2/MainWindow.xaml index 56ce69b..21c5c38 100644 --- a/opdracht2/MainWindow.xaml +++ b/opdracht2/MainWindow.xaml @@ -21,6 +21,7 @@