mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-11 04:57:15 +00:00
Fixed translation issue of devices not aligned to the surface origin
This commit is contained in:
1 parent
ac8ec602dd
commit
a3d9c6d16d
1 file changed
+1
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user