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

Method ToStringInternal

CSharp/Clipper2Lib/Clipper.Engine.cs:3532–3546  ·  view source on GitHub ↗
(int idx, int level)

Source from the content-addressed store, hash-verified

3530 }
3531
3532 internal string ToStringInternal(int idx, int level)
3533 {
3534 string result = "", padding = "", plural = "s";
3535 if (_childs.Count == 1) plural = "";
3536 padding = padding.PadLeft(level * 2);
3537 if ((level & 1) == 0)
3538 result += $"{padding}+- hole ({idx}) contains {_childs.Count} nested polygon{plural}.\n";
3539 else
3540 result += $"{padding}+- polygon ({idx}) contains {_childs.Count} hole{plural}.\n";
3541
3542 for (int i = 0; i < Count; i++)
3543 if (_childs[i].Count > 0)
3544 result += _childs[i].ToStringInternal(i, level +1);
3545 return result;
3546 }
3547
3548 public override string ToString()
3549 {

Callers 1

ToStringMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected