Files
win8phoneApp/CampusAppWP8/CampusAppWP8/Model/Campusmap/MapModel.cs
2013-06-21 12:37:17 +02:00

63 lines
1.5 KiB
C#

//-----------------------------------------------------------------------
// <copyright file="LectureActivity.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>20.06.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Model.Campusmap
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
public class MapModel
{
public MapModel()
{
}
public string ImageSource { get; set; }
public double ImageWidth { get; set; }
public double ImageHeight { get; set; }
public double MapOffsetX { get; set; }
public double MapOffsetY { get; set; }
public Point RefPoint { get; set; }
public Point GetMapPoint(double x, double y)
{
x += this.MapOffsetX;
y += this.MapOffsetY;
return new Point(x, y);
}
public Point GetMapPoint(Point point)
{
return this.GetMapPoint(point.X, point.Y);
}
public Point GetMapFromRefPoint(Point point)
{
return this.GetMapFromRefPoint(point.X, point.Y);
}
public Point GetMapFromRefPoint(double x, double y)
{
x += this.RefPoint.X;
x += this.MapOffsetX;
y += this.RefPoint.Y;
y += this.MapOffsetY;
return new Point(x, y);
}
}
}