Fixed device rotation/scaling in UI

This commit is contained in:
Robert committed 2019-11-22 17:30:07 +01:00
1 parent e7c891c7ba
commit 932fa3b6c6
14 files changed
+130 -108

No files matched your search

@@ -0,0 +1,18 @@
using System.Windows;
using RGB.NET.Core;
namespace Artemis.UI.Extensions
{
public static class RgbRectangleExtensions
{
public static Rect ToWindowsRect(this Rectangle rectangle, double scale)
{
return new Rect(
(int) (rectangle.Location.X * scale),
(int) (rectangle.Location.Y * scale),
(int) (rectangle.Size.Width * scale),
(int) (rectangle.Size.Height * scale)
);
}
}
}