Changeset 12237 for trunk/sources
- Timestamp:
- 03/23/15 10:55:54 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeChart.cs
r12012 r12237 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.