Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/06/12 11:24:34 (12 years ago)
Author:
bburlacu
Message:

#1772: Separated instance-specific attributes of graph node objects from the generic genealogy graph, into metadata objects kept by the specific graph class which corresponds to the specific problem instance (so for instance the SymbolicExpressionTreeGenealogyGraph will keep info about node ranks and qualities etc because that info is specific to symbolic data analysis problems).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/VisualGenealogyGraphNode.cs

    r8236 r8248  
    2323using System.Collections.Generic;
    2424using System.Drawing;
    25 using HeuristicLab.Common;
    2625using HeuristicLab.Visualization;
    2726
     
    7574      get { return new PointD((LowerLeft.X + UpperRight.X) / 2, (LowerLeft.Y + UpperRight.Y) / 2); }
    7675    }
    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     }
    9776  }
    9877}
Note: See TracChangeset for help on using the changeset viewer.