public override string toString(int depth) { string output = Utils.blanks(depth) + "(Composite3d) #elements:" + _components.Count + " | isDisplayed=" + this.Displayed; if (_detailedToString) { int k = 0; lock (_components) { foreach (AbstractDrawable c in _components) { AbstractComposite cAC = c as AbstractComposite; if (cAC != null) { output += "\r\n" + ((AbstractComposite)c).toString(depth + 1); } else if (c != null) { output += "\r\n" + Utils.blanks(depth + 1) + "Composite element[" + k + "]:" + c.ToString(); } else { output += "\r\n" + Utils.blanks(depth + 1) + "(null)"; } k += 1; } } } return(output); }
/// <summary> /// A utility to change polygon offset fill status of a <see cref="AbstractComposite"/> containing <see cref="Polygon"/>s. /// </summary> /// <param name="composite"></param> /// <param name="polygonOffsetFillEnable">status to apply to all polygons contained in composite (and recursively to child composites)</param> /// <remarks></remarks> public static void SetPolygonOffsetFillEnable(AbstractComposite composite, bool polygonOffsetFillEnable) { foreach (AbstractDrawable d in composite.GetDrawables) { Polygon dP = d as Polygon; AbstractComposite dC = d as AbstractComposite; if (dP != null) { dP.PolygonOffsetFillEnable = polygonOffsetFillEnable; } else if (dC != null) { SetPolygonOffsetFillEnable(dC, polygonOffsetFillEnable); } } }