mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
17 lines
519 B
C#
17 lines
519 B
C#
using System.Drawing;
|
|
|
|
namespace Artemis.Core.Extensions
|
|
{
|
|
public static class RgbRectangleExtensions
|
|
{
|
|
public static Rectangle ToDrawingRectangle(this global::RGB.NET.Core.Rectangle rectangle, double scale)
|
|
{
|
|
return new Rectangle(
|
|
(int) (rectangle.Location.X * scale),
|
|
(int) (rectangle.Location.Y * scale),
|
|
(int) (rectangle.Size.Width * scale),
|
|
(int) (rectangle.Size.Height * scale)
|
|
);
|
|
}
|
|
}
|
|
} |