mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
Reference local build of RGB.NET
Rewrote UI LED-rendering, performance needs some work
This commit is contained in:
1 parent
d0feed790a
commit
71a6181df7
20 files changed
+169
-132
No files matched your search
@@ -0,0 +1,14 @@
|
||||
using RGB.NET.Core;
|
||||
using Color = System.Windows.Media.Color;
|
||||
|
||||
namespace Artemis.Core.Extensions
|
||||
{
|
||||
public static class RgbColorExtensions
|
||||
{
|
||||
public static Color ToMediaColor(this global::RGB.NET.Core.Color color)
|
||||
{
|
||||
var (_, r, g, b) = color.GetRGBBytes();
|
||||
return Color.FromRgb(r, g, b);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System.Drawing;
|
||||
|
||||
namespace Artemis.Core.Extensions
|
||||
{
|
||||
public static class RgbRectangleExtensions
|
||||
{
|
||||
public static Rectangle ToDrawingRectangle(this global::RGB.NET.Core.Rectangle rectangle)
|
||||
{
|
||||
return new Rectangle((int) rectangle.X, (int) rectangle.Y, (int) rectangle.Width, (int) rectangle.Height);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user