Fix shape positioning on layer LED selection change

This commit is contained in:
Robert committed 2020-01-30 17:34:50 +01:00
1 parent cd1b75750e
commit f57aca3475
14 files changed
+89 -50

No files matched your search

+1 -2
View File
@@ -179,8 +179,7 @@ namespace Artemis.Core.Models.Profile
// Translation originates from the unscaled center of the shape and is tied to the anchor
var x = position.X * AbsoluteRectangle.Width - LayerShape.RenderRectangle.Width / 2 - relativeAnchor.X;
var y = position.Y * AbsoluteRectangle.Height - LayerShape.RenderRectangle.Height / 2 - relativeAnchor.Y;
canvas.RotateDegrees(rotation, anchor.X, anchor.Y);
canvas.Scale(size.Width, size.Height, anchor.X, anchor.Y);
canvas.Translate(x, y);