mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Made the keyboard darken option available in the code.
This commit is contained in:
parent
5db2c3a789
commit
50a681d9e9
@ -16,6 +16,9 @@ namespace Artemis.KeyboardProviders.Corsair
|
|||||||
Name = "Corsair Gaming K95 RGB";
|
Name = "Corsair Gaming K95 RGB";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Enables the SDK and sets updatemode to manual as well as the color of the background to black.
|
||||||
|
/// </summary>
|
||||||
public override void Enable()
|
public override void Enable()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -35,13 +38,14 @@ namespace Artemis.KeyboardProviders.Corsair
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Properly resizes any size bitmap to the keyboard by creating a rectangle whose size is dependent on the bitmap size.
|
/// Properly resizes any size bitmap to the keyboard by creating a rectangle whose size is dependent on the bitmap size.
|
||||||
|
/// Does not reset the color each time. Uncomment line 48 for collor reset.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="bitmap"></param>
|
/// <param name="bitmap"></param>
|
||||||
public override void DrawBitmap(Bitmap bitmap)
|
public override void DrawBitmap(Bitmap bitmap)
|
||||||
{
|
{
|
||||||
RectangleF[,] ledRectangles = new RectangleF[bitmap.Width, bitmap.Height];
|
RectangleF[,] ledRectangles = new RectangleF[bitmap.Width, bitmap.Height];
|
||||||
RectangleKeyGroup[,] ledGroups = new RectangleKeyGroup[bitmap.Width, bitmap.Height];
|
RectangleKeyGroup[,] ledGroups = new RectangleKeyGroup[bitmap.Width, bitmap.Height];
|
||||||
|
//_keyboard.Brush = new SolidColorBrush(Color.Black);
|
||||||
for (var x = 0 ; x < bitmap.Width; x++)
|
for (var x = 0 ; x < bitmap.Width; x++)
|
||||||
{
|
{
|
||||||
for (var y = 0; y < bitmap.Height; y++)
|
for (var y = 0; y < bitmap.Height; y++)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user