Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Problems.GrammaticalOptimization/DynamicDataDisplay/Common/Auxiliary/AxisPlacementExtensions.cs @ 13808

Last change on this file since 13808 was 12503, checked in by aballeit, 9 years ago

#2283 added GUI and charts; fixed MCTS

File size: 963 bytes
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using Microsoft.Research.DynamicDataDisplay.Charts;
6
7namespace Microsoft.Research.DynamicDataDisplay.Common.Auxiliary
8{
9  public static class AxisPlacementExtensions
10  {
11    public static bool IsHorizontal(this AxisPlacement placement)
12    {
13      return placement == AxisPlacement.Bottom || placement == AxisPlacement.Top;
14    }
15
16    public static bool IsVertical(this AxisPlacement placement)
17    {
18      return placement == AxisPlacement.Left || placement == AxisPlacement.Right;
19    }
20
21    public static ChangeType GetPanChangeType(this AxisPlacement placement)
22    {
23      if (placement.IsHorizontal())
24        return ChangeType.PanX;
25      else
26        return ChangeType.PanY;
27    }
28
29    public static ChangeType GetZoomChangeType(this AxisPlacement placement)
30    {
31      if (placement.IsHorizontal())
32        return ChangeType.ZoomX;
33      else
34        return ChangeType.ZoomY;
35    }
36  }
37}
Note: See TracBrowser for help on using the repository browser.