Added base class for location/size-handling and refactored devices and leds to make use of it

This commit is contained in:
DarthAffe committed 2021-02-09 23:11:01 +01:00
1 parent 6a4ebb3d2a
commit d44223ee6a
21 files changed
+349 -322

No files matched your search

@@ -54,13 +54,7 @@ namespace RGB.NET.Devices.SteelSeries
int counter = 0;
foreach (KeyValuePair<LedId, SteelSeriesLedId> mapping in ledMapping)
AddLed(mapping.Key, new Point((counter++) * 10, 0), new Size(10, 10));
if (Size == Size.Invalid)
{
Rectangle ledRectangle = new(this.Select(x => x.LedRectangle));
Size = ledRectangle.Size + new Size(ledRectangle.Location.X, ledRectangle.Location.Y);
}
UpdateQueue = updateQueue;
}