Changeset 10650 for branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SymbolicDataAnalysisExpressionLineageExplorerChart.cs
- Timestamp:
- 03/24/14 16:59:22 (11 years ago)
- Location:
- branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views merged: 10545,10561,10564
- Property svn:mergeinfo changed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SymbolicDataAnalysisExpressionLineageExplorerChart.cs
r10517 r10650 1 1 using System.Collections.Generic; 2 2 using System.Drawing; 3 using System.Windows.Forms; 3 4 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views; 4 5 using HeuristicLab.Visualization; … … 59 60 } 60 61 } 62 63 protected override void pictureBox_MouseUp(object sender, MouseEventArgs e) { 64 base.pictureBox_MouseUp(sender, e); 65 // get the selected primitive and update it's graphics 66 var point = new Point(e.X, e.Y); 67 68 var selectedPrimitives = Chart.GetAllPrimitives(point); 69 // first primitive in the list should be the tile, the second one should be the actual primitive representing a tree node 70 var tile = (SymbolicExpressionTreeTile)selectedPrimitives[0]; 71 var selectedPrimitive = (RectangularPrimitiveBase)selectedPrimitives[1]; 72 var tree = tile.SymbolicExpressionTree; // use the tree to get the genealogy graph node and the fragments used for tracing building blocks 73 74 var pen = new Pen(Color.Blue); 75 using (var g = Graphics.FromImage(pictureBox.Image)) { 76 g.DrawRectangle(pen, (float)selectedPrimitive.LowerLeft.X, (float)selectedPrimitive.LowerLeft.Y, (float)selectedPrimitive.Size.Width, (float)selectedPrimitive.Size.Height); 77 } 78 } 61 79 } 62 80 }
Note: See TracChangeset
for help on using the changeset viewer.