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 f0db2d7942
commit b3e035cfb3
20 files changed
+169 -132

No files matched your search

@@ -0,0 +1,15 @@
using System;
using RGB.NET.Core;
using Color = System.Windows.Media.Color;
namespace Artemis.UI.Extensions
{
public static class RgbColorExtensions
{
public static Color ToMediaColor(this RGB.NET.Core.Color color)
{
var (_, r, g, b) = color.GetRGBBytes();
return Color.FromRgb(r, g, b);
}
}
}
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RGB.NET.Core;
namespace Artemis.UI.Extensions
{
public static class RgbRectangleExtensions
{
public static System.Drawing.Rectangle ToDrawingRectangle(this Rectangle rectangle)
{
return new System.Drawing.Rectangle((int) rectangle.X, (int) rectangle.Y, (int) rectangle.Width, (int) rectangle.Height);
}
}
}