- Timestamp:
- 05/05/15 12:47:47 (10 years ago)
- Location:
- stable
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 12237
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views merged: 12237
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeChart.cs
r12009 r12384 299 299 300 300 #region methods for painting the symbolic expression tree 301 private void DrawFunctionTree(Graphics graphics, int preferredWidth, int preferredHeight, int minHDistance, int minVDistance) { 302 CalculateLayout(preferredWidth, preferredHeight, minHDistance, minVDistance); 301 private void DrawFunctionTree(Graphics graphics, int preferredWidth, int preferredHeight, int minHDistance, int minVDistance, bool recalculateLayout = true) { 302 if (recalculateLayout) 303 CalculateLayout(preferredWidth, preferredHeight, minHDistance, minVDistance); 303 304 var visualNodes = visualTreeNodes.Values; 304 305 //draw nodes and connections … … 366 367 Image image = new Bitmap(Width, Height); 367 368 using (Graphics g = Graphics.FromImage(image)) { 368 DrawFunctionTree(g, preferredNodeWidth, preferredNodeHeight, minHorizontalDistance, minVerticalDistance );369 DrawFunctionTree(g, preferredNodeWidth, preferredNodeHeight, minHorizontalDistance, minVerticalDistance, false); 369 370 } 370 371 image.Save(filename); … … 376 377 using (Metafile file = new Metafile(filename, g.GetHdc())) { 377 378 using (Graphics emfFile = Graphics.FromImage(file)) { 378 DrawFunctionTree(emfFile, preferredNodeWidth, preferredNodeHeight, minHorizontalDistance, minVerticalDistance );379 DrawFunctionTree(emfFile, preferredNodeWidth, preferredNodeHeight, minHorizontalDistance, minVerticalDistance, false); 379 380 } 380 381 }
Note: See TracChangeset
for help on using the changeset viewer.