mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-12 21:38:38 +00:00
Changed keyboard height and width to adjust dynamically
This commit is contained in:
parent
50a681d9e9
commit
ec5c4d82e8
@ -1,7 +1,7 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.23107.0
|
||||
VisualStudioVersion = 14.0.24720.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Artemis", "Artemis\Artemis.csproj", "{ED9997A2-E54C-4E9F-9350-62BE672C3ABE}"
|
||||
EndProject
|
||||
|
||||
@ -50,7 +50,7 @@ namespace Artemis.KeyboardProviders.Corsair
|
||||
{
|
||||
for (var y = 0; y < bitmap.Height; y++)
|
||||
{
|
||||
ledRectangles[x, y] = new RectangleF(_keyboard.KeyboardRectangle.X * (x*(485F / bitmap.Width / _keyboard.KeyboardRectangle.X)), _keyboard.KeyboardRectangle.Y*(y*(133F / bitmap.Height / _keyboard.KeyboardRectangle.Y)), 485F / bitmap.Width, 133F / bitmap.Height);
|
||||
ledRectangles[x, y] = new RectangleF(_keyboard.KeyboardRectangle.X * (x*(_keyboard.KeyboardRectangle.Width / bitmap.Width / _keyboard.KeyboardRectangle.X)), _keyboard.KeyboardRectangle.Y*(y*(_keyboard.KeyboardRectangle.Height / bitmap.Height / _keyboard.KeyboardRectangle.Y)), _keyboard.KeyboardRectangle.Width / bitmap.Width, _keyboard.KeyboardRectangle.Height / bitmap.Height);
|
||||
ledGroups[x, y] = new RectangleKeyGroup(_keyboard, ledRectangles[x, y], 0.1f) { Brush = new SolidColorBrush(bitmap.GetPixel(x, y)) };
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user