Core - Reworking color sampling to always use the same rect as used in rendering

This commit is contained in:
Robert committed 2021-09-10 22:59:14 +02:00
1 parent 9475f7cc0c
commit 55cfa65bb5
6 files changed
+151 -69

No files matched your search

+12 -2
View File
@@ -59,8 +59,18 @@ namespace Artemis.Core
internal void CalculateRectangles()
{
Rectangle = RgbLed.Boundary.ToSKRect();
AbsoluteRectangle = RgbLed.AbsoluteBoundary.ToSKRect();
Rectangle = Utilities.CreateScaleCompatibleRect(
RgbLed.Boundary.Location.X,
RgbLed.Boundary.Location.Y,
RgbLed.Boundary.Size.Width,
RgbLed.Boundary.Size.Height
);
AbsoluteRectangle = Utilities.CreateScaleCompatibleRect(
RgbLed.AbsoluteBoundary.Location.X,
RgbLed.AbsoluteBoundary.Location.Y,
RgbLed.AbsoluteBoundary.Size.Width,
RgbLed.AbsoluteBoundary.Size.Height
);
}
}
}