Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using Microsoft.Research.DynamicDataDisplay.Charts;
|
---|
6 |
|
---|
7 | namespace 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.