Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/03/12 15:09:52 (12 years ago)
Author:
bburlacu
Message:

#1772: Modified genealogy graph chart and view to reflect changes in the class hierarchy.

File:
1 edited

Legend:

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

    r8248 r8556  
    2727namespace HeuristicLab.EvolutionaryTracking.Views {
    2828  public class VisualGenealogyGraphNode : Ellipse {
    29     public GenealogyGraphNode Data { get; internal set; }
     29    public IGenealogyGraphNode Data { get; internal set; }
    3030    private List<VisualGenealogyGraphArc> _incomingArcs = new List<VisualGenealogyGraphArc>();
    3131    private List<VisualGenealogyGraphArc> _outgoingArgs = new List<VisualGenealogyGraphArc>();
     
    7474      get { return new PointD((LowerLeft.X + UpperRight.X) / 2, (LowerLeft.Y + UpperRight.Y) / 2); }
    7575    }
     76
     77    public override void Draw(Graphics graphics) {
     78      Point p = Chart.TransformWorldToPixel(new PointD(LowerLeft.X, LowerLeft.Y + Size.Height));
     79      Size s = Chart.TransformWorldToPixel(Size);
     80      if (Brush != null)
     81        graphics.FillEllipse(Brush, p.X, p.Y, s.Width, s.Height);
     82      graphics.DrawEllipse(Pen, p.X, p.Y, s.Width, s.Height);
     83      if (((SymbolicExpressionGenealogyGraphNode)Data).IsElite) {
     84        graphics.DrawEllipse(Pen, p.X + 2, p.Y + 2, s.Width - 4, s.Height - 4);
     85      }
     86    }
    7687  }
    7788}
Note: See TracChangeset for help on using the changeset viewer.