mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-11 04:57:15 +00:00
Removed byte-component from color
This commit is contained in:
1 parent
558eb3eb5a
commit
fa396127ea
15 files changed
+241
-256
No files matched your search
@@ -32,9 +32,9 @@ namespace RGB.NET.Devices.Logitech
|
||||
Color color = dataSet.Values.First();
|
||||
|
||||
_LogitechGSDK.LogiLedSetTargetDevice(LogitechDeviceCaps.DeviceRGB);
|
||||
_LogitechGSDK.LogiLedSetLighting((int)Math.Round(color.RPercent * 100),
|
||||
(int)Math.Round(color.GPercent * 100),
|
||||
(int)Math.Round(color.BPercent * 100));
|
||||
_LogitechGSDK.LogiLedSetLighting((int)Math.Round(color.R * 100),
|
||||
(int)Math.Round(color.G * 100),
|
||||
(int)Math.Round(color.B * 100));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -158,10 +158,10 @@ namespace RGB.NET.Devices.Logitech
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal static void SetColor(byte[] bitmap, int offset, Color color)
|
||||
{
|
||||
bitmap[offset] = color.B;
|
||||
bitmap[offset + 1] = color.G;
|
||||
bitmap[offset + 2] = color.R;
|
||||
bitmap[offset + 3] = color.A;
|
||||
bitmap[offset] = color.GetB();
|
||||
bitmap[offset + 1] = color.GetG();
|
||||
bitmap[offset + 2] = color.GetR();
|
||||
bitmap[offset + 3] = color.GetA();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -51,9 +51,9 @@ namespace RGB.NET.Devices.Logitech
|
||||
}
|
||||
else
|
||||
_LogitechGSDK.LogiLedSetLightingForKeyWithKeyName((int)customData,
|
||||
(int)Math.Round(data.Value.RPercent * 100),
|
||||
(int)Math.Round(data.Value.GPercent * 100),
|
||||
(int)Math.Round(data.Value.BPercent * 100));
|
||||
(int)Math.Round(data.Value.R * 100),
|
||||
(int)Math.Round(data.Value.G * 100),
|
||||
(int)Math.Round(data.Value.B * 100));
|
||||
}
|
||||
|
||||
if (usesBitmap)
|
||||
|
||||
@@ -56,9 +56,9 @@ namespace RGB.NET.Devices.Logitech
|
||||
{
|
||||
int zone = (int)data.Key;
|
||||
_LogitechGSDK.LogiLedSetLightingForTargetZone(_deviceType, zone,
|
||||
(int)Math.Round(data.Value.RPercent * 100),
|
||||
(int)Math.Round(data.Value.GPercent * 100),
|
||||
(int)Math.Round(data.Value.BPercent * 100));
|
||||
(int)Math.Round(data.Value.R * 100),
|
||||
(int)Math.Round(data.Value.G * 100),
|
||||
(int)Math.Round(data.Value.B * 100));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user