Reference local build of RGB.NET

Rewrote UI LED-rendering, performance needs some work
This commit is contained in:
SpoinkyNL committed 2019-08-19 22:03:37 +02:00
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);
}
}
}