void algorithm_FormatEdge(object sender, FormatEdgeEventArgs e) { CFGEdge edge = (CFGEdge)e.Edge; if (edge.Source.FlowControl == FlowControl.Branch) { e.EdgeFormatter.StrokeColor = Color.Blue; e.EdgeFormatter.Weight *= 2; } else { e.EdgeFormatter.StrokeColor = Color.Black; } switch (edge.BranchCondition.Type) { case BranchConditionType.True: { e.EdgeFormatter.Label.Value = "True"; e.EdgeFormatter.Style = GraphvizEdgeStyle.Solid; break; } case BranchConditionType.False: { e.EdgeFormatter.Label.Value = "False"; e.EdgeFormatter.Style = GraphvizEdgeStyle.Solid; break; } case BranchConditionType.SwitchCaseDefault: { e.EdgeFormatter.Label.Value = "Default:"; e.EdgeFormatter.Style = GraphvizEdgeStyle.Solid; break; } case BranchConditionType.SwitchCaseCondition: { e.EdgeFormatter.Label.Value = "Case:" + edge.BranchCondition.Data.ToString(); e.EdgeFormatter.Style = GraphvizEdgeStyle.Solid; break; } case BranchConditionType.ContextSwitch: { e.EdgeFormatter.Label.Value = "Context Switch"; e.EdgeFormatter.Style = GraphvizEdgeStyle.Dotted; break; } case BranchConditionType.Unconditional: { e.EdgeFormatter.Label.Value = ""; e.EdgeFormatter.Style = GraphvizEdgeStyle.Solid; break; } case BranchConditionType.ExceptionThrown: { e.EdgeFormatter.Label.Value = "Exception Thrown"; e.EdgeFormatter.Style = GraphvizEdgeStyle.Dashed; break; } } }
private void FormatEdge(Object sender, FormatEdgeEventArgs e) { IEdge edge = e.Edge; if (edge is ReversedEdge) edge = ((ReversedEdge)e.Edge).Wrapped; if (vis.Successors.ContainsValue(edge)) e.EdgeFormatter.StrokeColor = Color.Red; else e.EdgeFormatter.StrokeColor = Color.Black; if (edge is NamedEdge) { e.EdgeFormatter.Label.Value = ((NamedEdge)edge).Name; } else { e.EdgeFormatter.Label.Value=""; } }
void graphvis_edgeFormatterNN(object sender, FormatEdgeEventArgs e) { e.EdgeFormatter.Head = new GraphvizEdgeExtremity(true); e.EdgeFormatter.Weight = ((CondensedVertex)e.Edge.Target).ContainedTypes.Count; // Arrow.Shape = NGraphviz.Helpers.GraphvizArrowShape.Normal; }
void graphvis_edgeFormatter(object sender, FormatEdgeEventArgs e) { e.EdgeFormatter.Label.Value = ((NamedEdge)e.Edge).Name; e.EdgeFormatter.Font = new Font(FontFamily.GenericSerif, 6); e.EdgeFormatter.Head = new GraphvizEdgeExtremity(true); //e.EdgeFormatter.Weight = ((TypeVertex)e.Edge.Target).IncomingLinks; // Arrow.Shape = NGraphviz.Helpers.GraphvizArrowShape.Normal; }
private void FormatEdge(Object sender, FormatEdgeEventArgs args) { args.EdgeFormatter.Label.Value = (args.Edge as NamedEdge).Name; }
void gv_FormatEdge(object sender, FormatEdgeEventArgs e) { NamedEdge edge = e.Edge as NamedEdge; if (edge == null) return; e.EdgeFormatter.Label.Value = edge.Name; }
/// <summary> /// Format edge event handler /// </summary> /// <param name="sender"></param> /// <param name="args"></param> public void FormatEdge(Object sender, FormatEdgeEventArgs args) { NamedEdge e = (NamedEdge)args.Edge; args.EdgeFormatter.Label.Value = ((NamedEdge)args.Edge).Name; // setting the vertex name if (CurrentEdgePath!=null) { if (CurrentEdgePath.Contains(e)) { args.EdgeFormatter.Label.Value = String.Format("{0} ({1})", e.Name, m_CurrentEdgePath.IndexOf(e) ); args.EdgeFormatter.Style = GraphvizEdgeStyle.Bold; args.EdgeFormatter.Label.FontColor = Color.DarkGreen; args.EdgeFormatter.StrokeColor = Color.DarkGreen; } else { args.EdgeFormatter.Label.FontColor = Color.Gray; args.EdgeFormatter.StrokeColor = Color.Gray; args.EdgeFormatter.Style = GraphvizEdgeStyle.Unspecified; } } }
void graphviz_FormatEdge(object sender, FormatEdgeEventArgs e) { }
void graphviz_FormatEdge(object sender, FormatEdgeEventArgs e) { double cap = this.capacities[e.Edge]; string label = cap.ToString(); if (this.maxFlow != null) { double r = this.maxFlow.ResidualCapacities[e.Edge]; double f = this.capacities[e.Edge] - r; label = string.Format("{0} - {1}", label, f); } if (this.reversedEdgeAugmentor.AugmentedEdges.Contains(e.Edge)) e.EdgeFormatter.Style = NGraphviz.Helpers.GraphvizEdgeStyle.Dashed; else e.EdgeFormatter.Style = NGraphviz.Helpers.GraphvizEdgeStyle.Solid; e.EdgeFormatter.Label.Value = label; }