From: test Date: Sat, 22 Aug 2020 12:00:18 +0000 (+0900) Subject: レンダー再作成時にDirectWriteのリソースも再作成するようにした X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=ac0b626480aa0d9bff58e6743461a72551a2beb5;p=fooeditengine%2FFooEditEngine.git レンダー再作成時にDirectWriteのリソースも再作成するようにした --- diff --git a/Core/Direct2D/D2DRenderCommon.cs b/Core/Direct2D/D2DRenderCommon.cs index 0f2efbb..ed6d9da 100644 --- a/Core/Direct2D/D2DRenderCommon.cs +++ b/Core/Direct2D/D2DRenderCommon.cs @@ -253,6 +253,9 @@ namespace FooEditEngine if(this.format != null) this.format.Dispose(); + if (this.HiddenChars != null) + this.HiddenChars = null; + float dpix, dpiy; this.GetDpi(out dpix, out dpiy); diff --git a/UWP/FooEditEngine.UWP/Direct2D/D2DRender.cs b/UWP/FooEditEngine.UWP/Direct2D/D2DRender.cs index 18294e8..94b1fb6 100644 --- a/UWP/FooEditEngine.UWP/Direct2D/D2DRender.cs +++ b/UWP/FooEditEngine.UWP/Direct2D/D2DRender.cs @@ -125,6 +125,7 @@ namespace FooEditEngine { this.DestructRenderAndResource(); this.ConstructRenderAndResoruce(width, height); + this.ReinitTextFormat(); } } } diff --git a/UWP/FooEditEngine.UWP/Direct2D/D2DRenderBase.cs b/UWP/FooEditEngine.UWP/Direct2D/D2DRenderBase.cs index f939545..2e7e937 100644 --- a/UWP/FooEditEngine.UWP/Direct2D/D2DRenderBase.cs +++ b/UWP/FooEditEngine.UWP/Direct2D/D2DRenderBase.cs @@ -89,6 +89,11 @@ namespace FooEditEngine this.textRender = new CustomTextRenderer(this.render, this.Brushes, this.Strokes, this.Foreground); } + public void ReinitTextFormat() + { + this.InitTextFormat(this.fontFamily.Source, (float)this.fontSize, this.GetDWFontWeigth(this.fontWeigth), this.GetDWFontStyle(this.fontStyle)); + } + public virtual void DestructRenderAndResource() { this.Brushes.Clear(); diff --git a/UWP/FooEditEngine.UWP/FooEditEngine.UWP.nuspec b/UWP/FooEditEngine.UWP/FooEditEngine.UWP.nuspec index 7ca9a2d..5a719de 100644 --- a/UWP/FooEditEngine.UWP/FooEditEngine.UWP.nuspec +++ b/UWP/FooEditEngine.UWP/FooEditEngine.UWP.nuspec @@ -2,7 +2,7 @@ FooEditEngine.UWP - 1.2.10 + 1.2.11 FooTextBox Foo Project Foo Project diff --git a/UWP/FooEditEngine.UWP/Properties/AssemblyInfo.cs b/UWP/FooEditEngine.UWP/Properties/AssemblyInfo.cs index 85ac5fd..5f69440 100644 --- a/UWP/FooEditEngine.UWP/Properties/AssemblyInfo.cs +++ b/UWP/FooEditEngine.UWP/Properties/AssemblyInfo.cs @@ -24,6 +24,6 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.1.2.10")] -[assembly: AssemblyFileVersion("1.1.2.10")] +[assembly: AssemblyVersion("1.1.2.11")] +[assembly: AssemblyFileVersion("1.1.2.11")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/WPF/FooEditEngine/FooEditEngine.nuspec b/WPF/FooEditEngine/FooEditEngine.nuspec index f481296..77840bb 100644 --- a/WPF/FooEditEngine/FooEditEngine.nuspec +++ b/WPF/FooEditEngine/FooEditEngine.nuspec @@ -2,7 +2,7 @@ FooEditEngine.WPF - 1.203.7.0 + 1.203.8.0 FooTextBox Foo Project Foo Project diff --git a/WPF/FooEditEngine/Properties/AssemblyInfo.cs b/WPF/FooEditEngine/Properties/AssemblyInfo.cs index 8105d11..805f820 100644 --- a/WPF/FooEditEngine/Properties/AssemblyInfo.cs +++ b/WPF/FooEditEngine/Properties/AssemblyInfo.cs @@ -51,8 +51,8 @@ using System.Windows; // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を // 既定値にすることができます: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.203.7.0")] -[assembly: AssemblyFileVersion("1.203.7.0")] +[assembly: AssemblyVersion("1.203.8.0")] +[assembly: AssemblyFileVersion("1.203.8.0")] #if DEBUG [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("UnitTest")] diff --git a/Windows/FooEditEngine/FooEditEngine.nuspec b/Windows/FooEditEngine/FooEditEngine.nuspec index 7501a69..e8ba11b 100644 --- a/Windows/FooEditEngine/FooEditEngine.nuspec +++ b/Windows/FooEditEngine/FooEditEngine.nuspec @@ -2,7 +2,7 @@ FooEditEngine.Windows - 1.34.8.0 + 1.34.9.0 FooTextBox Foo Project Foo Project diff --git a/Windows/FooEditEngine/Properties/AssemblyInfo.cs b/Windows/FooEditEngine/Properties/AssemblyInfo.cs index 0b43847..853cf0e 100644 --- a/Windows/FooEditEngine/Properties/AssemblyInfo.cs +++ b/Windows/FooEditEngine/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を // 既定値にすることができます: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.34.8.0")] -[assembly: AssemblyFileVersion("1.34.8.0")] +[assembly: AssemblyVersion("1.34.9.0")] +[assembly: AssemblyFileVersion("1.34.9.0")]