Added GDI-based rendering test

This commit is contained in:
SpoinkyNL committed 2018-04-15 18:41:31 +02:00
1 parent 610b45e017
commit 60544e7814
21 files changed
+382 -111

No files matched your search

+9
View File
@@ -1,9 +1,12 @@
using System;
using System.Threading.Tasks;
using Artemis.Core.Events;
using Artemis.Core.RGB.NET;
using Artemis.Core.Services.Interfaces;
using RGB.NET.Brushes;
using RGB.NET.Core;
using RGB.NET.Devices.Corsair;
using RGB.NET.Groups;
namespace Artemis.Core.Services
{
@@ -28,6 +31,7 @@ namespace Artemis.Core.Services
/// <inheritdoc />
public RGBSurface Surface { get; set; }
public GraphicsDecorator GraphicsDecorator { get; private set; }
/// <inheritdoc />
public async Task LoadDevices()
@@ -51,6 +55,11 @@ namespace Artemis.Core.Services
Surface.AlignDevices();
});
// Apply the application wide brush and decorator
var background = new ListLedGroup(Surface.Leds) { Brush = new SolidColorBrush(new Color(255, 255, 255, 255)) };
GraphicsDecorator = new GraphicsDecorator(background);
background.Brush.AddDecorator(GraphicsDecorator);
OnFinishedLoadedDevices();
}