public void WriteText(IGraphvizBuilder gb) { if (Type != AttributeType.None) { gb.Append(Type.ToString().ToLower()); gb.Append('['); } if (Attributes != null) { var isFirstAttribute = true; foreach (var attribute in Attributes) { if (!isFirstAttribute) { gb.Append(';'); } else { isFirstAttribute = false; } attribute.WriteText(gb); } } if (Type != AttributeType.None) { gb.Append(']'); } gb.AppendLine(); }
public void WriteText(IGraphvizBuilder gb) { gb.Append(Id); if (Port != null) { Port.WriteText(gb); } gb.Append('['); if (Attributes != null) { var isFirstAttribute = true; foreach (var attribute in Attributes) { if (!isFirstAttribute) { gb.Append(';'); } else { isFirstAttribute = false; } attribute.WriteText(gb); } } gb.Append(']'); gb.AppendLine(); }
public void WriteText(IGraphvizBuilder gb) { gb.Append("{ rank=same; "); var isFirst = true; foreach (var node in Nodes) { if (isFirst) { isFirst = false; } else { if (WithEdges) { if (_Graph is DiGraph) { gb.Append(" -> "); } else { gb.Append(" -- "); } } else { gb.Append("; "); } } gb.Append(node.Id); } gb.Append('}'); gb.AppendLine(); }
public void WriteText(IGraphvizBuilder gb) { gb.Append(Id); gb.Append("="); //gb.Append('"'); gb.Append(Value); //gb.Append('"'); }
public void WriteText(IGraphvizBuilder gb) { gb.Append('<'); if (Text != null) { foreach (var textItem in Text.TextItems) { gb.Append(textItem.Text); } } gb.Append('>'); }
public void WriteText(IGraphvizBuilder gb) { if (!string.IsNullOrEmpty(Id)) { gb.Append(':'); gb.Append(Id); } foreach (var compass in Compasses) { gb.Append(':'); gb.Append(string.Concat(Regex.Matches(compass.ToString(), "[A-Z]").OfType <Match>().Select(match => match.Value)).ToLowerInvariant()); } }
public override void WriteText(IGraphvizBuilder gb) { gb.Append("strict graph "); gb.Append(Id); gb.AppendLine(" {"); gb.IncreaseIndention(); foreach (var statement in Statements) { statement.WriteText(gb); } gb.DecreaseIndention(); gb.AppendLine("}"); }
public override void WriteText(IGraphvizBuilder gb) { if (IsStrict) { gb.Append("strict "); } gb.Append("digraph "); gb.Append(Id); gb.AppendLine(" {"); foreach (var statement in Statements) { statement.WriteText(gb); } gb.AppendLine("}"); }
public void WriteText(IGraphvizBuilder gb) { gb.Append(FromNode.Id); if (FromPort != null) { FromPort.WriteText(gb); } if (_Graph is DiGraph) { gb.Append("->"); } else { gb.Append("--"); } gb.Append(TargetNode.Id); if (TargetPort != null) { TargetPort.WriteText(gb); } gb.Append('['); if (Attributes != null) { var isFirstAttribute = true; foreach (var attribute in Attributes) { if (!isFirstAttribute) { gb.Append(';'); } else { isFirstAttribute = false; } attribute.WriteText(gb); } } else { } gb.Append(']'); gb.AppendLine(); }
public abstract void WriteText(IGraphvizBuilder gb);