Changeset 12694 for branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeChart.cs
- Timestamp:
- 07/09/15 13:07:30 (9 years ago)
- Location:
- branches/HeuristicLab.Problems.Orienteering
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Problems.Orienteering
- Property svn:mergeinfo changed
-
Property
svn:global-ignores
set to
*.nuget
packages
-
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views
- Property svn:mergeinfo changed
-
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeChart.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 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.