mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Restructured the VM/Vs folder layout while it's still feasible
This commit is contained in:
1 parent
7443c0eda7
commit
368b73ce9c
48 files changed
+397
-469
No files matched your search
@@ -21,6 +21,7 @@ namespace Artemis.Plugins.Modules.General
|
||||
_settings = settings;
|
||||
DisplayName = "General";
|
||||
ExpandsMainDataModel = true;
|
||||
DeviceBrushes= new Dictionary<Device, TextureBrush>();
|
||||
|
||||
var testSetting = _settings.GetSetting("TestSetting", DateTime.Now);
|
||||
|
||||
@@ -82,17 +83,18 @@ namespace Artemis.Plugins.Modules.General
|
||||
{
|
||||
foreach (var device in surface.Devices)
|
||||
{
|
||||
using (var gradient = RenderGradientForDevice(device))
|
||||
{
|
||||
using (var brush = new TextureBrush(gradient, WrapMode.Tile))
|
||||
{
|
||||
brush.TranslateTransform((int) Math.Round(device.RenderRectangle.Width / 100.0 * MovePercentage), 0);
|
||||
graphics.FillPath(brush, device.RenderPath);
|
||||
}
|
||||
}
|
||||
if (!DeviceBrushes.ContainsKey(device))
|
||||
DeviceBrushes.Add(device, new TextureBrush(RenderGradientForDevice(device), WrapMode.Tile));
|
||||
|
||||
var brush = DeviceBrushes[device];
|
||||
brush.TranslateTransform((int) Math.Round(device.RenderRectangle.Width / 100.0 * MovePercentage), 0);
|
||||
graphics.FillPath(brush, device.RenderPath);
|
||||
brush.TranslateTransform((int)Math.Round(device.RenderRectangle.Width / 100.0 * MovePercentage) * -1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public Dictionary<Device, TextureBrush> DeviceBrushes { get; set; }
|
||||
|
||||
private Image RenderGradientForDevice(Device device)
|
||||
{
|
||||
var brush = new LinearGradientBrush(device.RenderRectangle, Color.Black, Color.Black, 0, false)
|
||||
|
||||
Reference in new issue
Block a user