Fixed translation issue of devices not aligned to the surface origin

This commit is contained in:
DarthAffe committed 2019-11-21 00:09:21 +01:00
1 parent ac8ec602dd
commit a3d9c6d16d
1 file changed
+1 -1
+1 -1
View File
@@ -240,7 +240,7 @@ namespace RGB.NET.Core
if (Device.Rotation.IsRotated)
{
Point deviceCenter = new Rectangle(Device.ActualSize).Center;
Point actualDeviceCenter = Device.DeviceRectangle.Center;
Point actualDeviceCenter = new Rectangle(Device.DeviceRectangle.Size).Center;
Point centerOffset = new Point(actualDeviceCenter.X - deviceCenter.X, actualDeviceCenter.Y - deviceCenter.Y);
actualLocation = actualLocation.Rotate(Device.Rotation, new Rectangle(Device.ActualSize).Center) + centerOffset;