Free cookie consent management tool by TermsFeed Policy Generator

Changeset 10729 for branches


Ignore:
Timestamp:
04/07/14 22:48:28 (11 years ago)
Author:
bburlacu
Message:

#1772: Changed orientation of trees in the SymbolicExpressionTreeTile. Added a graphical bounding rectangle for each tile.

Location:
branches/HeuristicLab.EvolutionTracking
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeTile.cs

    r10728 r10729  
    157157        }
    158158      }
     159
     160      // add a bounding rectangle and flip primitives vertically
     161      // draw a rectangle to mark the countour of this tile
     162      var size = this.Size;
     163      var height = size.Height;
     164      var rectangle = new Rectangle(this.Chart, new PointD(0, 0), new PointD(size.Width, size.Height)) {
     165        Pen = new Pen(Color.Gray),
     166        Brush = new SolidBrush(Color.Transparent)
     167      };
     168      this.Add(rectangle);
     169
     170      foreach (var primitive in Primitives) {
     171        var rpb = primitive as RectangularPrimitiveBase;
     172        if (rpb != null) {
     173          rpb.SetPosition(rpb.LowerLeft.X, height - rpb.UpperRight.Y, rpb.UpperRight.X, height - rpb.LowerLeft.Y);
     174        } else {
     175          var line = primitive as LinearPrimitiveBase;
     176          if (line != null) {
     177            line.SetPosition(line.Start.X, height - line.Start.Y, line.End.X, height - line.End.Y);
     178          }
     179        }
     180      }
    159181    }
    160182  }
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/FragmentGraphView.cs

    r10728 r10729  
    2929      InitializeComponent();
    3030
    31       layoutEngine = new ReingoldTilfordLayoutEngine<TileLayoutNode>(n => n.Children);
    32       symbolicExpressionEngine = new ReingoldTilfordLayoutEngine<ISymbolicExpressionTreeNode>(n => n.Subtrees);
     31      layoutEngine = new ReingoldTilfordLayoutEngine<TileLayoutNode>(n => n.Children) {
     32        HorizontalSpacing = 50,
     33        VerticalSpacing = 50,
     34      };
     35      symbolicExpressionEngine = new ReingoldTilfordLayoutEngine<ISymbolicExpressionTreeNode>(n => n.Subtrees) {
     36        HorizontalSpacing = 50,
     37        VerticalSpacing = 50,
     38        NodeWidth = 80,
     39        NodeHeight = 40
     40      };
    3341      tileDictionary = new Dictionary<IGenealogyGraphNode<IFragment<ISymbolicExpressionTreeNode>>, TileLayoutNode>();
    3442    }
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SymbolicExpressionChartControl.cs

    r10728 r10729  
    6767      foreach (var primitive in selectedPrimitives) {
    6868        if (primitive is SymbolicExpressionTreeTile) continue;
    69         primitive.Pen = new Pen(Color.Blue);
    70         primitive.Pen.Brush = new SolidBrush(Color.Blue);
     69        primitive.Pen = new Pen(Color.Blue) { Brush = new SolidBrush(Color.Blue) };
    7170      }
    7271      EnforceUpdate();
Note: See TracChangeset for help on using the changeset viewer.