A cross-platform UI framework for .NET
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

23 lines
686 B

// -----------------------------------------------------------------------
// <copyright file="PrimitiveExtensions.cs" company="Steven Kirk">
// Copyright 2013 MIT Licence. See licence.md for more information.
// </copyright>
// -----------------------------------------------------------------------
namespace Perspex.Direct2D1
{
using SharpDX;
public static class PrimitiveExtensions
{
public static Rect ToPerspex(this RectangleF r)
{
return new Rect(r.X, r.Y, r.Width, r.Height);
}
public static Vector2 ToSharpDX(this Perspex.Point p)
{
return new Vector2((float)p.X, (float)p.Y);
}
}
}