forked from CyanLabs/RGBSync
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSyncAuraBrush.cs
43 lines (30 loc) · 943 Bytes
/
SyncAuraBrush.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using System.Collections.Generic;
using RGB.NET.Core;
using RGB.NET.Devices.Asus;
namespace RGBSync
{
public class SyncAuraBrush : AbstractBrush
{
#region Properties & Fields
private AsusMainboardRGBDevice _device;
private Color _currentColor;
#endregion
#region Constructors
public SyncAuraBrush(AsusMainboardRGBDevice device)
{
this._device = device;
}
#endregion
#region Methods
public override void PerformRender(Rectangle rectangle, IEnumerable<BrushRenderTarget> renderTargets)
{
_currentColor = _device?.GetColors()[4] ?? Color.Transparent;
base.PerformRender(rectangle, renderTargets);
}
protected override Color GetColorAtPoint(Rectangle rectangle, BrushRenderTarget renderTarget)
{
return _currentColor;
}
#endregion
}
}