public static void Draw(INode node, PrimitiveBatch primitiveBatch) { IPrimitive primitive = node as IPrimitive; if (primitive != null) { primitive.Draw(primitiveBatch); } for (int i = 0; i < node.Children.Count; i++) { Draw(node.Children[i], primitiveBatch); } }
/// <summary> /// /// </summary> /// <param name="primitive"></param> /// <param name="color"></param> /// <param name="antiAlias"></param> /// <param name="fill"></param> public void Draw(IPrimitive primitive, Color color, bool antiAlias, bool fill) { if (primitive == null) { throw new ArgumentNullException("primitive"); } primitive.Draw(this, color, antiAlias, fill); }