(Active ae1, Active ae2, Point64 pt)
| 1342 | } |
| 1343 | |
| 1344 | [MethodImpl(MethodImplOptions.AggressiveInlining)] |
| 1345 | private OutPt? AddLocalMaxPoly(Active ae1, Active ae2, Point64 pt) |
| 1346 | { |
| 1347 | if (IsJoined(ae1)) Split(ae1, pt); |
| 1348 | if (IsJoined(ae2)) Split(ae2, pt); |
| 1349 | |
| 1350 | if (IsFront(ae1) == IsFront(ae2)) |
| 1351 | { |
| 1352 | if (IsOpenEnd(ae1)) |
| 1353 | SwapFrontBackSides(ae1.outrec!); |
| 1354 | else if (IsOpenEnd(ae2)) |
| 1355 | SwapFrontBackSides(ae2.outrec!); |
| 1356 | else |
| 1357 | { |
| 1358 | _succeeded = false; |
| 1359 | return null; |
| 1360 | } |
| 1361 | } |
| 1362 | |
| 1363 | OutPt result = AddOutPt(ae1, pt); |
| 1364 | if (ae1.outrec == ae2.outrec) |
| 1365 | { |
| 1366 | OutRec outrec = ae1.outrec!; |
| 1367 | outrec.pts = result; |
| 1368 | |
| 1369 | if (_using_polytree) |
| 1370 | { |
| 1371 | Active? e = GetPrevHotEdge(ae1); |
| 1372 | if (e == null) |
| 1373 | outrec.owner = null; |
| 1374 | else |
| 1375 | SetOwner(outrec, e.outrec!); |
| 1376 | // nb: outRec.owner here is likely NOT the real |
| 1377 | // owner but this will be fixed in DeepCheckOwner() |
| 1378 | } |
| 1379 | UncoupleOutRec(ae1); |
| 1380 | } |
| 1381 | // and to preserve the winding orientation of outrec ... |
| 1382 | else if (IsOpen(ae1)) |
| 1383 | { |
| 1384 | if (ae1.windDx < 0) |
| 1385 | JoinOutrecPaths(ae1, ae2); |
| 1386 | else |
| 1387 | JoinOutrecPaths(ae2, ae1); |
| 1388 | } |
| 1389 | else if (ae1.outrec!.idx < ae2.outrec!.idx) |
| 1390 | JoinOutrecPaths(ae1, ae2); |
| 1391 | else |
| 1392 | JoinOutrecPaths(ae2, ae1); |
| 1393 | return result; |
| 1394 | } |
| 1395 | |
| 1396 | [MethodImpl(MethodImplOptions.AggressiveInlining)] |
| 1397 | private static void JoinOutrecPaths(Active ae1, Active ae2) |
nothing calls this directly
no test coverage detected