mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
18 lines
501 B
C#
18 lines
501 B
C#
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)
|
|
);
|
|
}
|
|
}
|
|
} |