diff options
author | Stephane Delcroix <stephane@delcroix.org> | 2017-02-06 15:16:54 +0100 |
---|---|---|
committer | Stephane Delcroix <stephane@delcroix.org> | 2017-02-06 15:16:54 +0100 |
commit | fc7d556848e731902d096953c9b4fb28a2466e6b (patch) | |
tree | c3c9f63f93bcf77af253aa027acc9648d2ffa7dd /Xamarin.Forms.Platform.iOS | |
parent | 28237b7b27ef318b2c811e9829c2442613c42feb (diff) | |
download | xamarin-forms-fc7d556848e731902d096953c9b4fb28a2466e6b.tar.gz xamarin-forms-fc7d556848e731902d096953c9b4fb28a2466e6b.tar.bz2 xamarin-forms-fc7d556848e731902d096953c9b4fb28a2466e6b.zip |
[*] ScaleX and ScaleY
Diffstat (limited to 'Xamarin.Forms.Platform.iOS')
-rw-r--r-- | Xamarin.Forms.Platform.iOS/VisualElementTracker.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Xamarin.Forms.Platform.iOS/VisualElementTracker.cs b/Xamarin.Forms.Platform.iOS/VisualElementTracker.cs index 29840e2d..4ca75395 100644 --- a/Xamarin.Forms.Platform.iOS/VisualElementTracker.cs +++ b/Xamarin.Forms.Platform.iOS/VisualElementTracker.cs @@ -78,7 +78,7 @@ namespace Xamarin.Forms.Platform.MacOS { if (e.PropertyName == VisualElement.XProperty.PropertyName || e.PropertyName == VisualElement.YProperty.PropertyName || e.PropertyName == VisualElement.WidthProperty.PropertyName || e.PropertyName == VisualElement.HeightProperty.PropertyName || e.PropertyName == VisualElement.AnchorXProperty.PropertyName || e.PropertyName == VisualElement.AnchorYProperty.PropertyName || - e.PropertyName == VisualElement.TranslationXProperty.PropertyName || e.PropertyName == VisualElement.TranslationYProperty.PropertyName || e.PropertyName == VisualElement.ScaleProperty.PropertyName || + e.PropertyName == VisualElement.TranslationXProperty.PropertyName || e.PropertyName == VisualElement.TranslationYProperty.PropertyName || e.PropertyName == VisualElement.ScaleProperty.PropertyName || e.PropertyName == VisualElement.ScaleXProperty.PropertyName || e.PropertyName == VisualElement.ScaleYProperty.PropertyName || e.PropertyName == VisualElement.RotationProperty.PropertyName || e.PropertyName == VisualElement.RotationXProperty.PropertyName || e.PropertyName == VisualElement.RotationYProperty.PropertyName || e.PropertyName == VisualElement.IsVisibleProperty.PropertyName || e.PropertyName == VisualElement.IsEnabledProperty.PropertyName || e.PropertyName == VisualElement.InputTransparentProperty.PropertyName || e.PropertyName == VisualElement.OpacityProperty.PropertyName) @@ -135,6 +135,8 @@ namespace Xamarin.Forms.Platform.MacOS var rotationY = (float)view.RotationY; var rotation = (float)view.Rotation; var scale = (float)view.Scale; + var scaleX = (float)view.ScaleX * scale; + var scaleY = (float)view.ScaleY * scale; var width = (float)view.Width; var height = (float)view.Height; var x = (float)view.X; @@ -227,8 +229,8 @@ namespace Xamarin.Forms.Platform.MacOS if (Math.Abs(translationX) > epsilon || Math.Abs(translationY) > epsilon) transform = transform.Translate(translationX, translationY, 0); - if (Math.Abs(scale - 1) > epsilon) - transform = transform.Scale(scale); + if (Math.Abs(scaleX - 1) > epsilon || Math.Abs(scaleY - 1) > epsilon) + transform = transform.Scale(scaleX, scaleY, scale); // not just an optimization, iOS will not "pixel align" a view which has m34 set if (Math.Abs(rotationY % 180) > epsilon || Math.Abs(rotationX % 180) > epsilon) |