mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Added GDI-based rendering test
This commit is contained in:
1 parent
610b45e017
commit
60544e7814
21 files changed
+382
-111
No files matched your search
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user