Changeset 10830 for branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/GenealogyGraphChart.cs
- Timestamp:
- 05/09/14 15:11:16 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/GenealogyGraphChart.cs
r10827 r10830 53 53 54 54 private void Clear() { 55 if (nodeMap == null) 56 nodeMap = new Dictionary<IGenealogyGraphNode, VisualGenealogyGraphNode>(); 57 else nodeMap.Clear(); 58 59 if (arcMap == null) 60 arcMap = new Dictionary<Tuple<VisualGenealogyGraphNode, VisualGenealogyGraphNode>, VisualGenealogyGraphArc>(); 61 else arcMap.Clear(); 55 nodeMap = new Dictionary<IGenealogyGraphNode, VisualGenealogyGraphNode>(); 56 arcMap = new Dictionary<Tuple<VisualGenealogyGraphNode, VisualGenealogyGraphNode>, VisualGenealogyGraphArc>(); 62 57 63 58 Chart.Group.Clear(); … … 118 113 foreach (var node in nodes) { 119 114 var brush = new SolidBrush(node.GetColor()); 120 121 115 var visualNode = new VisualGenealogyGraphNode(Chart, x, y, x + diameter, y + diameter, defaultPen, brush) { 122 116 Data = node, … … 145 139 var pen = Pens.Transparent; 146 140 var visualArc = AddArc(Chart, visualParent, visualNode, pen); 147 if (!arcMap.ContainsKey(Tuple.Create(visualParent, visualNode))) 141 if (!arcMap.ContainsKey(Tuple.Create(visualParent, visualNode))) { 148 142 arcMap.Add(Tuple.Create(visualParent, visualNode), visualArc); 143 } 149 144 } 150 145 } … … 233 228 brush.Color = node.Data.GetColor(); 234 229 var arcs = arcSelector(node); 230 var pen = new Pen(Color.Transparent); 235 231 foreach (var arc in arcs) { 236 232 var source = arc.Source.Data; … … 238 234 var start = new Point((int)arc.Start.X, (int)arc.Start.Y); 239 235 var end = new Point((int)arc.End.X, (int)arc.End.Y); 240 arc.Pen = new Pen(Color.Transparent);236 arc.Pen = pen; 241 237 arc.Pen.Brush = new LinearGradientBrush(start, end, source.GetColor(), target.GetColor()); 242 238 DrawLineage(nodeSelector(arc), arcSelector, nodeSelector); … … 273 269 primitive.Pen = Pens.Transparent; 274 270 } else if (primitive is VisualGenealogyGraphNode) { 275 primitive.Brush = Brushes.Transparent;276 primitive.Pen = Pens.DarkGray;271 primitive.Brush = new SolidBrush(Color.Transparent); 272 primitive.Pen = new Pen(Color.DarkGray); 277 273 } 278 274 }
Note: See TracChangeset
for help on using the changeset viewer.