Exemplo n.º 1
0
        private static void GetSelectedAbsoluteXAndY(GraphicalUiElement asGue, bool parentFlips, out float selectedObjectX, out float selectedObjectY)
        {
            selectedObjectX = asGue.AbsoluteX;
            selectedObjectY = asGue.AbsoluteY;

            if (parentFlips)
            {
                var     rotationMatrix = asGue.GetAbsoluteRotationMatrix();
                Vector3 offset         = new Vector3(asGue.GetAbsoluteWidth(), 0, 0);
                offset           = Vector3.Transform(offset, rotationMatrix);
                selectedObjectX += offset.X;
                selectedObjectY += offset.Y;
            }
        }