Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/23/08 15:44:47 (15 years ago)
Author:
bspisic
Message:

#424
Implemented zooming by holding the control key + scrolling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Visualization/ZoomListener.cs

    r1055 r1058  
    5353
    5454    #endregion
     55
     56    public static RectangleD ZoomClippingArea(RectangleD clippingArea, double zoomFactor) {
     57      double x1, x2, y1, y2, width, height;
     58
     59      width = clippingArea.Width * zoomFactor;
     60      height = clippingArea.Height * zoomFactor;
     61
     62      x1 = clippingArea.X1 - (width - clippingArea.Width) / 2;
     63      y1 = clippingArea.Y1 - (height - clippingArea.Height) / 2;
     64      x2 = width + x1;
     65      y2 = height + y1;
     66
     67      return new RectangleD(x1, y1, x2, y2);
     68    }
    5569  }
    5670}
Note: See TracChangeset for help on using the changeset viewer.