Changeset 8248 for branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/VisualGenealogyGraphNode.cs
- Timestamp:
- 07/06/12 11:24:34 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/VisualGenealogyGraphNode.cs
r8236 r8248 23 23 using System.Collections.Generic; 24 24 using System.Drawing; 25 using HeuristicLab.Common;26 25 using HeuristicLab.Visualization; 27 26 … … 75 74 get { return new PointD((LowerLeft.X + UpperRight.X) / 2, (LowerLeft.Y + UpperRight.Y) / 2); } 76 75 } 77 78 public Color ToColor() {79 // return Color.FromArgb((int)((1 - Data.Quality) * 255), (int)(Data.Quality * 255), 0);80 int i = (int)(Data.Quality * ColorGradient.Colors.Count);81 if (i == ColorGradient.Colors.Count) --i;82 return ColorGradient.Colors[i];83 }84 85 public override void Draw(Graphics graphics) {86 if (Data.IsElite) {87 Point p = Chart.TransformWorldToPixel(new PointD(LowerLeft.X, LowerLeft.Y + Size.Height));88 Size s = Chart.TransformWorldToPixel(Size);89 if (Brush != null)90 graphics.FillEllipse(Brush, p.X, p.Y, s.Width, s.Height);91 graphics.DrawEllipse(Pen, p.X, p.Y, s.Width, s.Height);92 graphics.DrawEllipse(Pen, p.X + 2, p.Y + 2, s.Width - 4, s.Height - 4);93 } else {94 base.Draw(graphics);95 }96 }97 76 } 98 77 }
Note: See TracChangeset
for help on using the changeset viewer.