From 9e1016d09a7d273b0ea1a54e5d4d0325f344b362 Mon Sep 17 00:00:00 2001 From: mohsens22 Date: Wed, 29 Dec 2021 15:35:12 +0000 Subject: [PATCH 1/3] Updated UWP deps --- .../GraphicsTester.WindowsUniversal.csproj | 2 +- .../Microsoft.Maui.Graphics.SharpDX.UWP.csproj | 2 +- .../Microsoft.Maui.Graphics.Win2D.UWP.csproj | 2 +- .../Microsoft.Maui.Graphics.Xaml.UWP.csproj | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/GraphicsTester.WindowsUniversal/GraphicsTester.WindowsUniversal.csproj b/samples/GraphicsTester.WindowsUniversal/GraphicsTester.WindowsUniversal.csproj index dc09b192..e7e75884 100644 --- a/samples/GraphicsTester.WindowsUniversal/GraphicsTester.WindowsUniversal.csproj +++ b/samples/GraphicsTester.WindowsUniversal/GraphicsTester.WindowsUniversal.csproj @@ -149,7 +149,7 @@ - 6.2.10 + 6.2.13 diff --git a/src/Microsoft.Maui.Graphics.SharpDX.UWP/Microsoft.Maui.Graphics.SharpDX.UWP.csproj b/src/Microsoft.Maui.Graphics.SharpDX.UWP/Microsoft.Maui.Graphics.SharpDX.UWP.csproj index 52cce4f7..25a740f5 100644 --- a/src/Microsoft.Maui.Graphics.SharpDX.UWP/Microsoft.Maui.Graphics.SharpDX.UWP.csproj +++ b/src/Microsoft.Maui.Graphics.SharpDX.UWP/Microsoft.Maui.Graphics.SharpDX.UWP.csproj @@ -124,7 +124,7 @@ - 6.2.10 + 6.2.13 4.2.0 diff --git a/src/Microsoft.Maui.Graphics.Win2D.UWP/Microsoft.Maui.Graphics.Win2D.UWP.csproj b/src/Microsoft.Maui.Graphics.Win2D.UWP/Microsoft.Maui.Graphics.Win2D.UWP.csproj index b852c9d3..e98ae3b3 100644 --- a/src/Microsoft.Maui.Graphics.Win2D.UWP/Microsoft.Maui.Graphics.Win2D.UWP.csproj +++ b/src/Microsoft.Maui.Graphics.Win2D.UWP/Microsoft.Maui.Graphics.Win2D.UWP.csproj @@ -121,7 +121,7 @@ - 6.2.10 + 6.2.13 1.25.0 diff --git a/src/Microsoft.Maui.Graphics.Xaml.UWP/Microsoft.Maui.Graphics.Xaml.UWP.csproj b/src/Microsoft.Maui.Graphics.Xaml.UWP/Microsoft.Maui.Graphics.Xaml.UWP.csproj index 653b8c56..0868e490 100644 --- a/src/Microsoft.Maui.Graphics.Xaml.UWP/Microsoft.Maui.Graphics.Xaml.UWP.csproj +++ b/src/Microsoft.Maui.Graphics.Xaml.UWP/Microsoft.Maui.Graphics.Xaml.UWP.csproj @@ -120,7 +120,7 @@ - 6.2.10 + 6.2.13 From 55c89a761ac5703aba2e66fd68f6c9afac67f544 Mon Sep 17 00:00:00 2001 From: mohsens22 Date: Wed, 29 Dec 2021 15:40:57 +0000 Subject: [PATCH 2/3] Fix compilation problem on WPF --- src/Microsoft.Maui.Graphics.Xaml.WPF/XamlCanvas.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.Maui.Graphics.Xaml.WPF/XamlCanvas.cs b/src/Microsoft.Maui.Graphics.Xaml.WPF/XamlCanvas.cs index a918f2c0..530d6596 100644 --- a/src/Microsoft.Maui.Graphics.Xaml.WPF/XamlCanvas.cs +++ b/src/Microsoft.Maui.Graphics.Xaml.WPF/XamlCanvas.cs @@ -433,8 +433,8 @@ protected override void NativeDrawLine(float x1, float y1, float x2, float y2) var item = GetOrCreateItem(ItemType.DrawLine); var element = (Line) item.Element; - var p1 = CurrentState.Transform.Transform(x1, y1); - var p2 = CurrentState.Transform.Transform(x2, y2); + var p1 = Vector2.Transform(new Vector2(x1, y1), CurrentState.Transform); + var p2 = Vector2.Transform(new Vector2(x2, y2), CurrentState.Transform); element.X1 = p1.X; element.Y1 = p1.Y; element.X2 = p2.X; From db90413f92fdf50633558f2a46235669ec08b0c6 Mon Sep 17 00:00:00 2001 From: mohsens22 Date: Wed, 29 Dec 2021 15:45:15 +0000 Subject: [PATCH 3/3] Fixed a crash problem in UWP --- src/Microsoft.Maui.Graphics.Xaml.UWP/XamlCanvasState.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.Maui.Graphics.Xaml.UWP/XamlCanvasState.cs b/src/Microsoft.Maui.Graphics.Xaml.UWP/XamlCanvasState.cs index a71b53cc..e3d168b1 100644 --- a/src/Microsoft.Maui.Graphics.Xaml.UWP/XamlCanvasState.cs +++ b/src/Microsoft.Maui.Graphics.Xaml.UWP/XamlCanvasState.cs @@ -233,7 +233,7 @@ public string Font get { var style = Fonts.CurrentService.GetFontStyleById(_font ?? "Arial"); - return new global::Windows.UI.Xaml.Media.FontFamily(style.FontFamily.Name); + return new global::Windows.UI.Xaml.Media.FontFamily(style != null ? style.FontFamily.Name : "Arial"); } }