mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Fixed device rotation/scaling in UI
This commit is contained in:
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)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user