Free cookie consent management tool by TermsFeed Policy Generator

Changeset 12384


Ignore:
Timestamp:
05/05/15 12:47:47 (7 years ago)
Author:
mkommend
Message:

#2365: Merged r12237 into stable.

Location:
stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views

  • stable/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeChart.cs

    r12009 r12384  
    299299
    300300    #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);
    303304      var visualNodes = visualTreeNodes.Values;
    304305      //draw nodes and connections
     
    366367      Image image = new Bitmap(Width, Height);
    367368      using (Graphics g = Graphics.FromImage(image)) {
    368         DrawFunctionTree(g, preferredNodeWidth, preferredNodeHeight, minHorizontalDistance, minVerticalDistance);
     369        DrawFunctionTree(g, preferredNodeWidth, preferredNodeHeight, minHorizontalDistance, minVerticalDistance, false);
    369370      }
    370371      image.Save(filename);
     
    376377        using (Metafile file = new Metafile(filename, g.GetHdc())) {
    377378          using (Graphics emfFile = Graphics.FromImage(file)) {
    378             DrawFunctionTree(emfFile, preferredNodeWidth, preferredNodeHeight, minHorizontalDistance, minVerticalDistance);
     379            DrawFunctionTree(emfFile, preferredNodeWidth, preferredNodeHeight, minHorizontalDistance, minVerticalDistance, false);
    379380          }
    380381        }
Note: See TracChangeset for help on using the changeset viewer.