- Timestamp:
- 05/08/14 17:26:32 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/GenealogyGraphChart.cs
r10746 r10827 37 37 private const double Diameter = 20; 38 38 39 private readonly Brush defaultBrush; 40 private readonly Pen defaultPen; 41 39 42 public IGenealogyGraph GenealogyGraph { 40 43 get { return genealogyGraph; } … … 95 98 : base() { 96 99 InitializeComponent(); 100 101 defaultBrush = new SolidBrush(Color.Transparent); 102 defaultPen = new Pen(Color.DarkGray); 97 103 } 98 104 … … 111 117 112 118 foreach (var node in nodes) { 113 var pen = new Pen(Color.DarkGray);114 119 var brush = new SolidBrush(node.GetColor()); 115 120 116 var visualNode = new VisualGenealogyGraphNode(Chart, x, y, x + diameter, y + diameter, pen, brush) {121 var visualNode = new VisualGenealogyGraphNode(Chart, x, y, x + diameter, y + diameter, defaultPen, brush) { 117 122 Data = node, 118 123 ToolTipText = "Rank: " + node.Rank + nl + … … 138 143 var visualParent = GetMappedNode(parent); 139 144 if (visualParent == null) continue; 140 var pen = new Pen(Color.Transparent);145 var pen = Pens.Transparent; 141 146 var visualArc = AddArc(Chart, visualParent, visualNode, pen); 142 147 if (!arcMap.ContainsKey(Tuple.Create(visualParent, visualNode))) … … 233 238 var start = new Point((int)arc.Start.X, (int)arc.Start.Y); 234 239 var end = new Point((int)arc.End.X, (int)arc.End.Y); 240 arc.Pen = new Pen(Color.Transparent); 235 241 arc.Pen.Brush = new LinearGradientBrush(start, end, source.GetColor(), target.GetColor()); 236 arc.Pen.Color = Color.Transparent;237 242 DrawLineage(nodeSelector(arc), arcSelector, nodeSelector); 238 243 } … … 266 271 foreach (var primitive in Chart.Group.Primitives) { 267 272 if (primitive is VisualGenealogyGraphArc) { 268 primitive.Pen .Brush = new SolidBrush(Color.Transparent);273 primitive.Pen = Pens.Transparent; 269 274 } else if (primitive is VisualGenealogyGraphNode) { 270 var brush = (SolidBrush)primitive.Brush; 271 brush.Color = Color.Transparent; 272 primitive.Pen.Color = Color.DarkGray; 275 primitive.Brush = Brushes.Transparent; 276 primitive.Pen = Pens.DarkGray; 273 277 } 274 278 }
Note: See TracChangeset
for help on using the changeset viewer.