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

+3 -2
View File
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Drawing;
using Artemis.Core.ProfileElements.Interfaces;
using Artemis.Core.Services.Interfaces;
using Artemis.Storage.Entities;
@@ -26,11 +27,11 @@ namespace Artemis.Core.ProfileElements
profileElement.Update(deltaTime);
}
public void Render(double deltaTime, RGBSurface surface)
public void Render(double deltaTime, RGBSurface surface, Graphics graphics)
{
// Folders don't render but their children do
foreach (var profileElement in Children)
profileElement.Render(deltaTime, surface);
profileElement.Render(deltaTime, surface, graphics);
}
public static Folder FromFolderEntity(Profile profile, FolderEntity folderEntity, IPluginService pluginService)
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Drawing;
using RGB.NET.Core;
namespace Artemis.Core.ProfileElements.Interfaces
@@ -29,6 +30,6 @@ namespace Artemis.Core.ProfileElements.Interfaces
/// <summary>
/// Renders the element
/// </summary>
void Render(double deltaTime, RGBSurface surface);
void Render(double deltaTime, RGBSurface surface, Graphics graphics);
}
}
+3 -2
View File
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using Artemis.Core.Plugins.Interfaces;
using Artemis.Core.ProfileElements.Interfaces;
using Artemis.Core.Services.Interfaces;
@@ -34,14 +35,14 @@ namespace Artemis.Core.ProfileElements
}
}
public void Render(double deltaTime, RGBSurface surface)
public void Render(double deltaTime, RGBSurface surface, Graphics graphics)
{
if (LayerType == null)
return;
lock (LayerType)
{
LayerType.Render(this, surface);
LayerType.Render(this, surface, graphics);
}
}
+3 -2
View File
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using Artemis.Core.Exceptions;
using Artemis.Core.Plugins.Models;
using Artemis.Core.ProfileElements.Interfaces;
@@ -34,7 +35,7 @@ namespace Artemis.Core.ProfileElements
}
}
public void Render(double deltaTime, RGBSurface surface)
public void Render(double deltaTime, RGBSurface surface, Graphics graphics)
{
lock (this)
{
@@ -42,7 +43,7 @@ namespace Artemis.Core.ProfileElements
throw new ArtemisCoreException($"Cannot render inactive profile: {this}");
foreach (var profileElement in Children)
profileElement.Render(deltaTime, surface);
profileElement.Render(deltaTime, surface, graphics);
}
}