Changeset 15421 for branches/HeuristicLab.VariableInteractionNetworks/HeuristicLab.VariableInteractionNetworks.Views/3.3/DirectedGraphChart.cs
- Timestamp:
- 10/17/17 13:13:04 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.VariableInteractionNetworks/HeuristicLab.VariableInteractionNetworks.Views/3.3/DirectedGraphChart.cs
r14275 r15421 26 26 using System.Linq; 27 27 using System.Windows.Forms; 28 using HeuristicLab.Common;29 28 using HeuristicLab.Core; 30 29 using HeuristicLab.Random; … … 158 157 shape.Move(new Offset(pos.X, pos.Y)); 159 158 } 160 var colors = ColorGradient.GrayscaledColors; 159 161 160 foreach (var pair in arcRoutes) { 162 161 var arc = pair.Key; … … 167 166 Pen pen; 168 167 var penWidth = weight / max * 3; 169 var colorIndex = (int)Math.Min(255, weight / max * 255); 170 if (colorIndex < 0) colorIndex = 0; 171 if (colorIndex > 255) colorIndex = 255; 172 var penColor = colors[colorIndex]; 168 var penColor = Color.Black; 173 169 if (len == 2) { 174 170 if (double.IsInfinity(penWidth) || double.IsNaN(penWidth))
Note: See TracChangeset
for help on using the changeset viewer.