MCPcopy Create free account
hub / github.com/AngusJohnson/Clipper2 / SetOwner

Method SetOwner

CSharp/Clipper2Lib/Clipper.Engine.cs:670–684  ·  view source on GitHub ↗
(OutRec outrec, OutRec newOwner)

Source from the content-addressed store, hash-verified

668 }
669
670 [MethodImpl(MethodImplOptions.AggressiveInlining)]
671 private static void SetOwner(OutRec outrec, OutRec newOwner)
672 {
673 //precondition1: new_owner is never null
674 while (newOwner.owner != null && newOwner.owner.pts == null)
675 newOwner.owner = newOwner.owner.owner;
676
677 //make sure that outrec isn't an owner of newOwner
678 OutRec? tmp = newOwner;
679 while (tmp != null && tmp != outrec)
680 tmp = tmp.owner;
681 if (tmp != null)
682 newOwner.owner = outrec.owner;
683 outrec.owner = newOwner;
684 }
685
686 [MethodImpl(MethodImplOptions.AggressiveInlining)]
687 private static double Area(OutPt op)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected