Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/21/16 15:08:21 (8 years ago)
Author:
gkronber
Message:

#1966: refactoring

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Container2DView.xaml.cs

    r14151 r14154  
    7171      if (packing == null) return;
    7272      // the container should fill the whole size
    73       var scalingX = renderSize.Width / Packing.BinMeasures.Width;
    74       var scalingY = renderSize.Height / Packing.BinMeasures.Width;
     73      var scalingX = renderSize.Width / Packing.BinShape.Width;
     74      var scalingY = renderSize.Height / Packing.BinShape.Width;
    7575      // draw container
    7676      drawingContext.DrawRectangle(Brushes.LightGray, new Pen(Brushes.Black, 1), new Rect(new Point(0, 0), renderSize));
     
    7979      var unselectedBrush = selectedItemKey < 0 ? selectedBrush : Brushes.DarkGray;
    8080
    81       foreach (var t in Packing.ItemMeasures) {
     81      foreach (var t in Packing.Items) {
    8282        var key = t.Key;
    8383        var item = t.Value;
    84         var pos = Packing.ItemPositions[key];
     84        var pos = Packing.Positions[key];
    8585
    8686        var scaledPos = new Point(pos.X * scalingX, pos.Y * scalingY);
Note: See TracChangeset for help on using the changeset viewer.