public static void UpdateTransformation(this EvasObject platformView, IView?view) { if (view == null) { return; } // prepare the EFL effect structure Rect geometry = platformView.Geometry; EvasMap map = new EvasMap(4); map.PopulatePoints(geometry, 0); bool changed = false; view.ApplyScale(map, geometry, ref changed); view.ApplyRotation(platformView, map, geometry, ref changed); view.ApplyTranslation(map, geometry, ref changed); platformView.IsMapEnabled = changed; if (changed) { platformView.EvasMap = map; if (!s_movedHandlers.ContainsKey(platformView)) { // not registered moved handler s_movedHandlers[platformView] = () => platformView.UpdateTransformation(view); platformView.Moved += OnMoved; } } else { if (s_movedHandlers.ContainsKey(platformView)) { // need to unregister moved handler platformView.Moved -= OnMoved; s_movedHandlers.Remove(platformView); } } }