public void SetGraphProperties( RankDir value = RankDir.TopToBottom, Style style = Style.Default, string label = null, Ordering ordering = Ordering.None) { string text = null; switch (value) { case RankDir.BottomToTop: text = "BT"; break; case RankDir.TopToBottom: text = "TB"; break; case RankDir.RightToLeft: text = "RL"; break; case RankDir.LeftToRight: text = "LR"; break; } if (text != null) { writer.WriteLine("graph [rankdir={0}]", text); } if (label != null) { writer.WriteLine("graph [label=\"{0}\"]", Escape(label)); } if (style != Style.Default) { writer.WriteLine("graph [style={0}]", StyleToText(style)); } if (ordering != Ordering.None) { writer.WriteLine("graph [ordering={0}]", OrderingToText(ordering)); } }