mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Possible STRAFE fix
This commit is contained in:
parent
985b840af3
commit
1fb78cf932
@ -7,6 +7,7 @@ using Artemis.Utilities;
|
||||
using CUE.NET;
|
||||
using CUE.NET.Brushes;
|
||||
using CUE.NET.Devices.Keyboard;
|
||||
using Point = System.Drawing.Point;
|
||||
|
||||
namespace Artemis.DeviceProviders.Corsair
|
||||
{
|
||||
@ -98,6 +99,19 @@ namespace Artemis.DeviceProviders.Corsair
|
||||
public override void DrawBitmap(Bitmap bitmap)
|
||||
{
|
||||
var image = ImageUtilities.ResizeImage(bitmap, Width, Height);
|
||||
|
||||
// For STRAFE, stretch the image on row 2.
|
||||
if (_keyboard.DeviceInfo.Model == "STRAFE RGB")
|
||||
{
|
||||
var strafeBitmap = new Bitmap(22, 8);
|
||||
using (var g = Graphics.FromImage(strafeBitmap))
|
||||
{
|
||||
g.DrawImage(image, new Point(0, 0));
|
||||
g.DrawImage(image, new Rectangle(0, 0, 22, 8), new Rectangle(0, 2, 22, 6), GraphicsUnit.Pixel);
|
||||
}
|
||||
image = strafeBitmap;
|
||||
}
|
||||
|
||||
var brush = new ImageBrush
|
||||
{
|
||||
Image = image
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user