using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
namespace Microsoft.Research.DynamicDataDisplay
{
///
/// Represents a DataTransform that simply swaps points' coefficitiens from x to y and vice verca.
///
public sealed class SwapTransform : DataTransform
{
///
/// Initializes a new instance of the class.
///
public SwapTransform() { }
///
/// Transforms the point in data coordinates to viewport coordinates.
///
/// The point in data coordinates.
///
/// Transformed point in viewport coordinates.
///
public override Point DataToViewport(Point pt)
{
return new Point(pt.Y, pt.X);
}
///
/// Transforms the point in viewport coordinates to data coordinates.
///
/// The point in viewport coordinates.
/// Transformed point in data coordinates.
public override Point ViewportToData(Point pt)
{
return new Point(pt.Y, pt.X);
}
}
}