diff --git a/src/DepCtrls/DepCtrl_Painter_Layer1_With_TextSupport/DepCtrl_Painter_Layer1_With_TextSupport.csproj b/src/DepCtrls/DepCtrl_Painter_Layer1_With_TextSupport/DepCtrl_Painter_Layer1_With_TextSupport.csproj index b8dfa8d7d..2e2afa936 100644 --- a/src/DepCtrls/DepCtrl_Painter_Layer1_With_TextSupport/DepCtrl_Painter_Layer1_With_TextSupport.csproj +++ b/src/DepCtrls/DepCtrl_Painter_Layer1_With_TextSupport/DepCtrl_Painter_Layer1_With_TextSupport.csproj @@ -46,12 +46,6 @@ RequestFont.cs - - TextBufferSpan.cs - - - TextSpanMeasureResult.cs - diff --git a/src/DepCtrls/DepCtrls_LayoutFarm_TextFlow/DepCtrls_LayoutFarm_TextFlow.csproj b/src/DepCtrls/DepCtrls_LayoutFarm_TextFlow/DepCtrls_LayoutFarm_TextFlow.csproj new file mode 100644 index 000000000..d9140d01e --- /dev/null +++ b/src/DepCtrls/DepCtrls_LayoutFarm_TextFlow/DepCtrls_LayoutFarm_TextFlow.csproj @@ -0,0 +1,40 @@ + + + + + Debug + AnyCPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB} + Library + Properties + DepCtrls_LayoutFarm_TextFlow + DepCtrls_LayoutFarm_TextFlow + v2.0 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + \ No newline at end of file diff --git a/src/DepCtrls/DepCtrls_LayoutFarm_TextFlow/Properties/AssemblyInfo.cs b/src/DepCtrls/DepCtrls_LayoutFarm_TextFlow/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..38ca091b6 --- /dev/null +++ b/src/DepCtrls/DepCtrls_LayoutFarm_TextFlow/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("DepCtrls_LayoutFarm_TextFlow")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("DepCtrls_LayoutFarm_TextFlow")] +[assembly: AssemblyCopyright("MIT")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("6d4d57ce-c741-46e4-addd-25de6d6c56eb")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// 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.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/MiniDev.sln b/src/MiniDev.sln index 5168aea51..8e65276d3 100644 --- a/src/MiniDev.sln +++ b/src/MiniDev.sln @@ -39,8 +39,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "x_merge_projects", "x_merge EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PixelFarm.MiniAgg.One", "x_merge_projects\PixelFarm.MiniAgg.One\PixelFarm.MiniAgg.One.csproj", "{82BB20F2-D26D-4617-BDFD-9679A3AAAE25}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PixelFarm.One.HtmlRenderer", "x_merge_projects\PixelFarm.One.HtmlRenderer\PixelFarm.One.HtmlRenderer.csproj", "{6F7A4449-9AE5-412B-A426-391E2CFC8969}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PixelFarm.Drawing.One", "x_merge_projects\PixelFarm.Drawing.One\PixelFarm.Drawing.One.csproj", "{9FD950C4-BA7B-4043-BB0F-70ACB364F718}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestFoundamentalVectors", "Tests\TestFoundamentalVectors\TestFoundamentalVectors.csproj", "{40D5D87B-B9DB-4C96-A896-EF6FDD0F4E75}" @@ -93,8 +91,6 @@ Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Typography.GlyphLayout", ". EndProject Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Typography.TextBreak", "..\..\Typography\Typography.TextBreak\Typography.TextBreak\Typography.TextBreak.shproj", "{9A99F103-B119-4A4D-8093-6A03BAA6D36B}" EndProject -Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Typography.TextFlow", "..\..\Typography\Typography.TextFlow\Typography.TextFlow.shproj", "{7A8A63D2-2CB5-41F5-8E83-6F6E54398CF4}" -EndProject Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Typography.TextServices", "..\..\Typography\Typography.TextServices\Typography.TextServices.shproj", "{D07686EE-2618-4C20-8EB5-32AD4C4D3810}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Typography.One", "PixelFarm\Typography.One\Typography.One.csproj", "{5278FAB9-33F0-40E0-ADCA-7237EA0E935B}" @@ -127,8 +123,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MiniOpenTKLevel2", "PixelFa EndProject Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Triangulation", "PixelFarm\BackEnd.Triangulation\Triangulation.shproj", "{4F435DA3-706A-4E6D-AE29-E1E95BD6F68A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PixelFarm.One.HtmlRenderer", "x_autogen2\PixelFarm.One.HtmlRenderer\PixelFarm.One.HtmlRenderer.csproj", "{662F2274-D6F8-413A-A908-1B2F10C01348}" -EndProject Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "PixelFarm.Drawing.GdiPlus_SH", "PixelFarm\PixelFarm.Drawing.GdiPlus_SH\PixelFarm.Drawing.GdiPlus_SH.shproj", "{4677024B-A1AB-4A8F-A074-70FF8F0E55DA}" EndProject Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "BackEnd.NativeWindows_SH", "PixelFarm\BackEnd.NativeWindows_SH\BackEnd.NativeWindows_SH.shproj", "{AD9DD0ED-C12A-4924-8625-1C10D0CB39D6}" @@ -243,6 +237,14 @@ Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "PixelFarm.Typography_SH", " EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DepCtrl_Painter_Layer1_With_TextSupport", "DepCtrls\DepCtrl_Painter_Layer1_With_TextSupport\DepCtrl_Painter_Layer1_With_TextSupport.csproj", "{C8C4EB0F-C324-4E11-832C-C701CF3E5D27}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DepCtrls_LayoutFarm_TextFlow", "DepCtrls\DepCtrls_LayoutFarm_TextFlow\DepCtrls_LayoutFarm_TextFlow.csproj", "{6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}" +EndProject +Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "LayoutFarm.TextFlow_SH", "PixelFarm\LayoutFarm.TextFlow_SH\LayoutFarm.TextFlow_SH.shproj", "{A32CFA00-8751-427A-A655-952C00FC991A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PixelFarm.One", "x_merge_projects\PixelFarm.One\PixelFarm.One.csproj", "{6F7A4449-9AE5-412B-A426-391E2CFC8969}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PixelFarm.One", "x_autogen2\PixelFarm.One\PixelFarm.One.csproj", "{48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}" +EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution PixelFarm\BackEnd.Triangulation\Triangulation.projitems*{06d5a76f-92d0-46a4-9ba9-86c65b631535}*SharedItemsImports = 4 @@ -277,7 +279,6 @@ Global ..\..\Typography\Typography.GlyphLayout\Typography.GlyphLayout.projitems*{5278fab9-33f0-40e0-adca-7237ea0e935b}*SharedItemsImports = 4 ..\..\Typography\Typography.OpenFont\Typography.OpenFont.projitems*{5278fab9-33f0-40e0-adca-7237ea0e935b}*SharedItemsImports = 4 ..\..\Typography\Typography.TextBreak\Typography.TextBreak\Typography.TextBreak.projitems*{5278fab9-33f0-40e0-adca-7237ea0e935b}*SharedItemsImports = 4 - ..\..\Typography\Typography.TextFlow\Typography.TextFlow.projitems*{5278fab9-33f0-40e0-adca-7237ea0e935b}*SharedItemsImports = 4 ..\..\Typography\Typography.TextServices\Typography.TextServices.projitems*{5278fab9-33f0-40e0-adca-7237ea0e935b}*SharedItemsImports = 4 PixelFarm\PixelFarm.CpuBlit_Layer1\PixelFarm.CpuBlit_Layer1_SH.projitems*{570b752c-a8d5-4c97-b8f5-6070757ce5ad}*SharedItemsImports = 4 PixelFarm\PixelFarm.Painter_Layer1_SH\PixelFarm.Painter_Layer1_SH.projitems*{570b752c-a8d5-4c97-b8f5-6070757ce5ad}*SharedItemsImports = 4 @@ -290,7 +291,6 @@ Global PixelFarm\BackEnd.PaintFx\PdnSharedProject\PdnSharedProject.projitems*{6ff96bfb-9e4b-4634-b682-7de60468da38}*SharedItemsImports = 13 PixelFarm\PixelFarm.DrawingGL_SH\PixelFarm.DrawingGL_SH.projitems*{73f1b81d-99a6-412e-ab6e-db399d32e2bf}*SharedItemsImports = 13 PixelFarm\BackEnd.MiniOpenTK\src\OpenTK\MiniOpenTK_Core2.projitems*{79d65c83-fafe-43c3-b49e-3e5eada1951e}*SharedItemsImports = 5 - ..\..\Typography\Typography.TextFlow\Typography.TextFlow.projitems*{7a8a63d2-2cb5-41f5-8e83-6f6e54398cf4}*SharedItemsImports = 13 PixelFarm\BackEnd.Tesselate_SH\BackEnd.Tesselate_SH.projitems*{7fe0fbe6-a805-4d4f-acea-b6b881189a48}*SharedItemsImports = 13 PixelFarm\PixelFarm.Vectors_SH\PixelFarm.Vectors_SH.projitems*{8073ac27-be12-4efd-a030-a97beb390ca1}*SharedItemsImports = 4 PixelFarm\PixelFarm.Painter_Layer2_SH\PixelFarm.Painter_Layer2_SH.projitems*{80d9da2c-b25e-4a77-b4d1-cba8ddbf76bf}*SharedItemsImports = 13 @@ -299,6 +299,7 @@ Global ..\..\Typography\Typography.TextBreak\Typography.TextBreak\Typography.TextBreak.projitems*{9a99f103-b119-4a4d-8093-6a03baa6d36b}*SharedItemsImports = 13 PixelFarm\PaintLab.Color\Colorful_SH\Colorful_SH.projitems*{9cc6310f-c116-449d-be97-63d152f98746}*SharedItemsImports = 4 PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\LayoutFarm.YourBasicCustomWidgets_SH.projitems*{9ee24857-0686-4faf-9411-856904e88452}*SharedItemsImports = 13 + PixelFarm\LayoutFarm.TextFlow_SH\LayoutFarm.TextFlow_SH.projitems*{a32cfa00-8751-427a-a655-952c00fc991a}*SharedItemsImports = 13 PixelFarm\PaintLab.Platforms.SH\PaintLab.Platforms.SH.projitems*{a3bba4d4-0c7d-4b1c-b451-75d15f661cc6}*SharedItemsImports = 13 PixelFarm\BackEnd.PaintFx\PdnSharedProject\PdnSharedProject.projitems*{a533e1c7-ab74-4bcf-bc7a-12d4dbbfa918}*SharedItemsImports = 4 PixelFarm\PaintLab.AppHost\PaintLab.AppHost.projitems*{a634550f-edad-4a1d-872c-730c2fd8c1c9}*SharedItemsImports = 4 @@ -314,6 +315,7 @@ Global PixelFarm\PixelFarm.CpuBlit_Layer1\PixelFarm.CpuBlit_Layer1_SH.projitems*{ccccd3d9-e573-416d-8313-6942c1f85718}*SharedItemsImports = 4 PixelFarm\PixelFarm.CpuBlit_Layer2\PixelFarm.CpuBlit_Layer2.projitems*{ccccd3d9-e573-416d-8313-6942c1f85718}*SharedItemsImports = 4 ..\..\Typography\Typography.TextServices\Typography.TextServices.projitems*{d07686ee-2618-4c20-8eb5-32ad4c4d3810}*SharedItemsImports = 13 + PixelFarm\LayoutFarm.TextFlow_SH\LayoutFarm.TextFlow_SH.projitems*{d2cc5cef-3003-4a5d-a532-8eb7e4fa40f2}*SharedItemsImports = 4 PixelFarm\BackEnd.MiniOpenTK\src\OpenTK\MiniOpenTK_Core1.projitems*{d49440c2-785f-4bac-9f2e-fc93603fa647}*SharedItemsImports = 4 PixelFarm\PixelFarm.Vectors_Utils_SH\PixelFarm.Vectors_Utils_SH.projitems*{d49bcb58-0126-473b-acfe-d1ff07395833}*SharedItemsImports = 4 ..\..\Typography\Typography.GlyphLayout\Typography.GlyphLayout.projitems*{d8861cf8-c506-472b-8a57-632bd6ca6496}*SharedItemsImports = 13 @@ -321,6 +323,7 @@ Global PixelFarm\PixelFarm.DrawingGL_SH\PixelFarm.DrawingGL_SH.projitems*{e1e89b3b-b529-4b17-b7ed-4c70cc8475eb}*SharedItemsImports = 4 PixelFarm\PaintLab.Platforms.SH\PaintLab.Platforms.SH.projitems*{e5f2b317-2205-4727-92c4-6190a2fa3ddc}*SharedItemsImports = 4 PixelFarm\PixelFarm.Drawing.GdiPlus_SH\PixelFarm.Drawing.GdiPlus_SH.projitems*{e5f2b317-2205-4727-92c4-6190a2fa3ddc}*SharedItemsImports = 4 + PixelFarm\LayoutFarm.TextFlow_SH\LayoutFarm.TextFlow_SH.projitems*{e6078fc1-3ae0-4e33-ae7c-75e7aaac7a02}*SharedItemsImports = 4 Tests\WinFormTestBed2\WinFormTestBed2.projitems*{e8df35e8-8765-47c2-bc1a-b686a058062c}*SharedItemsImports = 4 PixelFarm\PaintLab.AppHost\PaintLab.AppHost.projitems*{e906647b-3216-4cc1-b849-dd249f6737f4}*SharedItemsImports = 4 PixelFarm\BackEnd.MiniOpenTK\src\OpenTK\MiniOpenTK_Core1.projitems*{e9a5d738-bc13-4909-94d8-d7a13d7068ff}*SharedItemsImports = 4 @@ -1916,138 +1919,6 @@ Global {82BB20F2-D26D-4617-BDFD-9679A3AAAE25}.Release64|Win32.Build.0 = Release|Any CPU {82BB20F2-D26D-4617-BDFD-9679A3AAAE25}.Release64|x86.ActiveCfg = Release|Any CPU {82BB20F2-D26D-4617-BDFD-9679A3AAAE25}.Release64|x86.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW2|Any CPU.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW2|Any CPU.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW2|iPhone.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW2|iPhone.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW2|iPhoneSimulator.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW2|iPhoneSimulator.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW2|Mixed Platforms.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW2|Mixed Platforms.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW2|Win32.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW2|Win32.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW2|x86.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW2|x86.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW3|Any CPU.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW3|Any CPU.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW3|iPhone.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW3|iPhone.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW3|iPhoneSimulator.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW3|iPhoneSimulator.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW3|Mixed Platforms.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW3|Mixed Platforms.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW3|Win32.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW3|Win32.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW3|x86.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW3|x86.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW2|Any CPU.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW2|Any CPU.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW2|iPhone.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW2|iPhone.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW2|iPhoneSimulator.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW2|iPhoneSimulator.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW2|Mixed Platforms.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW2|Mixed Platforms.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW2|Win32.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW2|Win32.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW2|x86.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW2|x86.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW3|Any CPU.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW3|Any CPU.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW3|iPhone.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW3|iPhone.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW3|iPhoneSimulator.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW3|iPhoneSimulator.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW3|Mixed Platforms.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW3|Mixed Platforms.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW3|Win32.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW3|Win32.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW3|x86.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW3|x86.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug|iPhone.Build.0 = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug|Win32.ActiveCfg = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug|Win32.Build.0 = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug|x86.ActiveCfg = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug|x86.Build.0 = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug45|Any CPU.ActiveCfg = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug45|Any CPU.Build.0 = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug45|iPhone.ActiveCfg = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug45|iPhone.Build.0 = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug45|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug45|iPhoneSimulator.Build.0 = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug45|Mixed Platforms.ActiveCfg = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug45|Mixed Platforms.Build.0 = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug45|Win32.ActiveCfg = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug45|Win32.Build.0 = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug45|x86.ActiveCfg = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug45|x86.Build.0 = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Documentation|Any CPU.ActiveCfg = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Documentation|Any CPU.Build.0 = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Documentation|iPhone.ActiveCfg = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Documentation|iPhone.Build.0 = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Documentation|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Documentation|iPhoneSimulator.Build.0 = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Documentation|Mixed Platforms.ActiveCfg = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Documentation|Mixed Platforms.Build.0 = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Documentation|Win32.ActiveCfg = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Documentation|Win32.Build.0 = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Documentation|x86.ActiveCfg = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Documentation|x86.Build.0 = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Nsis|Any CPU.ActiveCfg = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Nsis|Any CPU.Build.0 = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Nsis|iPhone.ActiveCfg = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Nsis|iPhone.Build.0 = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Nsis|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Nsis|iPhoneSimulator.Build.0 = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Nsis|Mixed Platforms.ActiveCfg = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Nsis|Mixed Platforms.Build.0 = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Nsis|Win32.ActiveCfg = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Nsis|Win32.Build.0 = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Nsis|x86.ActiveCfg = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Nsis|x86.Build.0 = Debug|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release|Any CPU.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release|iPhone.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release|iPhone.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release|Win32.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release|Win32.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release|x86.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release|x86.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release45|Any CPU.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release45|Any CPU.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release45|iPhone.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release45|iPhone.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release45|iPhoneSimulator.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release45|iPhoneSimulator.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release45|Mixed Platforms.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release45|Mixed Platforms.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release45|Win32.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release45|Win32.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release45|x86.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release45|x86.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release64|Any CPU.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release64|Any CPU.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release64|iPhone.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release64|iPhone.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release64|iPhoneSimulator.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release64|iPhoneSimulator.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release64|Mixed Platforms.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release64|Mixed Platforms.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release64|Win32.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release64|Win32.Build.0 = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release64|x86.ActiveCfg = Release|Any CPU - {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release64|x86.Build.0 = Release|Any CPU {9FD950C4-BA7B-4043-BB0F-70ACB364F718}.Compatibility-GLFW2|Any CPU.ActiveCfg = Release|Any CPU {9FD950C4-BA7B-4043-BB0F-70ACB364F718}.Compatibility-GLFW2|Any CPU.Build.0 = Release|Any CPU {9FD950C4-BA7B-4043-BB0F-70ACB364F718}.Compatibility-GLFW2|iPhone.ActiveCfg = Release|Any CPU @@ -5084,138 +4955,6 @@ Global {79D65C83-FAFE-43C3-B49E-3E5EADA1951E}.Release64|Win32.Build.0 = Release|Any CPU {79D65C83-FAFE-43C3-B49E-3E5EADA1951E}.Release64|x86.ActiveCfg = Release|Any CPU {79D65C83-FAFE-43C3-B49E-3E5EADA1951E}.Release64|x86.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Compatibility-GLFW2|Any CPU.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Compatibility-GLFW2|Any CPU.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Compatibility-GLFW2|iPhone.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Compatibility-GLFW2|iPhone.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Compatibility-GLFW2|iPhoneSimulator.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Compatibility-GLFW2|iPhoneSimulator.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Compatibility-GLFW2|Mixed Platforms.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Compatibility-GLFW2|Mixed Platforms.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Compatibility-GLFW2|Win32.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Compatibility-GLFW2|Win32.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Compatibility-GLFW2|x86.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Compatibility-GLFW2|x86.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Compatibility-GLFW3|Any CPU.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Compatibility-GLFW3|Any CPU.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Compatibility-GLFW3|iPhone.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Compatibility-GLFW3|iPhone.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Compatibility-GLFW3|iPhoneSimulator.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Compatibility-GLFW3|iPhoneSimulator.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Compatibility-GLFW3|Mixed Platforms.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Compatibility-GLFW3|Mixed Platforms.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Compatibility-GLFW3|Win32.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Compatibility-GLFW3|Win32.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Compatibility-GLFW3|x86.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Compatibility-GLFW3|x86.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Core-GLFW2|Any CPU.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Core-GLFW2|Any CPU.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Core-GLFW2|iPhone.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Core-GLFW2|iPhone.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Core-GLFW2|iPhoneSimulator.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Core-GLFW2|iPhoneSimulator.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Core-GLFW2|Mixed Platforms.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Core-GLFW2|Mixed Platforms.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Core-GLFW2|Win32.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Core-GLFW2|Win32.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Core-GLFW2|x86.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Core-GLFW2|x86.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Core-GLFW3|Any CPU.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Core-GLFW3|Any CPU.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Core-GLFW3|iPhone.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Core-GLFW3|iPhone.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Core-GLFW3|iPhoneSimulator.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Core-GLFW3|iPhoneSimulator.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Core-GLFW3|Mixed Platforms.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Core-GLFW3|Mixed Platforms.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Core-GLFW3|Win32.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Core-GLFW3|Win32.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Core-GLFW3|x86.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Core-GLFW3|x86.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Debug|Any CPU.Build.0 = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Debug|iPhone.Build.0 = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Debug|Win32.ActiveCfg = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Debug|Win32.Build.0 = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Debug|x86.ActiveCfg = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Debug|x86.Build.0 = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Debug45|Any CPU.ActiveCfg = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Debug45|Any CPU.Build.0 = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Debug45|iPhone.ActiveCfg = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Debug45|iPhone.Build.0 = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Debug45|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Debug45|iPhoneSimulator.Build.0 = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Debug45|Mixed Platforms.ActiveCfg = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Debug45|Mixed Platforms.Build.0 = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Debug45|Win32.ActiveCfg = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Debug45|Win32.Build.0 = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Debug45|x86.ActiveCfg = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Debug45|x86.Build.0 = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Documentation|Any CPU.ActiveCfg = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Documentation|Any CPU.Build.0 = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Documentation|iPhone.ActiveCfg = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Documentation|iPhone.Build.0 = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Documentation|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Documentation|iPhoneSimulator.Build.0 = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Documentation|Mixed Platforms.ActiveCfg = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Documentation|Mixed Platforms.Build.0 = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Documentation|Win32.ActiveCfg = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Documentation|Win32.Build.0 = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Documentation|x86.ActiveCfg = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Documentation|x86.Build.0 = Debug|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Nsis|Any CPU.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Nsis|Any CPU.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Nsis|iPhone.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Nsis|iPhone.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Nsis|iPhoneSimulator.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Nsis|iPhoneSimulator.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Nsis|Mixed Platforms.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Nsis|Mixed Platforms.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Nsis|Win32.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Nsis|Win32.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Nsis|x86.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Nsis|x86.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release|Any CPU.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release|Any CPU.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release|iPhone.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release|iPhone.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release|Win32.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release|Win32.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release|x86.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release|x86.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release45|Any CPU.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release45|Any CPU.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release45|iPhone.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release45|iPhone.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release45|iPhoneSimulator.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release45|iPhoneSimulator.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release45|Mixed Platforms.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release45|Mixed Platforms.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release45|Win32.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release45|Win32.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release45|x86.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release45|x86.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release64|Any CPU.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release64|Any CPU.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release64|iPhone.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release64|iPhone.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release64|iPhoneSimulator.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release64|iPhoneSimulator.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release64|Mixed Platforms.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release64|Mixed Platforms.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release64|Win32.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release64|Win32.Build.0 = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release64|x86.ActiveCfg = Release|Any CPU - {662F2274-D6F8-413A-A908-1B2F10C01348}.Release64|x86.Build.0 = Release|Any CPU {12BD3FAF-A10B-4E38-9337-F5B28C6543B4}.Compatibility-GLFW2|Any CPU.ActiveCfg = Release|Any CPU {12BD3FAF-A10B-4E38-9337-F5B28C6543B4}.Compatibility-GLFW2|Any CPU.Build.0 = Release|Any CPU {12BD3FAF-A10B-4E38-9337-F5B28C6543B4}.Compatibility-GLFW2|iPhone.ActiveCfg = Release|Any CPU @@ -9566,6 +9305,402 @@ Global {C8C4EB0F-C324-4E11-832C-C701CF3E5D27}.Release64|Win32.Build.0 = Release|Any CPU {C8C4EB0F-C324-4E11-832C-C701CF3E5D27}.Release64|x86.ActiveCfg = Release|Any CPU {C8C4EB0F-C324-4E11-832C-C701CF3E5D27}.Release64|x86.Build.0 = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Compatibility-GLFW2|Any CPU.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Compatibility-GLFW2|Any CPU.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Compatibility-GLFW2|iPhone.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Compatibility-GLFW2|iPhone.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Compatibility-GLFW2|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Compatibility-GLFW2|iPhoneSimulator.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Compatibility-GLFW2|Mixed Platforms.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Compatibility-GLFW2|Mixed Platforms.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Compatibility-GLFW2|Win32.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Compatibility-GLFW2|Win32.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Compatibility-GLFW2|x86.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Compatibility-GLFW2|x86.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Compatibility-GLFW3|Any CPU.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Compatibility-GLFW3|Any CPU.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Compatibility-GLFW3|iPhone.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Compatibility-GLFW3|iPhone.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Compatibility-GLFW3|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Compatibility-GLFW3|iPhoneSimulator.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Compatibility-GLFW3|Mixed Platforms.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Compatibility-GLFW3|Mixed Platforms.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Compatibility-GLFW3|Win32.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Compatibility-GLFW3|Win32.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Compatibility-GLFW3|x86.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Compatibility-GLFW3|x86.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Core-GLFW2|Any CPU.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Core-GLFW2|Any CPU.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Core-GLFW2|iPhone.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Core-GLFW2|iPhone.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Core-GLFW2|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Core-GLFW2|iPhoneSimulator.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Core-GLFW2|Mixed Platforms.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Core-GLFW2|Mixed Platforms.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Core-GLFW2|Win32.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Core-GLFW2|Win32.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Core-GLFW2|x86.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Core-GLFW2|x86.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Core-GLFW3|Any CPU.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Core-GLFW3|Any CPU.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Core-GLFW3|iPhone.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Core-GLFW3|iPhone.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Core-GLFW3|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Core-GLFW3|iPhoneSimulator.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Core-GLFW3|Mixed Platforms.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Core-GLFW3|Mixed Platforms.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Core-GLFW3|Win32.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Core-GLFW3|Win32.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Core-GLFW3|x86.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Core-GLFW3|x86.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Debug|iPhone.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Debug|Win32.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Debug|Win32.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Debug|x86.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Debug|x86.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Debug45|Any CPU.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Debug45|Any CPU.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Debug45|iPhone.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Debug45|iPhone.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Debug45|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Debug45|iPhoneSimulator.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Debug45|Mixed Platforms.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Debug45|Mixed Platforms.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Debug45|Win32.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Debug45|Win32.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Debug45|x86.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Debug45|x86.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Documentation|Any CPU.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Documentation|Any CPU.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Documentation|iPhone.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Documentation|iPhone.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Documentation|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Documentation|iPhoneSimulator.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Documentation|Mixed Platforms.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Documentation|Mixed Platforms.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Documentation|Win32.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Documentation|Win32.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Documentation|x86.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Documentation|x86.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Nsis|Any CPU.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Nsis|Any CPU.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Nsis|iPhone.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Nsis|iPhone.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Nsis|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Nsis|iPhoneSimulator.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Nsis|Mixed Platforms.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Nsis|Mixed Platforms.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Nsis|Win32.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Nsis|Win32.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Nsis|x86.ActiveCfg = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Nsis|x86.Build.0 = Debug|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release|Any CPU.Build.0 = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release|iPhone.ActiveCfg = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release|iPhone.Build.0 = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release|Win32.ActiveCfg = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release|Win32.Build.0 = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release|x86.ActiveCfg = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release|x86.Build.0 = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release45|Any CPU.ActiveCfg = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release45|Any CPU.Build.0 = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release45|iPhone.ActiveCfg = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release45|iPhone.Build.0 = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release45|iPhoneSimulator.ActiveCfg = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release45|iPhoneSimulator.Build.0 = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release45|Mixed Platforms.ActiveCfg = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release45|Mixed Platforms.Build.0 = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release45|Win32.ActiveCfg = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release45|Win32.Build.0 = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release45|x86.ActiveCfg = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release45|x86.Build.0 = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release64|Any CPU.ActiveCfg = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release64|Any CPU.Build.0 = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release64|iPhone.ActiveCfg = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release64|iPhone.Build.0 = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release64|iPhoneSimulator.ActiveCfg = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release64|iPhoneSimulator.Build.0 = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release64|Mixed Platforms.ActiveCfg = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release64|Mixed Platforms.Build.0 = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release64|Win32.ActiveCfg = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release64|Win32.Build.0 = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release64|x86.ActiveCfg = Release|Any CPU + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB}.Release64|x86.Build.0 = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW2|Any CPU.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW2|Any CPU.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW2|iPhone.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW2|iPhone.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW2|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW2|iPhoneSimulator.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW2|Mixed Platforms.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW2|Mixed Platforms.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW2|Win32.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW2|Win32.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW2|x86.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW2|x86.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW3|Any CPU.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW3|Any CPU.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW3|iPhone.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW3|iPhone.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW3|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW3|iPhoneSimulator.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW3|Mixed Platforms.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW3|Mixed Platforms.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW3|Win32.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW3|Win32.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW3|x86.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Compatibility-GLFW3|x86.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW2|Any CPU.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW2|Any CPU.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW2|iPhone.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW2|iPhone.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW2|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW2|iPhoneSimulator.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW2|Mixed Platforms.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW2|Mixed Platforms.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW2|Win32.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW2|Win32.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW2|x86.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW2|x86.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW3|Any CPU.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW3|Any CPU.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW3|iPhone.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW3|iPhone.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW3|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW3|iPhoneSimulator.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW3|Mixed Platforms.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW3|Mixed Platforms.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW3|Win32.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW3|Win32.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW3|x86.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Core-GLFW3|x86.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug|iPhone.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug|Win32.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug|Win32.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug|x86.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug|x86.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug45|Any CPU.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug45|Any CPU.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug45|iPhone.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug45|iPhone.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug45|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug45|iPhoneSimulator.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug45|Mixed Platforms.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug45|Mixed Platforms.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug45|Win32.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug45|Win32.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug45|x86.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Debug45|x86.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Documentation|Any CPU.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Documentation|Any CPU.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Documentation|iPhone.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Documentation|iPhone.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Documentation|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Documentation|iPhoneSimulator.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Documentation|Mixed Platforms.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Documentation|Mixed Platforms.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Documentation|Win32.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Documentation|Win32.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Documentation|x86.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Documentation|x86.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Nsis|Any CPU.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Nsis|Any CPU.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Nsis|iPhone.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Nsis|iPhone.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Nsis|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Nsis|iPhoneSimulator.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Nsis|Mixed Platforms.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Nsis|Mixed Platforms.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Nsis|Win32.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Nsis|Win32.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Nsis|x86.ActiveCfg = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Nsis|x86.Build.0 = Debug|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release|Any CPU.Build.0 = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release|iPhone.ActiveCfg = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release|iPhone.Build.0 = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release|Win32.ActiveCfg = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release|Win32.Build.0 = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release|x86.ActiveCfg = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release|x86.Build.0 = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release45|Any CPU.ActiveCfg = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release45|Any CPU.Build.0 = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release45|iPhone.ActiveCfg = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release45|iPhone.Build.0 = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release45|iPhoneSimulator.ActiveCfg = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release45|iPhoneSimulator.Build.0 = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release45|Mixed Platforms.ActiveCfg = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release45|Mixed Platforms.Build.0 = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release45|Win32.ActiveCfg = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release45|Win32.Build.0 = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release45|x86.ActiveCfg = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release45|x86.Build.0 = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release64|Any CPU.ActiveCfg = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release64|Any CPU.Build.0 = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release64|iPhone.ActiveCfg = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release64|iPhone.Build.0 = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release64|iPhoneSimulator.ActiveCfg = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release64|iPhoneSimulator.Build.0 = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release64|Mixed Platforms.ActiveCfg = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release64|Mixed Platforms.Build.0 = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release64|Win32.ActiveCfg = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release64|Win32.Build.0 = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release64|x86.ActiveCfg = Release|Any CPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969}.Release64|x86.Build.0 = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Compatibility-GLFW2|Any CPU.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Compatibility-GLFW2|Any CPU.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Compatibility-GLFW2|iPhone.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Compatibility-GLFW2|iPhone.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Compatibility-GLFW2|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Compatibility-GLFW2|iPhoneSimulator.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Compatibility-GLFW2|Mixed Platforms.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Compatibility-GLFW2|Mixed Platforms.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Compatibility-GLFW2|Win32.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Compatibility-GLFW2|Win32.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Compatibility-GLFW2|x86.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Compatibility-GLFW2|x86.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Compatibility-GLFW3|Any CPU.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Compatibility-GLFW3|Any CPU.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Compatibility-GLFW3|iPhone.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Compatibility-GLFW3|iPhone.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Compatibility-GLFW3|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Compatibility-GLFW3|iPhoneSimulator.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Compatibility-GLFW3|Mixed Platforms.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Compatibility-GLFW3|Mixed Platforms.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Compatibility-GLFW3|Win32.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Compatibility-GLFW3|Win32.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Compatibility-GLFW3|x86.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Compatibility-GLFW3|x86.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Core-GLFW2|Any CPU.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Core-GLFW2|Any CPU.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Core-GLFW2|iPhone.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Core-GLFW2|iPhone.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Core-GLFW2|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Core-GLFW2|iPhoneSimulator.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Core-GLFW2|Mixed Platforms.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Core-GLFW2|Mixed Platforms.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Core-GLFW2|Win32.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Core-GLFW2|Win32.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Core-GLFW2|x86.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Core-GLFW2|x86.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Core-GLFW3|Any CPU.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Core-GLFW3|Any CPU.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Core-GLFW3|iPhone.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Core-GLFW3|iPhone.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Core-GLFW3|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Core-GLFW3|iPhoneSimulator.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Core-GLFW3|Mixed Platforms.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Core-GLFW3|Mixed Platforms.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Core-GLFW3|Win32.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Core-GLFW3|Win32.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Core-GLFW3|x86.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Core-GLFW3|x86.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Debug|iPhone.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Debug|Win32.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Debug|Win32.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Debug|x86.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Debug|x86.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Debug45|Any CPU.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Debug45|Any CPU.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Debug45|iPhone.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Debug45|iPhone.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Debug45|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Debug45|iPhoneSimulator.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Debug45|Mixed Platforms.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Debug45|Mixed Platforms.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Debug45|Win32.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Debug45|Win32.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Debug45|x86.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Debug45|x86.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Documentation|Any CPU.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Documentation|Any CPU.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Documentation|iPhone.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Documentation|iPhone.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Documentation|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Documentation|iPhoneSimulator.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Documentation|Mixed Platforms.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Documentation|Mixed Platforms.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Documentation|Win32.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Documentation|Win32.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Documentation|x86.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Documentation|x86.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Nsis|Any CPU.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Nsis|Any CPU.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Nsis|iPhone.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Nsis|iPhone.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Nsis|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Nsis|iPhoneSimulator.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Nsis|Mixed Platforms.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Nsis|Mixed Platforms.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Nsis|Win32.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Nsis|Win32.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Nsis|x86.ActiveCfg = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Nsis|x86.Build.0 = Debug|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release|Any CPU.Build.0 = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release|iPhone.ActiveCfg = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release|iPhone.Build.0 = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release|Win32.ActiveCfg = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release|Win32.Build.0 = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release|x86.ActiveCfg = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release|x86.Build.0 = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release45|Any CPU.ActiveCfg = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release45|Any CPU.Build.0 = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release45|iPhone.ActiveCfg = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release45|iPhone.Build.0 = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release45|iPhoneSimulator.ActiveCfg = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release45|iPhoneSimulator.Build.0 = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release45|Mixed Platforms.ActiveCfg = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release45|Mixed Platforms.Build.0 = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release45|Win32.ActiveCfg = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release45|Win32.Build.0 = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release45|x86.ActiveCfg = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release45|x86.Build.0 = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release64|Any CPU.ActiveCfg = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release64|Any CPU.Build.0 = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release64|iPhone.ActiveCfg = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release64|iPhone.Build.0 = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release64|iPhoneSimulator.ActiveCfg = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release64|iPhoneSimulator.Build.0 = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release64|Mixed Platforms.ActiveCfg = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release64|Mixed Platforms.Build.0 = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release64|Win32.ActiveCfg = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release64|Win32.Build.0 = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release64|x86.ActiveCfg = Release|Any CPU + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D}.Release64|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -9585,7 +9720,6 @@ Global {6317F5F0-BC4B-4BFD-B3C0-73C05C2AA11E} = {8BE95464-61A5-4C0A-99F8-DA6E32C52B78} {B106C6A9-1647-4267-824B-896486A6E697} = {A2D588B0-C60B-4C1E-B5EE-7B506C99C8C2} {82BB20F2-D26D-4617-BDFD-9679A3AAAE25} = {601D2DDA-967A-4913-A957-76CAC82ADD93} - {6F7A4449-9AE5-412B-A426-391E2CFC8969} = {601D2DDA-967A-4913-A957-76CAC82ADD93} {9FD950C4-BA7B-4043-BB0F-70ACB364F718} = {601D2DDA-967A-4913-A957-76CAC82ADD93} {40D5D87B-B9DB-4C96-A896-EF6FDD0F4E75} = {AFD8230C-6B5D-4298-BBD3-B23644A5793C} {15E44653-B4A9-40D5-9FCD-4BA476D80B12} = {A0563F0C-443D-4C97-9878-77496145DD55} @@ -9605,7 +9739,6 @@ Global {235A071B-8D06-40AE-A5C5-B1CE59715EE9} = {C1FD503F-59E2-4016-8AEA-831AC3231430} {D8861CF8-C506-472B-8A57-632BD6CA6496} = {C1FD503F-59E2-4016-8AEA-831AC3231430} {9A99F103-B119-4A4D-8093-6A03BAA6D36B} = {C1FD503F-59E2-4016-8AEA-831AC3231430} - {7A8A63D2-2CB5-41F5-8E83-6F6E54398CF4} = {C1FD503F-59E2-4016-8AEA-831AC3231430} {D07686EE-2618-4C20-8EB5-32AD4C4D3810} = {C1FD503F-59E2-4016-8AEA-831AC3231430} {5278FAB9-33F0-40E0-ADCA-7237EA0E935B} = {C1FD503F-59E2-4016-8AEA-831AC3231430} {EC1307C6-309F-43EA-BFCC-5219E2F5A103} = {C1FD503F-59E2-4016-8AEA-831AC3231430} @@ -9621,7 +9754,6 @@ Global {62E625EC-1C72-4D92-8405-9DFEE251D8BC} = {DAEBB742-71DF-40F8-A4FD-5DEAA01AFC5B} {79D65C83-FAFE-43C3-B49E-3E5EADA1951E} = {DAEBB742-71DF-40F8-A4FD-5DEAA01AFC5B} {4F435DA3-706A-4E6D-AE29-E1E95BD6F68A} = {5591DAAB-4897-472C-A408-7FCDD50DCEA0} - {662F2274-D6F8-413A-A908-1B2F10C01348} = {A0563F0C-443D-4C97-9878-77496145DD55} {4677024B-A1AB-4A8F-A074-70FF8F0E55DA} = {2EF747E4-862C-4B3E-B865-765B5385D7AC} {AD9DD0ED-C12A-4924-8625-1C10D0CB39D6} = {40520F7C-15E7-446F-8C15-E38A93A7B4B9} {9EE24857-0686-4FAF-9411-856904E88452} = {8BE95464-61A5-4C0A-99F8-DA6E32C52B78} @@ -9674,6 +9806,10 @@ Global {2EF3FF2B-BF9C-47F6-9EC6-1DC75B18CA67} = {20AC18A6-5250-4307-B341-EC3A463750EA} {EC0BD041-5BA5-409D-8FC6-AA9F2A6F862B} = {C1FD503F-59E2-4016-8AEA-831AC3231430} {C8C4EB0F-C324-4E11-832C-C701CF3E5D27} = {20AC18A6-5250-4307-B341-EC3A463750EA} + {6D4D57CE-C741-46E4-ADDD-25DE6D6C56EB} = {20AC18A6-5250-4307-B341-EC3A463750EA} + {A32CFA00-8751-427A-A655-952C00FC991A} = {C1FD503F-59E2-4016-8AEA-831AC3231430} + {6F7A4449-9AE5-412B-A426-391E2CFC8969} = {601D2DDA-967A-4913-A957-76CAC82ADD93} + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D} = {A0563F0C-443D-4C97-9878-77496145DD55} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {AD5DF903-2497-45EE-B3DC-1FAF5DA8F05C} diff --git a/src/PixelFarm/BackEnd.BurningMineCurve_SH/CubicBezier.cs b/src/PixelFarm/BackEnd.BurningMineCurve_SH/CubicBezier.cs index c5fb1a7fe..14e6b3c05 100644 --- a/src/PixelFarm/BackEnd.BurningMineCurve_SH/CubicBezier.cs +++ b/src/PixelFarm/BackEnd.BurningMineCurve_SH/CubicBezier.cs @@ -58,10 +58,10 @@ public CubicBezier(VECTOR p0, VECTOR p1, VECTOR p2, VECTOR p3) this.p0 = p0; this.p1 = p1; this.p2 = p2; - this.p3 = p3; + this.p3 = p3; } - public bool HasSomeNanComponent + public bool HasSomeNanComponent { get { @@ -173,7 +173,7 @@ public override int GetHashCode() /// http://en.wikipedia.org/wiki/Jenkins_hash_function /// I forget where I got these magic numbers from; supposedly they're good. /// - private struct JenkinsHash + ref struct JenkinsHash { private int _current; #if !UNITY && !PIXEL_FARM diff --git a/src/PixelFarm/BackEnd.MiniOpenTK/src/OpenTK/0_MyExtension/ES20mini/ES20.cs b/src/PixelFarm/BackEnd.MiniOpenTK/src/OpenTK/0_MyExtension/ES20mini/ES20.cs index c603cc7b9..6ba49cfa7 100644 --- a/src/PixelFarm/BackEnd.MiniOpenTK/src/OpenTK/0_MyExtension/ES20mini/ES20.cs +++ b/src/PixelFarm/BackEnd.MiniOpenTK/src/OpenTK/0_MyExtension/ES20mini/ES20.cs @@ -8,7 +8,15 @@ public partial class GL { public void LoadAll() { +#if DEBUG + System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch(); + sw.Start(); +#endif GLDelInit.LoadAll(); +#if DEBUG + sw.Stop(); + long ms1 = sw.ElapsedMilliseconds; +#endif } public static partial class Amd { diff --git a/src/PixelFarm/BackEnd.MiniOpenTK/src/OpenTK/0_MyExtension/ES20mini/ES20Delegate.cs b/src/PixelFarm/BackEnd.MiniOpenTK/src/OpenTK/0_MyExtension/ES20mini/ES20Delegate.cs index 51a08a124..2922c9e76 100644 --- a/src/PixelFarm/BackEnd.MiniOpenTK/src/OpenTK/0_MyExtension/ES20mini/ES20Delegate.cs +++ b/src/PixelFarm/BackEnd.MiniOpenTK/src/OpenTK/0_MyExtension/ES20mini/ES20Delegate.cs @@ -4653,8 +4653,8 @@ static void AssignDelegate(out T del, string funcName) del = (funcPtr == IntPtr.Zero) ? default(T) : (T)(object)(Marshal.GetDelegateForFunctionPointer(funcPtr, typeof(T))); } public static void LoadAll() - { - + { + AssignDelegate(out Delegates.glBeginPerfMonitorAMD, "glBeginPerfMonitorAMD"); AssignDelegate(out Delegates.glDeletePerfMonitorsAMD, "glDeletePerfMonitorsAMD"); AssignDelegate(out Delegates.glEndPerfMonitorAMD, "glEndPerfMonitorAMD"); diff --git a/src/PixelFarm/BackEnd.MiniOpenTK/src/OpenTK/0_MyExtension/ES30mini/ES30.cs b/src/PixelFarm/BackEnd.MiniOpenTK/src/OpenTK/0_MyExtension/ES30mini/ES30.cs index 100a7bb64..42c0e59df 100644 --- a/src/PixelFarm/BackEnd.MiniOpenTK/src/OpenTK/0_MyExtension/ES30mini/ES30.cs +++ b/src/PixelFarm/BackEnd.MiniOpenTK/src/OpenTK/0_MyExtension/ES30mini/ES30.cs @@ -5,9 +5,17 @@ namespace OpenTK.Graphics.ES30 { using System.Runtime.InteropServices; public partial class GL{ public void LoadAll(){ - GLDelInit.LoadAll(); -} -public static partial class Amd +#if DEBUG + System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch(); + sw.Start(); +#endif + GLDelInit.LoadAll(); +#if DEBUG + sw.Stop(); + long ms1 = sw.ElapsedMilliseconds; +#endif + } + public static partial class Amd { /// [requires: AMD_performance_monitor] /// diff --git a/src/PixelFarm/BackEnd.MiniOpenTK/src/OpenTK/0_MyExtension/ES30mini/ES30Delegate.cs b/src/PixelFarm/BackEnd.MiniOpenTK/src/OpenTK/0_MyExtension/ES30mini/ES30Delegate.cs index fa83a9eb6..0245e7af2 100644 --- a/src/PixelFarm/BackEnd.MiniOpenTK/src/OpenTK/0_MyExtension/ES30mini/ES30Delegate.cs +++ b/src/PixelFarm/BackEnd.MiniOpenTK/src/OpenTK/0_MyExtension/ES30mini/ES30Delegate.cs @@ -5383,6 +5383,7 @@ static void AssignDelegate(out T del, string funcName) } public static void LoadAll() { + AssignDelegate(out Delegates.glBeginPerfMonitorAMD, "glBeginPerfMonitorAMD"); AssignDelegate(out Delegates.glDeletePerfMonitorsAMD, "glDeletePerfMonitorsAMD"); AssignDelegate(out Delegates.glEndPerfMonitorAMD, "glEndPerfMonitorAMD"); diff --git a/src/PixelFarm/BackEnd.MiniOpenTK/src/OpenTK/Platform/Windows/WglHelper.cs b/src/PixelFarm/BackEnd.MiniOpenTK/src/OpenTK/Platform/Windows/WglHelper.cs index 70d0c8217..231243834 100644 --- a/src/PixelFarm/BackEnd.MiniOpenTK/src/OpenTK/Platform/Windows/WglHelper.cs +++ b/src/PixelFarm/BackEnd.MiniOpenTK/src/OpenTK/Platform/Windows/WglHelper.cs @@ -96,7 +96,17 @@ private object SyncRoot internal static IntPtr GetAddress(string function_string) { - IntPtr address = Wgl.GetProcAddress(function_string); + IntPtr address = IntPtr.Zero; + //if (!function_string.StartsWith("wgl")) + //{ + // address = Functions.GetProcAddress(WinFactory.OpenGLHandle, function_string); + // return address; + //} + //else + //{ + + //} + address = Wgl.GetProcAddress(function_string); if (!IsValid(address)) { address = Functions.GetProcAddress(WinFactory.OpenGLHandle, function_string); diff --git a/src/PixelFarm/BackEnd.Tesselate_SH/Tesselator.cs b/src/PixelFarm/BackEnd.Tesselate_SH/Tesselator.cs index c932d8865..ae5fc1d6a 100644 --- a/src/PixelFarm/BackEnd.Tesselate_SH/Tesselator.cs +++ b/src/PixelFarm/BackEnd.Tesselate_SH/Tesselator.cs @@ -72,7 +72,7 @@ enum ProcessingState internal const double MAX_COORD = 1.0e150; - public struct CombineParameters + public ref struct CombineParameters {//mutable-struct// public int d0, d1, d2, d3; public double w0, w1, w2, w3; diff --git a/src/PixelFarm/BackEnd.TreeCollection/BackEnd.TreeCollection.csproj b/src/PixelFarm/BackEnd.TreeCollection/BackEnd.TreeCollection.csproj index fec73eb65..345f5ccef 100644 --- a/src/PixelFarm/BackEnd.TreeCollection/BackEnd.TreeCollection.csproj +++ b/src/PixelFarm/BackEnd.TreeCollection/BackEnd.TreeCollection.csproj @@ -11,7 +11,7 @@ BackEnd.TreeCollection v2.0 512 - 8.0 + 8.0 true @@ -33,7 +33,6 @@ - diff --git a/src/PixelFarm/BackEnd.TreeCollection/PlainDocument/PlainTextDocument.cs b/src/PixelFarm/BackEnd.TreeCollection/PlainDocument/PlainTextDocument.cs deleted file mode 100644 index 67a93c992..000000000 --- a/src/PixelFarm/BackEnd.TreeCollection/PlainDocument/PlainTextDocument.cs +++ /dev/null @@ -1,65 +0,0 @@ -//MIT, 2019-present, WinterDev -using System; -using System.Security.Cryptography; -using System.Text; - -namespace LayoutFarm.TextEditing -{ - public enum PlainTextLineEnd : byte - { - None, - /// - /// \r\n - /// - CRLF, - /// - /// \n - /// - LF, - } - - - /// - /// immutable plain text line - /// - public class PlainTextLine - { - readonly char[] _text;//*** - - public PlainTextLine(string text) - { - _text = text.ToCharArray(); - } - public PlainTextLine(char[] buffer) - { - _text = buffer; - } - public PlainTextLineEnd EndWith { get; set; } - - - public string GetText() => new string(_text); - - public void CopyText(StringBuilder stbuilder) - { - stbuilder.Append(_text); - } - public void CopyText(char[] destBuffer, int srcIndex, int srcLen, int dstIndex) - { - Array.Copy(_text, srcIndex, destBuffer, dstIndex, srcLen); - } - public int CharCount => _text.Length; -#if DEBUG - public override string ToString() - { - return GetText(); - } -#endif - public PlainTextLine Clone() - { - return new PlainTextLine(_text); - } - } - - - -} diff --git a/src/PixelFarm/BackEnd.Win32Utils/MyWin32.cs b/src/PixelFarm/BackEnd.Win32Utils/MyWin32.cs index 2344b1759..09b6be0cc 100644 --- a/src/PixelFarm/BackEnd.Win32Utils/MyWin32.cs +++ b/src/PixelFarm/BackEnd.Win32Utils/MyWin32.cs @@ -130,8 +130,7 @@ public static partial class MyWin32 public static unsafe extern void memset(byte* dest, byte c, int byteCount); [DllImport("msvcrt.dll", EntryPoint = "memcpy", CallingConvention = CallingConvention.Cdecl)] public static unsafe extern void memcpy(byte* dest, byte* src, int byteCount); - [DllImport("msvcrt.dll", EntryPoint = "memcpy", CallingConvention = CallingConvention.Cdecl)] - public static unsafe extern int memcmp(byte* dest, byte* src, int byteCount); + [DllImport("kernel32.dll")] public static extern int GetLastError(); diff --git a/src/PixelFarm/ImgCodec.LibJpeg/Classic/Internal/my_2pass_cquantizer.cs b/src/PixelFarm/ImgCodec.LibJpeg/Classic/Internal/my_2pass_cquantizer.cs index 8dec55963..cd00f005b 100644 --- a/src/PixelFarm/ImgCodec.LibJpeg/Classic/Internal/my_2pass_cquantizer.cs +++ b/src/PixelFarm/ImgCodec.LibJpeg/Classic/Internal/my_2pass_cquantizer.cs @@ -129,7 +129,7 @@ private enum QuantizerType pass2_no_dither_quantizer } - private const int MAXNUMCOLORS = (JpegConstants.MAXJSAMPLE+1); /* maximum size of colormap */ + private const int MAXNUMCOLORS = (JpegConstants.MAXJSAMPLE + 1); /* maximum size of colormap */ /* These will do the right thing for either R,G,B or B,G,R color order, * but you may not like the results for other color orders. @@ -139,12 +139,12 @@ private enum QuantizerType private const int HIST_C2_BITS = 5; /* bits of precision in B/R histogram */ /* Number of elements along histogram axes. */ - private const int HIST_C0_ELEMS = (1< private void init_error_limit() { - m_error_limiter = new int [JpegConstants.MAXJSAMPLE * 2 + 1]; + m_error_limiter = new int[JpegConstants.MAXJSAMPLE * 2 + 1]; int tableOffset = JpegConstants.MAXJSAMPLE; const int STEPSIZE = ((JpegConstants.MAXJSAMPLE + 1) / 16); @@ -1006,14 +1006,14 @@ private void init_error_limit() int input = 0; for (; input < STEPSIZE; input++, output++) { - m_error_limiter[tableOffset + input] = output; + m_error_limiter[tableOffset + input] = output; m_error_limiter[tableOffset - input] = -output; } /* Map errors 1:2 up to +- 3*MAXJSAMPLE/16 */ - for (; input < STEPSIZE*3; input++) + for (; input < STEPSIZE * 3; input++) { - m_error_limiter[tableOffset + input] = output; + m_error_limiter[tableOffset + input] = output; m_error_limiter[tableOffset - input] = -output; output += (input & 1) != 0 ? 1 : 0; } @@ -1021,7 +1021,7 @@ private void init_error_limit() /* Clamp the rest to final output value (which is (MAXJSAMPLE+1)/8) */ for (; input <= JpegConstants.MAXJSAMPLE; input++) { - m_error_limiter[tableOffset + input] = output; + m_error_limiter[tableOffset + input] = output; m_error_limiter[tableOffset - input] = -output; } } @@ -1234,7 +1234,7 @@ private int find_nearby_colors(int minc0, int minc1, int minc2, byte[] colorlist for (int i = 0; i < m_cinfo.m_actual_number_of_colors; i++) { if (mindist[i] <= minmaxdist) - colorlist[ncolors++] = (byte) i; + colorlist[ncolors++] = (byte)i; } return ncolors; @@ -1272,14 +1272,14 @@ private void find_best_colors(int minc0, int minc1, int minc2, int numcolors, by for (int i = 0; i < numcolors; i++) { int icolor = colorlist[i]; - + /* Compute (square of) distance from minc0/c1/c2 to this color */ int inc0 = (minc0 - m_cinfo.m_colormap[0][icolor]) * R_SCALE; int dist0 = inc0 * inc0; int inc1 = (minc1 - m_cinfo.m_colormap[1][icolor]) * G_SCALE; dist0 += inc1 * inc1; - + int inc2 = (minc2 - m_cinfo.m_colormap[2][icolor]) * B_SCALE; dist0 += inc2 * inc2; @@ -1287,7 +1287,7 @@ private void find_best_colors(int minc0, int minc1, int minc2, int numcolors, by inc0 = inc0 * (2 * STEP_C0) + STEP_C0 * STEP_C0; inc1 = inc1 * (2 * STEP_C1) + STEP_C1 * STEP_C1; inc2 = inc2 * (2 * STEP_C2) + STEP_C2 * STEP_C2; - + /* Now loop over all cells in box, updating distance per Thomas method */ bestIndex = 0; int colorIndex = 0; @@ -1305,9 +1305,9 @@ private void find_best_colors(int minc0, int minc1, int minc2, int numcolors, by if (dist2 < bestdist[bestIndex]) { bestdist[bestIndex] = dist2; - bestcolor[colorIndex] = (byte) icolor; + bestcolor[colorIndex] = (byte)icolor; } - + dist2 += xx2; xx2 += 2 * STEP_C2 * STEP_C2; bestIndex++; @@ -1368,7 +1368,7 @@ private void fill_inverse_cmap(int c0, int c1, int c2) int histogramIndex = (c1 + ic1) * HIST_C2_ELEMS + c2; for (int ic2 = 0; ic2 < BOX_C2_ELEMS; ic2++) { - m_histogram[c0 + ic0][histogramIndex] = (ushort) ((int)bestcolor[bestcolorIndex] + 1); + m_histogram[c0 + ic0][histogramIndex] = (ushort)((int)bestcolor[bestcolorIndex] + 1); histogramIndex++; bestcolorIndex++; } diff --git a/src/PixelFarm/ImgCodec.Png/MyCrc32.cs b/src/PixelFarm/ImgCodec.Png/MyCrc32.cs index 85d36db5b..d266c7eea 100644 --- a/src/PixelFarm/ImgCodec.Png/MyCrc32.cs +++ b/src/PixelFarm/ImgCodec.Png/MyCrc32.cs @@ -31,7 +31,7 @@ // ------------------------------------------------------------------ namespace ImageTools { - struct CRC32Calculator + ref struct CRC32Calculator { long _totalBytesRead; uint _runningCrc32Result; diff --git a/src/PixelFarm/LayoutFarm.TextFlow_SH/DocumentActions.cs b/src/PixelFarm/LayoutFarm.TextFlow_SH/DocumentActions.cs new file mode 100644 index 000000000..dd7aaf04a --- /dev/null +++ b/src/PixelFarm/LayoutFarm.TextFlow_SH/DocumentActions.cs @@ -0,0 +1,576 @@ +//Apache2, 2014-present, WinterDev + +using System; +using System.Collections.Generic; +using Typography.Text; + +namespace LayoutFarm.TextFlow +{ + + public enum DocumentActionName + { + AddChar,//add single char + AddText, //add more than1 char + + SplitToNewLine, // + DeleteNewLine, + JoinWithUpperLine, + + DeleteWithBackspace,//delete char with backspace + DeleteChar,//delete char with delete button + + DeleteText,//delete range of text + + } + public interface ITextFlowSelectSession + { + int CurrentLineNumber { get; set; } + void StartSelect(); + void EndSelect(); + void CancelSelect(); + void TryMoveCaretTo(int charIndex, bool backward = false); + void DoEnd(); + void DoHome(); + } + public interface ITextFlowEditSession : ITextFlowSelectSession + { + // + void AddChar(int c); + void AddText(TextCopyBuffer copy); + // + void DoDelete(); + bool DoBackspace(); + // + void SplitIntoNewLine(); + + } + + public enum ChangeRegion + { + Line, + LineRange, + AllLines, + } + public abstract class DocumentAction + { + public abstract DocumentActionName Name { get; } + protected int _startLineNumber; + protected int _startCharIndex; + public DocumentAction(int lineNumber, int charIndex) + { + _startLineNumber = lineNumber; + _startCharIndex = charIndex; + } + public abstract ChangeRegion ChangeRegion { get; } + public int StartLineNumber => _startLineNumber; + public int StartCharIndex => _startCharIndex; + + public abstract void InvokeUndo(ITextFlowEditSession editSess); + public abstract void InvokeRedo(ITextFlowEditSession editSess); + public int HxStepNumber { get; set; } + } + + /// + /// sincle chracter typeing + /// + public class DocActionAddChar : DocumentAction + { + readonly int _c; + public DocActionAddChar(int c, int lineNumber, int charIndex) + : base(lineNumber, charIndex) + { + _c = c; + } + public override ChangeRegion ChangeRegion => ChangeRegion.Line; + public int Char => _c; + public override DocumentActionName Name => DocumentActionName.AddChar; + public override void InvokeUndo(ITextFlowEditSession editSess) + { + editSess.CurrentLineNumber = _startLineNumber; + editSess.TryMoveCaretTo(_startCharIndex + 1); + editSess.DoBackspace(); + } + public override void InvokeRedo(ITextFlowEditSession editSess) + { + //move to specific + editSess.CurrentLineNumber = _startLineNumber; + editSess.TryMoveCaretTo(_startCharIndex); + editSess.AddChar(_c); + } +#if DEBUG + public override string ToString() + { + return "+" + ((char)_c).ToString(); + } +#endif + } + + public class DocActionSplitToNewLine : DocumentAction + { + public DocActionSplitToNewLine(int lineNumber, int charIndex) + : base(lineNumber, charIndex) + { + } + public override ChangeRegion ChangeRegion => ChangeRegion.LineRange; + public override DocumentActionName Name => DocumentActionName.SplitToNewLine; + public override void InvokeUndo(ITextFlowEditSession editSess) + { + editSess.CurrentLineNumber = _startLineNumber; + editSess.DoEnd(); + editSess.DoDelete(); + } + public override void InvokeRedo(ITextFlowEditSession editSess) + { + editSess.CurrentLineNumber = _startLineNumber; + editSess.TryMoveCaretTo(_startCharIndex); + editSess.SplitIntoNewLine(); + } + } + + + /// + /// delete single char + /// + public class DocActionDeleteChar : DocumentAction + { + readonly int _c; + public DocActionDeleteChar(int c, int lineNumber, int charIndex) + : base(lineNumber, charIndex) + { + _c = c; + } + public int Char => _c; + public override ChangeRegion ChangeRegion => ChangeRegion.Line; + public override DocumentActionName Name => DocumentActionName.DeleteChar; + public override void InvokeUndo(ITextFlowEditSession editSess) + { + editSess.CurrentLineNumber = _startLineNumber; + editSess.TryMoveCaretTo(_startCharIndex); + editSess.AddChar(_c); + editSess.TryMoveCaretTo(_startCharIndex); //move back + } + public override void InvokeRedo(ITextFlowEditSession editSess) + { + editSess.CurrentLineNumber = _startLineNumber; + editSess.TryMoveCaretTo(_startCharIndex); + editSess.DoDelete(); + } + public override string ToString() + { + return "-" + ((char)_c).ToString(); + } + } + + public class DocActionBackspace : DocumentAction + { + readonly int _c; + public DocActionBackspace(int c, int lineNumber, int charIndex) + : base(lineNumber, charIndex) + { + _c = c; + } + public int Char => _c; + public override ChangeRegion ChangeRegion => ChangeRegion.Line; + public override DocumentActionName Name => DocumentActionName.DeleteWithBackspace; + public override void InvokeUndo(ITextFlowEditSession editSess) + { + editSess.CurrentLineNumber = _startLineNumber; + editSess.TryMoveCaretTo(_startCharIndex + 1); + editSess.AddChar(_c); + } + public override void InvokeRedo(ITextFlowEditSession editSess) + { + editSess.CurrentLineNumber = _startLineNumber; + editSess.TryMoveCaretTo(_startCharIndex); + editSess.DoBackspace(); + } + public override string ToString() + { + return "-" + ((char)_c).ToString(); + } + } + + + public class DocActionDeleteNewLine : DocumentAction + { + public DocActionDeleteNewLine(int lineNumber) + : base(lineNumber, 0) + { + } + /// + /// snapshot char count + /// + public int CurrentLineCharCount { get; set; } + public override ChangeRegion ChangeRegion => ChangeRegion.LineRange; + public override DocumentActionName Name => DocumentActionName.DeleteNewLine; + + public override void InvokeUndo(ITextFlowEditSession editSess) + { + editSess.CurrentLineNumber = _startLineNumber; + editSess.TryMoveCaretTo(CurrentLineCharCount); + editSess.SplitIntoNewLine(); + editSess.CurrentLineNumber = _startLineNumber; + editSess.DoEnd();// + } + public override void InvokeRedo(ITextFlowEditSession editSess) + { + editSess.CurrentLineNumber = _startLineNumber; + editSess.DoEnd(); + editSess.DoDelete(); + } + public override string ToString() + { + return "-newline"; + } + } + public class DocActionJoinWithUpperLine : DocumentAction + { + public DocActionJoinWithUpperLine(int lineNumber) + : base(lineNumber, 0) + { + } + public override ChangeRegion ChangeRegion => ChangeRegion.LineRange; + public override DocumentActionName Name => DocumentActionName.JoinWithUpperLine; + public int PrevLineCharIndex { get; set; } + public override void InvokeUndo(ITextFlowEditSession editSess) + { + editSess.CurrentLineNumber = _startLineNumber - 1; + editSess.TryMoveCaretTo(PrevLineCharIndex); + + editSess.SplitIntoNewLine(); + editSess.CurrentLineNumber = _startLineNumber; + editSess.DoHome(); + } + public override void InvokeRedo(ITextFlowEditSession editSess) + { + editSess.CurrentLineNumber = _startLineNumber; + editSess.DoHome(); + editSess.DoBackspace(); + } + public override string ToString() + { + return "-newline"; + } + } + + /// + /// delete a range of text + /// + public class DocActionDeleteText : DocumentAction + { + readonly TextCopyBuffer _deletedText; + public DocActionDeleteText(TextCopyBuffer deletedTextRuns, int startLineNum, int startCharIndex, + int endLineNum, int endColumnNum) + : base(startLineNum, startCharIndex) + { + _deletedText = deletedTextRuns; + EndLineNumber = endLineNum; + EndCharIndex = endColumnNum; + } + + public override ChangeRegion ChangeRegion => ChangeRegion.LineRange; + public int EndCharIndex { get; } + public int EndLineNumber { get; } + public override DocumentActionName Name => DocumentActionName.DeleteText; + public override void InvokeUndo(ITextFlowEditSession editSess) + { + editSess.CancelSelect(); + //add text to lines... + //TODO: check if we need to preserve format or not? + editSess.CurrentLineNumber = _startLineNumber; + editSess.TryMoveCaretTo(_startCharIndex); + editSess.AddText(_deletedText); + } + public override void InvokeRedo(ITextFlowEditSession editSess) + { + editSess.CurrentLineNumber = _startLineNumber; + editSess.TryMoveCaretTo(_startCharIndex); + editSess.StartSelect(); + editSess.CurrentLineNumber = EndLineNumber; + editSess.TryMoveCaretTo(EndCharIndex); + editSess.EndSelect(); + editSess.DoDelete(); + } + } + + /// + /// insert text + /// + public class DocActionInsertText : DocumentAction + { + readonly TextCopyBuffer _newText; + bool _eval_textRange; + int _endLineNo; + int _endLineCharIndex; + + public DocActionInsertText(TextCopyBuffer insertingTextRuns, int startLineNumber, int startCharIndex) + : base(startLineNumber, startCharIndex) + { + //if we have selection + _newText = insertingTextRuns; + } + public void CopyContent(System.Text.StringBuilder output) + { + _newText.CopyTo(output); + } + public override ChangeRegion ChangeRegion => ChangeRegion.LineRange; + public override DocumentActionName Name => DocumentActionName.AddText; + + void EvalTextRange() + { + if (_eval_textRange) { return; } //once + + _newText.GetReader(out Typography.TextBreak.InputReader r); + _endLineNo = _startLineNumber; + _endLineCharIndex = _startLineNumber + _newText.Length; + while (r.ReadLine(out int begin, out int len, out Typography.TextBreak.InputReader.LineEnd endWith)) + { + //text may be multi line + if (endWith != Typography.TextBreak.InputReader.LineEnd.None) + { + _endLineCharIndex = len; + _endLineNo++; + } + } + _eval_textRange = true; + } + + public override void InvokeUndo(ITextFlowEditSession editSess) + { + //have selection or not + //delete test + editSess.CurrentLineNumber = _startLineNumber; + editSess.TryMoveCaretTo(_startCharIndex); + editSess.StartSelect(); + //how many line involve this + EvalTextRange(); + // + editSess.CurrentLineNumber = _endLineNo; + editSess.TryMoveCaretTo(_endLineCharIndex); + editSess.EndSelect(); + editSess.DoDelete(); + } + public override void InvokeRedo(ITextFlowEditSession editSess) + { + editSess.CurrentLineNumber = _startLineNumber; + editSess.TryMoveCaretTo(_startCharIndex); + editSess.AddText(_newText); + } + } + + //-------------------------------- + + public class HistoryCollector : TextFlowEditSessionListener + { + readonly LinkedList _undoList = new LinkedList(); + readonly Stack _reverseUndoAction = new Stack(); + + int _maxCommandsCount = 20; //TODO: configurable + ITextFlowEditSession _editSession; + PlainTextEditSession _pte; + public HistoryCollector(ITextFlowEditSession editSession, PlainTextEditSession pte) + { + _editSession = editSession; + _pte = pte; + EnableUndoHistoryRecording = true; + } + public void Clear() + { + _undoList.Clear(); + _reverseUndoAction.Clear(); + } + public bool EnableUndoHistoryRecording { get; set; } + public int MaxCommandCount + { + get => _maxCommandsCount; + set + { + _maxCommandsCount = value; + if (_undoList.Count > _maxCommandsCount) + { + int diff = _undoList.Count - _maxCommandsCount; + for (int i = 0; i < diff; i++) + { + _undoList.RemoveFirst(); + } + } + } + } + + + void EnsureCapacity() + { + if (_undoList.Count > _maxCommandsCount) + { + _undoList.RemoveFirst(); + } + } + public void UndoLastAction(ITextFlowEditSession textEditSession) + { + DocumentAction docAction = PopUndoCommand(); + if (docAction != null) + { + docAction.InvokeUndo(textEditSession); + //sync content ... + _reverseUndoAction.Push(docAction); + //check if next command has the same step number? + while (Count > 0) + { + DocumentAction cmd = PeekCommand(); + if (cmd.HxStepNumber == docAction.HxStepNumber) + { + cmd.InvokeUndo(textEditSession); + //sync content ... + _reverseUndoAction.Push(cmd); + } + else + { + break; + } + } + } + } + public void ReverseLastUndoAction() + { + if (_reverseUndoAction.Count == 0) { return; } //early exit + + DocumentAction docAction = _reverseUndoAction.Pop(); + docAction.InvokeRedo(_editSession); + _undoList.AddLast(docAction); + } + + public DocumentAction PeekCommand() => _undoList.Last.Value; + + public int Count => _undoList.Count; + + public DocumentAction PopUndoCommand() + { + if (_undoList.Count > 0) + { + DocumentAction lastCmd = _undoList.Last.Value; + _undoList.RemoveLast(); + return lastCmd; + } + else + { + return null; + } + } + + public override void AddChar(int c) + { + + if (!EnableUndoHistoryRecording) { return; } + + AppendToUndoList(new DocActionAddChar(c, + CurrentLineNo, + CurrentLineNewCharIndex)); + } + + void AppendToUndoList(DocumentAction action) + { + action.HxStepNumber = HxStepNumber; + _undoList.AddLast(action); + } + public override void DoBackspace() + { + if (!EnableUndoHistoryRecording) { return; } + + if (_pte.HasSelection) + { + var deletedText = new TextCopyBufferUtf32(); + _pte.CopySelection(deletedText); + _pte.GetSelection( + out int startLineNo, out int startLineCharIndex, + out int endLineNo, out int endLineCharIndex); + + AppendToUndoList(new DocActionDeleteText(deletedText, + startLineNo, startLineCharIndex, + endLineNo, endLineCharIndex)); + } + else + { + if (_pte.NewCharIndex == 0) + { + //goto upper + if (_pte.CurrentLineNumber > 0) + { + //get previous line + int prevLineCharCount = _pte.GetLineCharCount(_pte.CurrentLineNumber - 1); + AppendToUndoList(new DocActionJoinWithUpperLine(_pte.CurrentLineNumber) { PrevLineCharIndex = prevLineCharCount }); + } + } + else + { + int tempChar = _pte.TempCopyBuffer.GetChar(0); + AppendToUndoList(new DocActionBackspace(tempChar, _pte.CurrentLineNumber, _pte.NewCharIndex)); + } + + } + } + public override void DoDelete() + { + if (!EnableUndoHistoryRecording) { return; } + + if (_pte.HasSelection) + { + var deletedText = new TextCopyBufferUtf32(); + _pte.CopySelection(deletedText); + _pte.GetSelection( + out int startLineNo, out int startLineCharIndex, + out int endLineNo, out int endLineCharIndex); + + AppendToUndoList(new DocActionDeleteText(deletedText, + startLineNo, startLineCharIndex, + endLineNo, endLineCharIndex)); + } + else + { + if (_pte.IsOnTheEnd()) + { + //end of the line + if (CurrentLineNo < _pte.LineCount - 1) + { + // + AppendToUndoList(new DocActionDeleteNewLine(_pte.CurrentLineNumber) { CurrentLineCharCount = _pte.GetLineCharCount(_pte.CurrentLineNumber) }); + } + + } + else + { + int tempChar = _pte.TempCopyBuffer.GetChar(0); + AppendToUndoList(new DocActionDeleteChar(tempChar, _pte.CurrentLineNumber, _pte.NewCharIndex)); + } + } + } + + public override void AddText(TextCopyBuffer buffer) + { + if (!EnableUndoHistoryRecording) { return; } +#if DEBUG + if (_pte.HasSelection) { throw new NotSupportedException(); } +#endif + + AppendToUndoList(new DocActionInsertText(buffer, CurrentLineNo, CurrentLineNewCharIndex)); + + } + public override void SplitIntoNewLine() + { + if (!EnableUndoHistoryRecording) { return; } + + AppendToUndoList(new DocActionSplitToNewLine(CurrentLineNo, CurrentLineNewCharIndex)); + } + + //----------------- + internal int HxStepNumber { get; private set; } + internal void ResetHxStepNumber() + { + HxStepNumber = 0; + } + internal void IncrementHxStepNumber() + { + if (!EnableUndoHistoryRecording) { return; } + HxStepNumber++; + } + } +} \ No newline at end of file diff --git a/src/PixelFarm/LayoutFarm.TextFlow_SH/ForwardOnlyCharSource.cs b/src/PixelFarm/LayoutFarm.TextFlow_SH/ForwardOnlyCharSource.cs new file mode 100644 index 000000000..27cb5be91 --- /dev/null +++ b/src/PixelFarm/LayoutFarm.TextFlow_SH/ForwardOnlyCharSource.cs @@ -0,0 +1,119 @@ +//MIT, 2014-present, WinterDev + +using System; + +using Typography.Text; +namespace LayoutFarm.TextFlow +{ + + /// + /// forward only text source + /// + public class ForwardOnlyCharSource + { + readonly TextBuilder _text; + public ForwardOnlyCharSource() + { + _text = new TextBuilder(); + } + /// + /// write content to TextCopyBuffer + /// + /// + /// + /// + internal void WriteTo(TextCopyBuffer output, int offset, int len) + { + //convert utf32 to utf16 + output.Append(TextBuilder.UnsafeGetInternalArray(_text), offset, len); + } + internal void WriteTo(TextBuilder output, int offset, int len) + { + //convert utf32 to utf16 + //temp + output.Append(_text, offset, len); + + } + internal void Copy(int srcStart, int srcLen, char[] outputArr, int outputStart) + { + Array.Copy(TextBuilder.UnsafeGetInternalArray(_text), srcStart, outputArr, outputStart, srcLen); + } + + public TextBufferSpan NewSpan(char[] charBuffer, int start, int len) + { + int s = _text.Count; + int end = start + len; + for (int i = start; i < end; ++i) + { + char c0 = charBuffer[i]; + if (char.IsHighSurrogate(c0) && i + 1 < len) + { + //and not the last one + _text.Append(char.ConvertToUtf32(c0, charBuffer[i + 1])); + i++; + } + else + { + _text.Append(c0); + } + } + return new TextBufferSpan(this.UnsafeInternalArray, s, _text.Count - s); + } + public TextBufferSpan NewSpan(int[] charBuffer, int start, int len) + { + int s = _text.Count; + _text.Append(charBuffer, start, len); + return new TextBufferSpan(this.UnsafeInternalArray, s, len); + } + + public TextBufferSpan NewSegment(TextBufferSpan textspan) + { + if (textspan.IsEmpty) + { + //return NewSpan(textspan.GetRawUtf32Buffer(), textspan.start, textspan.len); + return NewSpan(textspan.GetRawUtf16Buffer(), textspan.start, textspan.len); + } + else + { + return NewSpan(textspan.GetRawUtf16Buffer(), textspan.start, textspan.len); + } + } + public TextBufferSpan NewSegment(TextCopyBufferUtf32 buffer, int start, int len) + { + return NewSpan(TextCopyBufferUtf32.UnsafeGetInternalArray(buffer), start, len); + } + public TextBufferSpan NewSegment(TextCopyBufferUtf16 buffer, int start, int len) + { + return NewSpan(TextCopyBufferUtf16.UnsafeGetInternalArray(buffer), start, len); + } + public TextBufferSpan NewSegment(TextCopyBufferUtf32 buffer) + { + return NewSpan(TextCopyBufferUtf32.UnsafeGetInternalArray(buffer), 0, buffer.Length); + } + + public int LatestLen => _text.Count; + internal int[] UnsafeInternalArray => TextBuilder.UnsafeGetInternalArray(_text); + + + + //public void CopyAndAppend(int start, int len) + //{ + // //copy data from srcRange + // //and append to the last part of _arrList + // _arrList.CopyAndAppend(start, len); + //} + //public void Append(CharBufferSegment charSpan) + //{ + // //append data from another charspan + // _arrList.Append(charSpan.UnsafeInternalCharArr, charSpan.beginAt, charSpan.len); + //} + //public void Append(int c) + //{ + // _arrList.Append(c); + //} + + } + + + +} diff --git a/src/PixelFarm/LayoutFarm.TextFlow_SH/LayoutFarm.TextFlow_SH.projitems b/src/PixelFarm/LayoutFarm.TextFlow_SH/LayoutFarm.TextFlow_SH.projitems new file mode 100644 index 000000000..f9c9a7ef5 --- /dev/null +++ b/src/PixelFarm/LayoutFarm.TextFlow_SH/LayoutFarm.TextFlow_SH.projitems @@ -0,0 +1,18 @@ + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + true + a32cfa00-8751-427a-a655-952c00fc991a + + + LayoutFarm.TextFlow_SH + + + + + + + + + \ No newline at end of file diff --git a/src/PixelFarm/LayoutFarm.TextFlow_SH/LayoutFarm.TextFlow_SH.shproj b/src/PixelFarm/LayoutFarm.TextFlow_SH/LayoutFarm.TextFlow_SH.shproj new file mode 100644 index 000000000..1dc321134 --- /dev/null +++ b/src/PixelFarm/LayoutFarm.TextFlow_SH/LayoutFarm.TextFlow_SH.shproj @@ -0,0 +1,13 @@ + + + + a32cfa00-8751-427a-a655-952c00fc991a + 14.0 + + + + + + + + diff --git a/src/PixelFarm/LayoutFarm.TextFlow_SH/ObjectPools.cs b/src/PixelFarm/LayoutFarm.TextFlow_SH/ObjectPools.cs new file mode 100644 index 000000000..f683cee1e --- /dev/null +++ b/src/PixelFarm/LayoutFarm.TextFlow_SH/ObjectPools.cs @@ -0,0 +1,124 @@ +//Apache2, 2014-present, WinterDev + +using System; +using System.Collections.Generic; +using System.Text; +using Typography.Text; + +namespace LayoutFarm.TextFlow +{ + static class ObjectPool + { + [System.ThreadStatic] + static Stack s_pool; + + static Func s_newInstance; + static Action s_reset; + + public static void SetDelegates(Func newInstance, Action reset) + { + s_newInstance = newInstance; + s_reset = reset; + } + + public static I GetFreeInstance() + { + if (s_pool == null) + { + s_pool = new Stack(); + } + + if (s_pool.Count > 0) + { + return s_pool.Pop(); + } + else + { + return s_newInstance(); + } + } + public static void ReleaseInstance(I output) + { + s_reset(output); + s_pool.Push(output); + } + } + + public struct StringBuilderPoolContext : System.IDisposable + { + StringBuilder _cacheStBuilder; + static StringBuilderPoolContext() + { + //once + ObjectPool.SetDelegates( + () => new StringBuilder(), + sb => sb.Length = 0 //reset + ); + } + public StringBuilderPoolContext(out StringBuilder stbuilder) + { + _cacheStBuilder = stbuilder = ObjectPool.GetFreeInstance(); + } + public void Dispose() + { + if (_cacheStBuilder != null) + { + ObjectPool.ReleaseInstance(_cacheStBuilder); + _cacheStBuilder = null; + } + } + } + + public struct TextUtf16RangeCopyPoolContext : System.IDisposable + { + TextCopyBufferUtf16 _copyBuffer; + + static TextUtf16RangeCopyPoolContext() + { + //once + ObjectPool.SetDelegates( + () => new TextCopyBufferUtf16(), + rngCpy => rngCpy.Clear() + ); + } + public TextUtf16RangeCopyPoolContext(out TextCopyBufferUtf16 output) + { + _copyBuffer = output = ObjectPool.GetFreeInstance(); + } + public void Dispose() + { + if (_copyBuffer != null) + { + ObjectPool.ReleaseInstance(_copyBuffer); + _copyBuffer = null; + } + } + } + + public struct TextUtf32RangeCopyPoolContext : System.IDisposable + { + TextCopyBufferUtf32 _copyBuffer; + + static TextUtf32RangeCopyPoolContext() + { + //once + ObjectPool.SetDelegates( + () => new TextCopyBufferUtf32(), + rngCpy => rngCpy.Clear() + ); + } + public TextUtf32RangeCopyPoolContext(out TextCopyBufferUtf32 output) + { + _copyBuffer = output = ObjectPool.GetFreeInstance(); + } + public void Dispose() + { + if (_copyBuffer != null) + { + ObjectPool.ReleaseInstance(_copyBuffer); + _copyBuffer = null; + } + } + } + +} \ No newline at end of file diff --git a/src/PixelFarm/LayoutFarm.TextFlow_SH/PlainTextDocument.cs b/src/PixelFarm/LayoutFarm.TextFlow_SH/PlainTextDocument.cs new file mode 100644 index 000000000..7792a57e7 --- /dev/null +++ b/src/PixelFarm/LayoutFarm.TextFlow_SH/PlainTextDocument.cs @@ -0,0 +1,1193 @@ +//MIT, 2019-present, WinterDev +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Text; +using Typography.Text; + +namespace LayoutFarm.TextFlow +{ + public enum PlainTextLineEnd : byte + { + None, + /// + /// \r\n + /// + CRLF, + /// + /// \n + /// + LF, + } + + class PlainTextLine + { + public PlainTextLine() { } + public TextBufferSpan Content { get; set; } + public PlainTextLineEnd EndWith { get; set; } + /// + /// write content to output + /// + /// + public void WriteTo(StringBuilder output) + { + PlainTextUtils.WriteTo(Content, output); + //TODO: review endline + } + public int CharCount => Content.len; + + public override string ToString() => PlainTextUtils.ReadString(Content); + + } + + static class PlainTextUtils + { + [ThreadStatic] + static Stack s_sb_pool; + [ThreadStatic] + static Stack s_copyBuffer_pool; + + [ThreadStatic] + static bool s_init; + + static void Init() + { + s_init = true; + s_sb_pool = new Stack(); + s_copyBuffer_pool = new Stack(); + } + // + static StringBuilder GetFreeStringBuilder() + { + if (!s_init) { Init(); } + if (s_sb_pool.Count == 0) + { + return new StringBuilder(); + } + else + { + return s_sb_pool.Pop(); + } + } + static void ReleaseStringBuilder(StringBuilder sb) + { + if (!s_init) { Init(); } + sb.Length = 0;//reset + s_sb_pool.Push(sb); + } + // + static TextCopyBufferUtf32 GetFreeCopyBuffer() + { + if (!s_init) { Init(); } + if (s_copyBuffer_pool.Count == 0) + { + return new TextCopyBufferUtf32(); + } + else + { + return s_copyBuffer_pool.Pop(); + } + } + static void ReleaseCopyBuffer(TextCopyBufferUtf32 sb) + { + if (!s_init) { Init(); } + sb.Clear(); + s_copyBuffer_pool.Push(sb); + } + + // + public static string ReadString(TextBufferSpan charSegment) + { + if (!s_init) { Init(); } + + TextCopyBufferUtf32 copyBuff = GetFreeCopyBuffer(); + charSegment.WriteTo(copyBuff); + string result = ReadString(copyBuff); + ReleaseCopyBuffer(copyBuff); + return result; + } + public static string ReadString(TextCopyBufferUtf32 copyBuffer) + { + if (!s_init) { Init(); } + + StringBuilder sb = GetFreeStringBuilder(); + copyBuffer.CopyTo(sb); + string result = sb.ToString(); + ReleaseStringBuilder(sb); + return result; + } + public static string ReadCurrentLine(PlainTextEditSession block) + { + if (!s_init) { Init(); } + + StringBuilder sb = GetFreeStringBuilder(); + TextCopyBufferUtf32 copyBuff = GetFreeCopyBuffer(); + block.ReadCurrentLine(copyBuff); + copyBuff.CopyTo(sb); + string result = sb.ToString(); + ReleaseCopyBuffer(copyBuff); + ReleaseStringBuilder(sb); + return result; + } + + public static void WriteTo(TextBufferSpan charSegment, StringBuilder sb) + { + if (!s_init) { Init(); } + + // + TextCopyBufferUtf32 copyBuff = GetFreeCopyBuffer(); + charSegment.WriteTo(copyBuff); + copyBuff.CopyTo(sb); + ReleaseCopyBuffer(copyBuff); + } + } + + + + + class LineEditor + { + PlainTextEditSession _textBlock;//owner + PlainTextLine _line; + + //TODO: review a proper data structure again,use tree of character? (eg RB tree?) + //esp for a long line insertion, deletion + + readonly TextCopyBufferUtf32 _arr = new TextCopyBufferUtf32(); + bool _changed; + bool _loaded; + int _initContentLen; + + /// + /// begin at 0 for new char index + /// + int _newCharIndex;//new character index 1:1 based on backend buffer (utf16 or utf32) + internal LineEditor() + { + + } + internal void Bind(PlainTextEditSession textBlock) + { + _textBlock = textBlock; + } + public void Read(TextCopyBufferUtf32 output) + { + //read data from this line and write to output + if (_loaded) + { + output.Append(_arr); + } + else + { + //not load then + if (_line.Content.len > 0) + { + _line.Content.WriteTo(output); + } + } + + } + public void Read(TextCopyBufferUtf32 output, int index, int len) + { + if (_loaded) + { + output.Append(_arr, index, len); + } + else + { + _line.Content.WriteTo(output, index, len); + } + } + public void Bind(PlainTextLine line) + { + if (_line == line) + { + return;//same line + } + // + if (_line != null && _changed) + { + //update content back + _line.Content = _textBlock.CharSource.NewSegment(_arr); + } + // + _line = line; + //reset + _newCharIndex = 0; + _initContentLen = line.Content.len; + _changed = false; + _loaded = false; + _arr.Clear(); + + NewCharIndex = 0; + } + + internal PlainTextLine CurrentLine => _line; + + /// + /// load content of each line to edit mode + /// + void Load() + { + if (_loaded) { return; } + + // + + TextBufferSpan content = _line.Content; + if (content.len > 0) + { + //copy content to temp buffer + content.WriteTo(_arr); + } + _loaded = true; + + } + /// + /// character index for new insertion + /// + public int NewCharIndex + { + get => _newCharIndex; + set + { + if (value <= ((!_loaded) ? _initContentLen : _arr.Length)) + { + _newCharIndex = value; + } + else if (value == _arr.Length + 1) + { + //to the end of this + _newCharIndex = value; + } + else + { + //not accept + //warn, and set default + } + } + } + + public int GetChar(int index) => (index < _arr.Length) ? _arr.GetChar(index) : 0; + public int GetCurrentChar() => (_newCharIndex < _arr.Length) ? _arr.GetChar(_newCharIndex) : 0; + + public bool CharIndexOnTheEnd => _newCharIndex == CharacterCount; + + public void AddText(TextCopyBuffer copyBuffer, int start, int len) + { + if (copyBuffer is TextCopyBufferUtf32 u32Buffer) + { + AddText(u32Buffer, start, len); + } + else + { + AddText((TextCopyBufferUtf16)copyBuffer, start, len); + } + } + public void AddText(TextCopyBufferUtf32 copyBuffer, int start, int len) + { + if (!_loaded) { Load(); }// + + _arr.Insert(copyBuffer, _newCharIndex, start, len); + _newCharIndex += len; + _changed = true; + } + public void AddText(TextCopyBufferUtf16 copyBuffer, int start, int len) + { + //TODO: review here + throw new NotSupportedException(); + } + public void Split(TextCopyBufferUtf32 rightPart) + { + if (!_loaded) { Load(); }// + + int rightPartLen = _arr.Length - _newCharIndex; + rightPart.Append(_arr, _newCharIndex, rightPartLen); + _arr.Remove(_newCharIndex, rightPartLen); + _changed = true; + } + + public void DeleteRange(int start, int len) + { + if (!_loaded) { Load(); } + + if (len == 0) return; + if (len < 0) { throw new NotSupportedException(); } + + _arr.Remove(start, len); + _newCharIndex = start; + _changed = true; + } + /// + /// single backspace + /// + public void DoBackSpace() + { + if (!_loaded) { Load(); } + + if (_newCharIndex < 1) { return; }//early exit + // + _arr.Remove(_newCharIndex - 1, 1); + _newCharIndex--; + _changed = true; + } + /// + /// add character to current index + /// + /// + public void AddChar(int c) + { + + if (!_loaded) { Load(); } + + if (_arr.Length == _newCharIndex) + { + //the last one + _arr.Append(c); + } + else + { + _arr.Insert(_newCharIndex, c); + } + _newCharIndex++; + _changed = true; + } + public void Clear() + { + if (!_loaded) { Load(); }// + + _arr.Clear(); + _newCharIndex = 0; + _changed = true; + } + /// + /// character count + /// + public int CharacterCount => _loaded ? _arr.Length : _initContentLen; + } + + public class PlainTextDocument + { + ForwardOnlyCharSource _charSource = new ForwardOnlyCharSource(); + readonly List _lines = new List(); + + public PlainTextDocument(string text) + { + //extract text and copy to character source + //TODO: review here again + using (System.IO.StringReader reader = new System.IO.StringReader(text)) + { + string line = reader.ReadLine(); + while (line != null) + { + //... + _lines.Add(new PlainTextLine() { Content = _charSource.NewSegment(new TextBufferSpan(line.ToCharArray())) }); + line = reader.ReadLine(); + } + } + } + public PlainTextDocument(TextCopyBuffer copyBuffer) + { + //copy + if (copyBuffer.Length == 0) + { + _lines.Add(new PlainTextLine()); + return; + } + if (copyBuffer is TextCopyBufferUtf32 utf32) + { + copyBuffer.GetReader(out Typography.TextBreak.InputReader reader); + while (reader.ReadLine(out int begin, out int len, out Typography.TextBreak.InputReader.LineEnd endWith)) + { + PlainTextLine p = new PlainTextLine() { Content = _charSource.NewSegment(utf32, begin, len) }; + _lines.Add(p); + } + } + else if (copyBuffer is TextCopyBufferUtf16 utf16) + { + copyBuffer.GetReader(out Typography.TextBreak.InputReader reader); + while (reader.ReadLine(out int begin, out int len, out Typography.TextBreak.InputReader.LineEnd endWith)) + { + //... + PlainTextLine p = new PlainTextLine() { Content = _charSource.NewSegment(utf16, begin, len) }; + _lines.Add(p); + } + } + + } + public int LineCount => _lines.Count; + internal List UnsafeInternalList => _lines; + public ForwardOnlyCharSource CharSource => _charSource; + + public void WriteTo(StringBuilder output) + { + int j = _lines.Count; + for (int i = 0; i < j; ++i) + { + if (i > 0) + { + //TODO: review line-end *** + output.AppendLine(); + } + _lines[i].WriteTo(output); + } + } + + public void WriteLineTo(int lineIndex, StringBuilder output) + { + _lines[lineIndex].WriteTo(output); + } + } + + + public class PlainTextEditSession : ITextFlowEditSession + { + int _currentLineNo; + PlainTextLine _currentLine; + LineEditor _lineEditor = new LineEditor(); + TextCopyBufferUtf32 _copyBuffer = new TextCopyBufferUtf32();//** + + List _lines; + PlainTextDocument _doc; + + class PoolPrivateType { } + + static PlainTextEditSession() + { + ObjectPool.SetDelegates( + () => new TextCopyBufferUtf32(), + buff => buff.Clear()); + } + public PlainTextEditSession() + { + TempCopyBuffer = new TextCopyBufferUtf32(); + } + public void LoadPlainText(PlainTextDocument doc) + { + + _lineEditor = new LineEditor(); + _lineEditor.Bind(this); + _doc = doc; + _lines = doc.UnsafeInternalList; + //move to + if (_lines.Count == 0) + { + //create default + _lines.Add(new PlainTextLine()); + CurrentLineNumber = 0; + } + + CurrentLineNumber = 0; + NewCharIndex = 0; + } + public void Clear() + { + _lines.Clear(); + _lines.Add(new PlainTextLine()); //default + CurrentLineNumber = 0; + } + public int GetLineCharCount(int lineNo) + { + if (lineNo < _lines.Count) + { + return _lines[lineNo].CharCount; + } + else + { + return -1; + } + } + internal ForwardOnlyCharSource CharSource => _doc.CharSource; + + /// + /// new character index of current line + /// + public int NewCharIndex + { + get => _lineEditor.NewCharIndex; + set => _lineEditor.NewCharIndex = value; + } + public TextCopyBufferUtf32 TempCopyBuffer { get; set; } + + public bool IsOnTheEnd() => _lineEditor.CharIndexOnTheEnd; + public void ReadCurrentLine(TextCopyBufferUtf32 output) => _lineEditor.Read(output); + public void ReadCurrentLine(TextCopyBufferUtf32 output, int index, int len) => _lineEditor.Read(output, index, len); + + public int LineCount => _lines.Count; + public int CurrentLineCharCount => _lineEditor.CharacterCount; + public int CurrentLineNumber + { + get => _currentLineNo; + set + { + if (value >= 0 && value < _lines.Count) + { + _currentLineNo = value; + + PlainTextLine line = _lines[value]; + if (_currentLine != line) + { + //change + _currentLine = line; + _lineEditor.Bind(line); + } + } + } + } + public void ReplaceCurrentLine(TextCopyBuffer copyBuffer) + { + _lineEditor.Clear(); + _lineEditor.AddText(copyBuffer, 0, copyBuffer.Length); + } + public int GetCharacter(int lineCharIndex) => _lineEditor.GetChar(lineCharIndex); + public void AddChar(int c) + { + if (!_selection.isEmpty) + { + DeleteSelectedText(); + } + + if (_currentLine != null) + { + //1. + _lineEditor.AddChar(c); + } + else + { + //TODO: review this + throw new NotSupportedException(); + } + } + + public bool CanAcceptThisChar(int c) => CanCaretStopOnThisChar(c); + + public void AddText(string s) + { + _copyBuffer.Clear(); + _copyBuffer.Append(s); + AddText(_copyBuffer); + } + public void AddText(char[] s) + { + _copyBuffer.Clear(); + _copyBuffer.Append(s); + AddText(_copyBuffer); + } + public void AddText(TextCopyBuffer copy) + { + if (!_selection.isEmpty) + { + DeleteSelectedText(); + } + + //may by more than one line + copy.GetReader(out Typography.TextBreak.InputReader reader); + while (reader.ReadLine(out int begin, out int len, out Typography.TextBreak.InputReader.LineEnd lineEnd)) + { + _lineEditor.AddText(copy, begin, len); + + if (lineEnd != Typography.TextBreak.InputReader.LineEnd.None) + { + //insert new line + if (_currentLineNo == _lines.Count - 1) + { + //now we are in the last line + SplitIntoNewLine();//split and move to new line + } + else + { + _lines.Insert(CurrentLineNumber + 1, new PlainTextLine()); + CurrentLineNumber++;//move to lower + } + } + } + } + + + public bool DoBackspace() + { + + if (!_selection.isEmpty) + { + return DeleteSelectedText(); + } + + + if (_lineEditor.NewCharIndex > 0) + { + //on current line + _lineEditor.DoBackSpace(); + + return true; + } + else if (CurrentLineNumber == 0) + { + //no more upper line + return false; + } + + //--------- + //we are on current line >0 and char_index =0; + //we must bring the content from this line to upper line + + int charCount = _lineEditor.CharacterCount; + if (charCount > 0) + { + //copy content of current line + _copyBuffer.Clear(); + _lineEditor.Read(_copyBuffer); + } + + CurrentLineNumber--; + //move newchar index to end line + _lineEditor.NewCharIndex = _lineEditor.CharacterCount; + if (charCount > 0) + { + //paste content from the lower line + int pos = _lineEditor.NewCharIndex; + _lineEditor.AddText(_copyBuffer, 0, _copyBuffer.Length); + _lineEditor.NewCharIndex = pos;//move to latest pos + } + //and delete the lower line + _lines.RemoveAt(CurrentLineNumber + 1); + return true; + } + void InternalDoBackspace(int deleteCharCount) + { + for (int i = 0; i < deleteCharCount; ++i) + { + _lineEditor.DoBackSpace(); + } + } + bool DeleteSelectedText() + { + if (_selection.isEmpty) { return false; } + + // + _selection.Normalize(); + + int diff = _selection.endLineNo - _selection.startLineNo; + + if (diff == 0) + { + //on the sameline + CurrentLineNumber = _selection.startLineNo; + _lineEditor.DeleteRange(_selection.startLineNewCharIndex, _selection.endLineNewCharIndex - _selection.startLineNewCharIndex); + _selection.Finish(); + } + else if (diff == 1) + { + CurrentLineNumber = _selection.endLineNo; + //delete end part + _lineEditor.DeleteRange(0, _selection.endLineNewCharIndex);//** + CurrentLineNumber = _selection.startLineNo; + //delete begin part, from start to end of this line + _lineEditor.DeleteRange(_selection.startLineNewCharIndex, _lineEditor.CharacterCount - _selection.startLineNewCharIndex); + _selection.Finish(); + + NewCharIndex = _lineEditor.CharacterCount;//move to end of this line + DoDelete();//single delete to join lower line to upper + } + else + { + //delete in-between lines + for (int i = 0; i < diff - 1; ++i) + { + //diff-1 times + _lines.RemoveAt(_selection.startLineNo + 1); + } + + CurrentLineNumber = _selection.endLineNo; + //delete end part + _lineEditor.DeleteRange(0, _selection.endLineNewCharIndex);//** + CurrentLineNumber = _selection.startLineNo; + //delete begin part, from start to end of this line + _lineEditor.DeleteRange(_selection.startLineNewCharIndex, _lineEditor.CharacterCount - _selection.startLineNewCharIndex); + _selection.Finish(); + + NewCharIndex = _lineEditor.CharacterCount;//move to end of this line + DoDelete();//single delete to join lower line to upper + } + return true; + } + public int PreviewSingleCharDelete() + { + //single deletion may affect more 1 char + //this beh is different from do-backspace + if (!_selection.isEmpty) { return -1; }//not evaluate + if (_lineEditor.NewCharIndex < _lineEditor.CharacterCount) + { + int char_index = NewCharIndex; + TryMoveCaretTo(char_index + 1);//try move to next charet stop + int char_index2 = NewCharIndex; + NewCharIndex = char_index; //restore back + return char_index2 - char_index; + } + else + { + return 0;//end of this line + } + } + + public void DoDelete() + { + //reset + + if (!_selection.isEmpty) + { + DeleteSelectedText(); + return; + } + + if (_lineEditor.NewCharIndex < _lineEditor.CharacterCount) + { + int char_index = NewCharIndex; + TryMoveCaretTo(char_index + 1);//try move to next charet stop + int char_index2 = NewCharIndex; + //delete + InternalDoBackspace(char_index2 - char_index); + } + else + { + + //the bring to lower line to join with this line + if (this.LineCount > 1 && _currentLineNo < this.LineCount - 1) + { + //copy content from lower line to + int pos = _lineEditor.NewCharIndex; + CurrentLineNumber++;//move to lower line + DoBackspace(); + _lineEditor.NewCharIndex = pos; + } + } + + } + + /// + /// do end on current line + /// + public void DoEnd() + { + _lineEditor.NewCharIndex = _lineEditor.CharacterCount; + } + + /// + /// do home on current line + /// + public void DoHome() + { + //do home on current line + _lineEditor.NewCharIndex = 0; + } + + /// + /// split current line into newline + /// + public void SplitIntoNewLine() + { + if (!_selection.isEmpty) + { + DeleteSelectedText(); + } + + if (_lineEditor.CharIndexOnTheEnd) + { + //end of current line + _lines.Insert(CurrentLineNumber + 1, new PlainTextLine()); + CurrentLineNumber++;//move to lower + } + else + { + //split current line into 2 + _copyBuffer.Clear(); + _lineEditor.Split(_copyBuffer); + + //insert newline + _lines.Insert(CurrentLineNumber + 1, new PlainTextLine()); + CurrentLineNumber++;//move to lower + _lineEditor.AddText(_copyBuffer, 0, _copyBuffer.Length); + _lineEditor.NewCharIndex = 0;//move to line start + + } + } + static TextCopyBufferUtf32 GetFreeTextCopyBuffer() => ObjectPool.GetFreeInstance(); + static void RelaseTextCopyBuffer(TextCopyBufferUtf32 buff) => ObjectPool.ReleaseInstance(buff); + + //------------------------------------------ + readonly PlainTextSelection _selection = new PlainTextSelection(); + + /// + /// start selection on current character index + /// + public void StartSelect() => _selection.StartSelect(_currentLineNo, _lineEditor.NewCharIndex); + /// + /// end selection + /// + public void EndSelect() => _selection.EndSelect(_currentLineNo, _lineEditor.NewCharIndex); + public void CancelSelect() => _selection.CancelSelection(); + public bool HasSelection => !_selection.isEmpty; + + internal void GetSelection(out int startLineNo, out int startLineCharIndex, out int endLineNo, out int endLineCharIndex) + { + startLineNo = _selection.startLineNo; + startLineCharIndex = _selection.startLineNewCharIndex; + endLineNo = _selection.endLineNo; + endLineCharIndex = _selection.endLineNewCharIndex; + } + static Func s_CaretCanStopOnThisChar; + + public static void SetCaretCanStopOnThisChar(Func caretCanStopOnThisCharDel) + { + s_CaretCanStopOnThisChar = caretCanStopOnThisCharDel; + } + internal static bool CanCaretStopOnThisChar(int c) + { + char upper = (char)(c >> 16); + char lower = (char)c; + + if (char.IsHighSurrogate((char)upper)) + { + return false; + } + + UnicodeCategory unicodeCatg = char.GetUnicodeCategory(lower); + switch (unicodeCatg) + { + + case UnicodeCategory.SpaceSeparator: + case UnicodeCategory.LineSeparator: + case UnicodeCategory.ParagraphSeparator: + case UnicodeCategory.Control: + break; + case UnicodeCategory.UppercaseLetter: + case UnicodeCategory.LowercaseLetter: + case UnicodeCategory.TitlecaseLetter: + case UnicodeCategory.ModifierLetter: + case UnicodeCategory.DecimalDigitNumber: + break; + case UnicodeCategory.OtherLetter: + + if (s_CaretCanStopOnThisChar != null) + { + return s_CaretCanStopOnThisChar(lower); + } + break; + case UnicodeCategory.NonSpacingMark: + case UnicodeCategory.SpacingCombiningMark: + case UnicodeCategory.EnclosingMark: + //recursive + return false; + default: + break; + } + return true; + + + //ref: https://docs.microsoft.com/en-us/dotnet/api/system.globalization.unicodecategory?view=netcore-3.1 + //ClosePunctuation 21 + //Closing character of one of the paired punctuation marks, such as parentheses, square brackets, and braces. + //Signified by the Unicode designation "Pe" (punctuation, close). The value is 21. + + //ConnectorPunctuation 18 + //Connector punctuation character that connects two characters. + //Signified by the Unicode designation "Pc" (punctuation, connector). The value is 18. + + //Control 14 + //Control code character, with a Unicode value of U+007F or in the range U+0000 through U+001F or U+0080 through U+009F. + //Signified by the Unicode designation "Cc" (other, control). The value is 14. + + //CurrencySymbol 26 + //Currency symbol character. + //Signified by the Unicode designation "Sc" (symbol, currency). The value is 26. + + //DashPunctuation 19 + //Dash or hyphen character. + //Signified by the Unicode designation "Pd" (punctuation, dash). The value is 19. + + //DecimalDigitNumber 8 + //Decimal digit character, that is, a character in the range 0 through 9. + //Signified by the Unicode designation "Nd" (number, decimal digit). The value is 8. + + //EnclosingMark 7 + //Enclosing mark character, which is a nonspacing combining character that surrounds all previous characters up to and including a base character. + //Signified by the Unicode designation "Me" (mark, enclosing). The value is 7. + + //FinalQuotePunctuation 23 + //Closing or final quotation mark character. + //Signified by the Unicode designation "Pf" (punctuation, final quote). The value is 23. + + //Format 15 + //Format character that affects the layout of text or the operation of text processes, but is not normally rendered. + //Signified by the Unicode designation "Cf" (other, format). The value is 15. + + //InitialQuotePunctuation 22 + //Opening or initial quotation mark character. + //Signified by the Unicode designation "Pi" (punctuation, initial quote). The value is 22. + + //LetterNumber 9 + //Number represented by a letter, instead of a decimal digit, for example, the Roman numeral for five, which is "V". + //The indicator is signified by the Unicode designation "Nl" (number, letter). The value is 9. + + //LineSeparator 12 + //Character that is used to separate lines of text. + //Signified by the Unicode designation "Zl" (separator, line). The value is 12. + + //LowercaseLetter 1 + //Lowercase letter. + //Signified by the Unicode designation "Ll" (letter, lowercase). The value is 1. + + //MathSymbol 25 + //Mathematical symbol character, such as "+" or "= ". + //Signified by the Unicode designation "Sm" (symbol, math). The value is 25. + + //ModifierLetter 3 + //Modifier letter character, which is free-standing spacing character that indicates modifications of a preceding letter. + //Signified by the Unicode designation "Lm" (letter, modifier). The value is 3. + + //ModifierSymbol 27 + //Modifier symbol character, which indicates modifications of surrounding characters. + //For example, the fraction slash indicates that the number to the left is the numerator and the number to the right is the denominator. + //The indicator is signified by the Unicode designation "Sk" (symbol, modifier). The value is 27. + + //NonSpacingMark 5 + //Nonspacing character that indicates modifications of a base character. + //Signified by the Unicode designation "Mn" (mark, nonspacing). The value is 5. + + //OpenPunctuation 20 + //Opening character of one of the paired punctuation marks, such as parentheses, square brackets, and braces. + //Signified by the Unicode designation "Ps" (punctuation, open). The value is 20. + + //OtherLetter 4 + //Letter that is not an uppercase letter, a lowercase letter, a titlecase letter, or a modifier letter. + //Signified by the Unicode designation "Lo" (letter, other). The value is 4. + + //OtherNotAssigned 29 + //Character that is not assigned to any Unicode category. + //Signified by the Unicode designation "Cn" (other, not assigned). The value is 29. + + //OtherNumber 10 + //Number that is neither a decimal digit nor a letter number, for example, the fraction 1/2. The indicator is signified by the Unicode designation "No" (number, other). The value is 10. + + //OtherPunctuation 24 + //Punctuation character that is not a connector, a dash, open punctuation, close punctuation, an initial quote, or a final quote. + //Signified by the Unicode designation "Po" (punctuation, other). The value is 24. + + //OtherSymbol 28 + //Symbol character that is not a mathematical symbol, a currency symbol or a modifier symbol. + //Signified by the Unicode designation "So" (symbol, other). The value is 28. + + //ParagraphSeparator 13 + //Character used to separate paragraphs. + //Signified by the Unicode designation "Zp" (separator, paragraph). The value is 13. + + //PrivateUse 17 + //Private-use character, with a Unicode value in the range U+E000 through U+F8FF. + //Signified by the Unicode designation "Co" (other, private use). The value is 17. + + //SpaceSeparator 11 + //Space character, which has no glyph but is not a control or format character. + //Signified by the Unicode designation "Zs" (separator, space). The value is 11. + + //SpacingCombiningMark 6 + //Spacing character that indicates modifications of a base character and affects the width of the glyph for that base character. + //Signified by the Unicode designation "Mc" (mark, spacing combining). The value is 6. + + //Surrogate 16 + //High surrogate or a low surrogate character. + //Surrogate code values are in the range U+D800 through U+DFFF. Signified by the Unicode designation "Cs" (other, surrogate). The value is 16. + + //TitlecaseLetter 2 + //Titlecase letter. + //Signified by the Unicode designation "Lt" (letter, titlecase). The value is 2. + + //UppercaseLetter 0 + //Uppercase letter. + //Signified by the Unicode designation "Lu" (letter, uppercase). The value is 0. + } + + public void TryMoveCaretTo(int charIndex, bool backward = false) + { + //on support on the same line only!** + _lineEditor.NewCharIndex = charIndex; + //check if we can stop UI caret at this character index or not + + if (backward) + { + //move caret backward + int curChar = _lineEditor.GetCurrentChar(); + int tmp_index = charIndex; + while (curChar != '\0' && tmp_index > 0 && !CanCaretStopOnThisChar(curChar)) + { + _lineEditor.NewCharIndex--; + curChar = _lineEditor.GetCurrentChar(); + tmp_index--; + } + } + else + { + int curChar = _lineEditor.GetCurrentChar(); + int tmp_index = charIndex; + + while (curChar != '\0' && !CanCaretStopOnThisChar(curChar) && !_lineEditor.CharIndexOnTheEnd) + { + _lineEditor.NewCharIndex++; //move next + curChar = _lineEditor.GetCurrentChar(); + tmp_index++; + } + } + + } + + class PlainTextSelection + { + public int startLineNo; + public int startLineNewCharIndex;//start line new char-index + public int endLineNo; + public int endLineNewCharIndex;//on end line + public bool isEmpty = true; + + public void StartSelect(int startLineNo, int charIndex) + { + this.isEmpty = false; + this.startLineNo = endLineNo = startLineNo; + this.startLineNewCharIndex = endLineNewCharIndex = charIndex; + } + public void EndSelect(int endLineNo, int charIndex) + { + this.endLineNo = endLineNo; + this.endLineNewCharIndex = charIndex; + } + public void CancelSelection() => isEmpty = true; + public void Finish() => isEmpty = true; + /// + /// normalized selection + /// + public void Normalize() + { + if (endLineNo < startLineNo) + { + //swap + int temp = startLineNo; + startLineNo = endLineNo; + endLineNo = temp; + // + //force swap start and end char index + temp = endLineNewCharIndex; + startLineNewCharIndex = endLineNewCharIndex; + endLineNewCharIndex = temp; + + } + else if (endLineNo == startLineNo) + { + //on the sameline + if (endLineNewCharIndex < startLineNewCharIndex) + { + int temp = startLineNewCharIndex; + startLineNewCharIndex = endLineNewCharIndex; + endLineNewCharIndex = temp; + } + } + } + } + + static char[] s_newline = new[] { '\r', '\n' }; + public void CopyAll(TextCopyBufferUtf32 output) + { + //all + int j = _lines.Count; + for (int i = 0; i < j; ++i) + { + if (i > 0) + { + output.Append(s_newline); + } + if (i == _currentLineNo) + { + _lineEditor.Read(output); + } + else + { + _lines[i].Content.WriteTo(output); + + } + } + } + + public void CopyCurrentLine(TextCopyBufferUtf32 output) + { + _lineEditor.Read(output); + } + + public void CopyLine(int lineNo, TextCopyBuffer output) + { + PlainTextLine line = _lines[lineNo]; + if (line == _lineEditor.CurrentLine) + { + _lineEditor.Read((TextCopyBufferUtf32)output); + } + else + { + //line with empty content ? + if (!line.Content.IsEmpty) + { + line.Content.WriteTo(output); + } + } + } + + + public void CopySelection(TextCopyBufferUtf32 output) + { + //only selection + if (_selection.isEmpty) { return; } + + int currentLine = _currentLineNo; + _selection.Normalize(); + if (_selection.startLineNo == _selection.endLineNo) + { + //on the sameline + CurrentLineNumber = _selection.startLineNo; + _lineEditor.Read(output, _selection.startLineNewCharIndex, _selection.endLineNewCharIndex - _selection.startLineNewCharIndex); + } + else + { + //more than 1 line + CurrentLineNumber = _selection.startLineNo; + _lineEditor.Read(output, _selection.startLineNewCharIndex, _lineEditor.CharacterCount - _selection.startLineNewCharIndex); + // + int endLineNo = _selection.endLineNo; + if ((endLineNo - _selection.startLineNo - 1) > 0) + { + + for (int i = _selection.startLineNo + 1; i < endLineNo; ++i) + { + output.Append(s_newline); + _lines[i].Content.WriteTo(output); + } + } + + CurrentLineNumber = endLineNo; + output.Append(s_newline); + _lineEditor.Read(output, 0, _selection.endLineNewCharIndex); + CurrentLineNumber = currentLine;//gotback + } + + } + } + + + public static class PlainTextEditSessionExtensions + { + public static void SetSelection(this PlainTextEditSession editSession, int startLineNo, int startLineCharIndex, + int stopLineNo, int stopLineCharIndex) + { + editSession.CurrentLineNumber = startLineNo; + editSession.NewCharIndex = startLineCharIndex; + editSession.StartSelect(); + editSession.CurrentLineNumber = stopLineNo; + editSession.NewCharIndex = stopLineCharIndex; + editSession.EndSelect(); + } + } + + +} diff --git a/src/PixelFarm/LayoutFarm.TextFlow_SH/SeletionRangeSnapshot.cs b/src/PixelFarm/LayoutFarm.TextFlow_SH/SeletionRangeSnapshot.cs new file mode 100644 index 000000000..1017af15a --- /dev/null +++ b/src/PixelFarm/LayoutFarm.TextFlow_SH/SeletionRangeSnapshot.cs @@ -0,0 +1,30 @@ +//Apache2, 2014-present, WinterDev + + +namespace LayoutFarm.TextFlow +{ + public readonly struct SelectionRangeSnapShot + { + public readonly int startLineNum; + public readonly int startColumnNum; + public readonly int endLineNum; + public readonly int endColumnNum; + public SelectionRangeSnapShot(int startLineNum, int startColumnNum, int endLineNum, int endColumnNum) + { + this.startLineNum = startLineNum; + this.startColumnNum = startColumnNum; + this.endLineNum = endLineNum; + this.endColumnNum = endColumnNum; + } + public bool IsEmpty() + { + return startLineNum == 0 && startColumnNum == 0 + && endLineNum == 0 && endColumnNum == 0; + } + public static readonly SelectionRangeSnapShot Empty = new SelectionRangeSnapShot(); + +#if DEBUG + public override string ToString() => startLineNum + ":" + startColumnNum + "," + endLineNum + ":" + endColumnNum; +#endif + } +} \ No newline at end of file diff --git a/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/0_CustomRenderElements/CustomImageRenderBox.cs b/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/0_CustomRenderElements/CustomImageRenderBox.cs index 8e06d83c2..581d762d1 100644 --- a/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/0_CustomRenderElements/CustomImageRenderBox.cs +++ b/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/0_CustomRenderElements/CustomImageRenderBox.cs @@ -1,8 +1,12 @@ //Apache2, 2014-present, WinterDev using PixelFarm.Drawing; +using PixelFarm.CpuBlit; +using PixelFarm.CpuBlit.VertexProcessing; namespace LayoutFarm.CustomWidgets { + + public class CustomImageRenderBox : CustomRenderBox { // @@ -13,9 +17,9 @@ public CustomImageRenderBox(int width, int height) } public override void ClearAllChildren() { - } - public ImageBinder ImageBinder { get; set; } + } + public ImageBinder ImageBinder { get; set; } //img source protected override void RenderClientContent(DrawBoard d, UpdateArea updateArea) { //this render element dose not have child node, so @@ -25,13 +29,18 @@ protected override void RenderClientContent(DrawBoard d, UpdateArea updateArea) if (WaitForStartRenderElement) { return; } - if (ImageBinder == null) { return; } + if (ImageBinder == null) + { + return; + } //---------------------------------- switch (ImageBinder.State) { case BinderState.Loaded: { + //may not need background + d.FillRectangle(this.BackColor, 0, 0, this.Width, this.Height); d.DrawImage(ImageBinder, new RectangleF( @@ -50,11 +59,8 @@ protected override void RenderClientContent(DrawBoard d, UpdateArea updateArea) else if (ImageBinder is AtlasImageBinder) { //resolve this and draw - d.DrawImage(ImageBinder, - new RectangleF( - ContentLeft, ContentTop, - ContentWidth, - ContentHeight)); + goto case BinderState.Loaded; + } } break; diff --git a/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/0_CustomRenderElements/CustomRenderElements.cs b/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/0_CustomRenderElements/CustomRenderElements.cs index 2a2871c3c..21e7daab6 100644 --- a/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/0_CustomRenderElements/CustomRenderElements.cs +++ b/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/0_CustomRenderElements/CustomRenderElements.cs @@ -42,6 +42,11 @@ public CustomRenderBox(int width, int height) } + public void RenderItsContent(DrawBoard d, UpdateArea updateArea) + { + RenderClientContent(d, updateArea); + } + internal List Lines { get; set; } @@ -355,10 +360,35 @@ public override void ChildrenHitTestCore(HitChain hitChain) public class DoubleBufferCustomRenderBox : CustomRenderBox { - DrawboardBuffer _builtInBackBuffer; + bool _hasAccumRect; Rectangle _invalidateRect; + class BackBufferPlate + { + public int no; + public int left; + public int right; + public int top; + public int bottom; + public DrawboardBuffer _backBuffer; + public int Width => right - left; + public int Height => bottom - top; + public void SetBounds(int left, int top, int width, int height) + { + this.left = left; + this.right = left + width; + this.top = top; + this.bottom = top + height; + } + public override string ToString() + { + //plate no + return no.ToString() + ", (left,top)=" + left + "," + top; + } + } + + public DoubleBufferCustomRenderBox(int width, int height) : base(width, height) { @@ -366,134 +396,373 @@ public DoubleBufferCustomRenderBox(int width, int height) } public bool EnableDoubleBuffer { get; set; } - protected override void OnInvalidateGraphicsNoti(bool fromMe, ref Rectangle totalBounds) + + BackBufferPlate _p0; + BackBufferPlate _p1; + TriplePlateMx _triplePlateMx; + + class TriplePlateMx { - if (_builtInBackBuffer != null) + BackBufferPlate[] _plates; + int _width; + int _height; + + public void Init(DrawBoard d, int w, int h) { - //TODO: review here, - //in this case, we copy to another rect - //since we don't want the offset to effect the total bounds -#if DEBUG - if (totalBounds.Width == 150) + if (_plates != null) return; + _width = w; + _height = h; + _plates = new BackBufferPlate[3]; + + _plates[0] = new BackBufferPlate() { _backBuffer = d.CreateBackbuffer(w, h) }; + _plates[1] = new BackBufferPlate() { _backBuffer = d.CreateBackbuffer(w, h) }; + _plates[2] = new BackBufferPlate() { _backBuffer = d.CreateBackbuffer(w, h) }; + + //update init plate-no and bounds + int ypos = 0; + for (int i = 0; i < _plates.Length; ++i) { + BackBufferPlate p = _plates[i]; + p.no = i; + p.SetBounds(0, ypos, w, h); + ypos += h; + } + } + + public void SetCurrentArea(UpdateArea updateArea, out BackBufferPlate _p0, out BackBufferPlate _p1) + { + int topPlateNo = updateArea.Top / _height; + int bottomPlateNo = updateArea.Bottom / _height; + + //find top plate + BackBufferPlate foundPlate = null; + int foundAtIndex = 0; + for (int i = 0; i < _plates.Length; ++i) + { + BackBufferPlate p = _plates[i]; + if (p.no == topPlateNo) //match plate number + { + //found- page + foundPlate = p; + foundAtIndex = i; + break; + } } - System.Diagnostics.Debug.WriteLine("noti, fromMe=" + fromMe + ",bounds" + totalBounds); -#endif - if (!fromMe) + + if (foundPlate == null) { - totalBounds.Offset(-this.X, -this.Y); + //not found matching plate + //swap up or down? + if (_plates[0].no - 1 == topPlateNo) + { + + BackBufferPlate a0 = _plates[0]; + BackBufferPlate a1 = _plates[1]; + BackBufferPlate a2 = _plates[2]; + + //move a0, a1 down + //move a2 up + _plates[0] = a2; + _plates[1] = a0; + _plates[2] = a1; + // + a2.no = a0.no - 1; + a2._backBuffer.IsValid = false; + a2.SetBounds(0, a2.no * _height, _width, _height); + + foundAtIndex = 0; + foundPlate = a2; + } + else if (_plates[2].no + 1 == topPlateNo) + { + BackBufferPlate a0 = _plates[0]; + BackBufferPlate a1 = _plates[1]; + BackBufferPlate a2 = _plates[2]; + + //move a1,a2 up + //move a0 to last elem + _plates[0] = a1; + _plates[1] = a2; + _plates[2] = a0; + // + a0.no = a0.no + 1; + a0._backBuffer.IsValid = false; + a0.SetBounds(0, a2.no * _height, _width, _height); + + foundAtIndex = 2; + foundPlate = a0; + } + else + { + //reset all plates + int ypos = topPlateNo * _height; + for (int i = 0; i < _plates.Length; ++i) + { + BackBufferPlate p = _plates[i]; + p.no = i + topPlateNo; + p._backBuffer.IsValid = false; + p.SetBounds(0, ypos, _width, _height); + ypos += _height; + } + foundPlate = _plates[0]; + foundAtIndex = 0; + } } - _builtInBackBuffer.IsValid = false; - if (!_hasAccumRect) + //found + if (topPlateNo == bottomPlateNo) { - _invalidateRect = totalBounds; - _hasAccumRect = true; + _p0 = foundPlate; + _p1 = null; } else { - _invalidateRect = Rectangle.Union(_invalidateRect, totalBounds); + //need 2 page + _p0 = foundPlate; + if (foundAtIndex + 1 < 3) + { + //0-1-2 + _p1 = _plates[foundAtIndex + 1]; + } + else + { + //we need to swap + BackBufferPlate a0 = _plates[0]; + BackBufferPlate a1 = _plates[1]; + BackBufferPlate a2 = _plates[2]; + + BackBufferPlate tmp1 = a0;//*** + _plates[0] = a1; + _plates[1] = a2; + _plates[2] = tmp1; + + tmp1._backBuffer.IsValid = false;//** + tmp1.no = a2.no + 1; + tmp1.SetBounds(0, a2.bottom, tmp1.Width, tmp1.Height); + + _p1 = tmp1; + } } } - else - { - totalBounds.Offset(this.X, this.Y); - } - //base.OnInvalidateGraphicsNoti(totalBounds);//skip } + protected override void RenderClientContent(DrawBoard d, UpdateArea updateArea) { - if (EnableDoubleBuffer) + if (!EnableDoubleBuffer) + { + base.RenderClientContent(d, updateArea); + return;//early exit*** + } + //------------------------------------------ + + //helper struct + var painter = new PixelFarm.Drawing.Internal.MicroPainter(d); + int backBufferHeight = this.Height * 2; + + //from updateArea we should calculate a proper page + int topPlateNo = updateArea.Top / backBufferHeight; + int bottomPlateNo = updateArea.Bottom / backBufferHeight; + if (_triplePlateMx == null) + { + _triplePlateMx = new TriplePlateMx(); + _triplePlateMx.Init(d, Width, backBufferHeight); + } + + _triplePlateMx.SetCurrentArea(updateArea, out _p0, out _p1); + //------------------------------------------ + bool also_drawWithBackBuffer1 = _p1 != null; + + + if (also_drawWithBackBuffer1 && !_p1._backBuffer.IsValid) { - var painter = new PixelFarm.Drawing.Internal.MicroPainter(d); - if (_builtInBackBuffer == null) + //update +#if DEBUG + System.Diagnostics.Debug.WriteLine("double_buffer_update:" + this.dbug_obj_id + "," + _invalidateRect.ToString()); +#endif + float backupViewportW = painter.ViewportWidth; //backup + float backupViewportH = painter.ViewportHeight; //backup + painter.AttachTo(_p1._backBuffer); //*** switch to builtInBackbuffer + painter.SetViewportSize(this.Width, backBufferHeight);//after to attach new buffer** + if (!_hasAccumRect) { - _builtInBackBuffer = painter.CreateOffscreenDrawBoard(this.Width, this.Height); + _invalidateRect = new Rectangle(0, 0, Width, Height); } +#if DEBUG + d.Clear(Color.Blue);//dbug +#else + d.Clear(Color.White); +#endif + Rectangle backup = updateArea.CurrentRect; + updateArea.CurrentRect = new Rectangle(0, _p1.top, _p1.Width, _p1.Height); + d.SetCanvasOrigin(0, -_p1.top);//minus** + base.RenderClientContent(d, updateArea); + d.SetCanvasOrigin(0, 0); - if (!_builtInBackBuffer.IsValid) - { #if DEBUG - System.Diagnostics.Debug.WriteLine("double_buffer_update:" + this.dbug_obj_id + "," + _invalidateRect.ToString()); + //Image dbugImg = p1._backBuffer.CopyToNewMemBitmap(); + //PixelFarm.CpuBlit.MemBitmapExt.s_dbugEnableDebugImage = true; + //PixelFarm.CpuBlit.MemBitmapExt.SaveImage((PixelFarm.CpuBlit.MemBitmap)dbugImg, "temp1.png", PixelFarm.CpuBlit.MemBitmapIO.OutputImageFormat.Png); + //PixelFarm.CpuBlit.MemBitmapExt.s_dbugEnableDebugImage = false; #endif - float backupViewportW = painter.ViewportWidth; //backup - float backupViewportH = painter.ViewportHeight; //backup - painter.AttachTo(_builtInBackBuffer); //*** switch to builtInBackbuffer - painter.SetViewportSize(this.Width, this.Height); - if (!_hasAccumRect) - { - _invalidateRect = new Rectangle(0, 0, Width, Height); - } + updateArea.CurrentRect = backup; + + _p1._backBuffer.IsValid = true; + + painter.AttachToNormalBuffer();//*** switch back + painter.SetViewportSize(backupViewportW, backupViewportH);//restore viewport size + } + + //-------------- + if (!_p0._backBuffer.IsValid) + { #if DEBUG - if (_invalidateRect.Width == 15) - { + System.Diagnostics.Debug.WriteLine("double_buffer_update:" + this.dbug_obj_id + "," + _invalidateRect.ToString()); +#endif + float backupViewportW = painter.ViewportWidth; //backup + float backupViewportH = painter.ViewportHeight; //backup + painter.AttachTo(_p0._backBuffer); //*** switch to builtInBackbuffer + painter.SetViewportSize(this.Width, backBufferHeight);//after to attach new buffer** + if (!_hasAccumRect) + { + _invalidateRect = new Rectangle(0, 0, Width, Height); + } - } +#if DEBUG + //if (_invalidateRect.Width == 15) + //{ + + //} #endif - // if (painter.PushLocalClipArea( - // _invalidateRect.Left, _invalidateRect.Top, - // _invalidateRect.Width, _invalidateRect.Height)) - // { - //#if DEBUG - // //for debug , test clear with random color - // //another useful technique to see latest clear area frame-by-frame => use random color - // //painter.Clear(Color.FromArgb(255, dbugRandom.Next(0, 255), dbugRandom.Next(0, 255), dbugRandom.Next(0, 255))); - - // canvas.Clear(Color.White); - //#else - // canvas.Clear(Color.White); - //#endif - - // base.RenderBoxContent(canvas, updateArea); - // } - - //if (painter.PushLocalClipArea( - // _invalidateRect.Left, _invalidateRect.Top, - // _invalidateRect.Width, _invalidateRect.Height)) - //{ + // if (painter.PushLocalClipArea( + // _invalidateRect.Left, _invalidateRect.Top, + // _invalidateRect.Width, _invalidateRect.Height)) + // { + //#if DEBUG + // //for debug , test clear with random color + // //another useful technique to see latest clear area frame-by-frame => use random color + // //painter.Clear(Color.FromArgb(255, dbugRandom.Next(0, 255), dbugRandom.Next(0, 255), dbugRandom.Next(0, 255))); + + // canvas.Clear(Color.White); + //#else + // canvas.Clear(Color.White); + //#endif + + // base.RenderBoxContent(canvas, updateArea); + // } + + //if (painter.PushLocalClipArea( + // _invalidateRect.Left, _invalidateRect.Top, + // _invalidateRect.Width, _invalidateRect.Height)) + //{ #if DEBUG - //for debug , test clear with random color - //another useful technique to see latest clear area frame-by-frame => use random color - //painter.Clear(Color.FromArgb(255, dbugRandom.Next(0, 255), dbugRandom.Next(0, 255), dbugRandom.Next(0, 255))); + //for debug , test clear with random color + //another useful technique to see latest clear area frame-by-frame => use random color + //painter.Clear(Color.FromArgb(255, dbugRandom.Next(0, 255), dbugRandom.Next(0, 255), dbugRandom.Next(0, 255))); - d.Clear(Color.White); + d.Clear(Color.White); #else - d.Clear(Color.White); + d.Clear(Color.White); #endif + Rectangle backup = updateArea.CurrentRect; + updateArea.CurrentRect = new Rectangle(0, _p0.top, _p0.Width, _p0.Height); + d.SetCanvasOrigin(0, -_p0.top);//minus** + base.RenderClientContent(d, updateArea); + updateArea.CurrentRect = backup; + d.SetCanvasOrigin(0, 0); + //} + //painter.PopLocalClipArea(); + // + _p0._backBuffer.IsValid = true; + _hasAccumRect = false; + + painter.AttachToNormalBuffer();//*** switch back + painter.SetViewportSize(backupViewportW, backupViewportH);//restore viewport size + } +#if DEBUG + else + { + System.Diagnostics.Debug.WriteLine("double_buffer_update:" + dbug_obj_id + " use cache"); + } +#endif + _hasAccumRect = false; - Rectangle backup = updateArea.CurrentRect; - updateArea.CurrentRect = new Rectangle(0, 0, _builtInBackBuffer.Width, _builtInBackBuffer.Height); - base.RenderClientContent(d, updateArea); - updateArea.CurrentRect = backup; - //} - //painter.PopLocalClipArea(); - // - _builtInBackBuffer.IsValid = true; - _hasAccumRect = false; + if (also_drawWithBackBuffer1) + { + painter.DrawImage(_p0._backBuffer.GetImage(), 0, _p0.top); + painter.DrawImage(_p1._backBuffer.GetImage(), 0, _p1.top); + } + else + { + painter.DrawImage(_p0._backBuffer.GetImage(), 0, _p0.top); + } + } + protected override void OnInvalidateGraphicsNoti(bool fromMe, ref Rectangle totalBounds) + { - painter.AttachToNormalBuffer();//*** switch back - painter.SetViewportSize(backupViewportW, backupViewportH);//restore viewport size - } + //find affected slide + if (_p0 != null) + { + //TODO: review here, + //in this case, we copy to another rect + //since we don't want the offset to effect the total bounds #if DEBUG + //if (totalBounds.Width == 150) + //{ + + //} + System.Diagnostics.Debug.WriteLine("noti, fromMe=" + fromMe + ",bounds" + totalBounds); +#endif + if (!fromMe) + { + totalBounds.Offset(-this.X, -this.Y); + } + + int actualTop = totalBounds.Top + this.ViewportTop; + int actualBottom = totalBounds.Top + this.ViewportBottom; + + _p0._backBuffer.IsValid = false; + + if (!_hasAccumRect) + { + _invalidateRect = totalBounds; + _hasAccumRect = true; + } else { - System.Diagnostics.Debug.WriteLine("double_buffer_update:" + dbug_obj_id + " use cache"); + _invalidateRect = Rectangle.Union(_invalidateRect, totalBounds); + } + + //------ + if (_p1 != null) + { + + if (actualTop < _p1.top && actualBottom > _p1.top) + { + _p1._backBuffer.IsValid = false; + } + else if (actualTop > _p1.top && actualBottom > _p1.bottom) + { + _p1._backBuffer.IsValid = false; + } + else + { + + } } -#endif - painter.DrawImage(_builtInBackBuffer.GetImage(), 0, 0, this.Width, this.Height); } else { - base.RenderClientContent(d, updateArea); + totalBounds.Offset(this.X, this.Y); } - } + //base.OnInvalidateGraphicsNoti(totalBounds);//skip + } } } \ No newline at end of file diff --git a/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/0_CustomRenderElements/CustomTextRun.cs b/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/0_CustomRenderElements/CustomTextRun.cs index 2ce3b9e9a..8516cb03d 100644 --- a/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/0_CustomRenderElements/CustomTextRun.cs +++ b/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/0_CustomRenderElements/CustomTextRun.cs @@ -32,13 +32,9 @@ public CustomTextRun(int width, int height) _font = GlobalRootGraphic.CurrentRootGfx.DefaultTextEditFontInfo; NeedPreRenderEval = true; TextDrawingTech = TextDrawingTech.Stencil;//default - } - public TextDrawingTech TextDrawingTech { get; set; } public bool DelayFormattedString { get; set; } - - public Color TextColor { get => _textColor; @@ -65,11 +61,10 @@ public string Text { //TODO: review here //if input string is null => textBuffer= null - _textBuffer = (value == null) ? null : value.ToCharArray(); - //reset + _textBuffer = value?.ToCharArray(); + //reset if (_renderVxFormattedString != null) { - _renderVxFormattedString.Dispose(); _renderVxFormattedString = null; //---------- @@ -78,20 +73,47 @@ public string Text //similar to size change //for gfx-invalidation, we need a size before change and after change - var textBufferSpan = new TextBufferSpan(_textBuffer); - Size newSize = Typography.Text.GlobalTextService.TxtClient.MeasureString(textBufferSpan, _font);//just measure - int newW = Width; - int newH = Height; - if (!this.HasSpecificWidth) + //TODO: review here,... + //use multi-states technique + + if (_textBuffer == null) { - newW = _contentLeft + (int)System.Math.Ceiling((float)newSize.Width) + _contentRight; + int newW = Width; + int newH = Height; + if (!this.HasSpecificWidth) + { + newW = _contentLeft + /*0*/ +_contentRight; + } + + //TODO: review here + if (!this.HasSpecificHeight) + { + //use current font height + //newH = + } + SetSize(newW, newH); } - if (!this.HasSpecificHeight) + else //if (!this.HasSpecificWidthAndHeight) { - newH = _contentTop + (int)System.Math.Ceiling((float)newSize.Height) + _contentBottom; - } - SetSize(newW, newH); + //evaluate new width or height or both + + + //TODO: split into multi-state + var textBufferSpan = new Typography.Text.TextBufferSpan(_textBuffer); + Size newSize = Typography.Text.GlobalTextService.TxtClient.MeasureString(textBufferSpan, _font);//just measure + int newW = Width; + int newH = Height; + if (!this.HasSpecificWidth) + { + newW = _contentLeft + (int)System.Math.Ceiling((float)newSize.Width) + _contentRight; + } + if (!this.HasSpecificHeight) + { + newH = _contentTop + (int)System.Math.Ceiling((float)newSize.Height) + _contentBottom; + } + SetSize(newW, newH); + } } NeedPreRenderEval = true; } @@ -116,6 +138,8 @@ public RequestFont RequestFont } } + public bool MayOverlapOther { get; set; }//temp fix + public int PaddingLeft { get => _contentLeft - _borderLeft; @@ -187,100 +211,102 @@ public void SetBorders(byte value) _borderRight = _borderBottom = value; } + + const int USE_STRIP_WHEN_LENGTH_MORE_THAN = 2; protected override void PreRenderEvaluation(DrawBoard d) { //in this case we use formatted string //do not draw anything on this stage - if (_textBuffer != null) - { - //for long text ? => configurable? - //use formatted string - if (_textBuffer.Length > 2) - { - if (_renderVxFormattedString == null) - { - if (d == null) { return; } + if (_textBuffer == null) { return; } - Color prevColor = d.CurrentTextColor; - RequestFont prevFont = d.CurrentFont; - TextDrawingTech prevTechnique = d.TextDrawingTech; + if (_textBuffer.Length > USE_STRIP_WHEN_LENGTH_MORE_THAN) + { + //for long text =>use formatted string => configurable? - d.CurrentTextColor = _textColor; - d.CurrentFont = _font; - d.TextDrawingTech = this.TextDrawingTech; + if (_renderVxFormattedString == null) + { + if (d == null) { return; } - //config delay or not - _renderVxFormattedString = d.CreateFormattedString(_textBuffer, 0, _textBuffer.Length, this.DelayFormattedString); + Color prevColor = d.CurrentTextColor; + RequestFont prevFont = d.CurrentFont; + TextDrawingTech prevTechnique = d.TextDrawingTech; - d.TextDrawingTech = prevTechnique; - d.CurrentFont = prevFont; - d.CurrentTextColor = prevColor; - } + d.CurrentTextColor = _textColor; + d.CurrentFont = _font; + d.TextDrawingTech = this.TextDrawingTech; - switch (_renderVxFormattedString.State) - { - case RenderVxFormattedString.VxState.Ready: - { - //newsize - //... + //create a render-vx formatted string + _renderVxFormattedString = d.CreateFormattedString(_textBuffer, 0, _textBuffer.Length, this.DelayFormattedString); - int newW = this.Width; - int newH = this.Height; + d.TextDrawingTech = prevTechnique; + d.CurrentFont = prevFont; + d.CurrentTextColor = prevColor; + } - if (!this.HasSpecificWidth) - { - newW = _contentLeft + (int)System.Math.Ceiling(_renderVxFormattedString.Width) + _contentRight; - } - if (!this.HasSpecificHeight) - { - newH = _contentTop + (int)System.Math.Ceiling(_renderVxFormattedString.SpanHeight) + _contentBottom; - } + switch (_renderVxFormattedString.State) + { + default: + break; + case RenderVxFormattedString.VxState.Ready: + { + //newsize + //... - SuspendGraphicsUpdate(); - SetSize(newW, newH); - ResumeGraphicsUpdate(); + int newW = this.Width; + int newH = this.Height; - //after set this - NeedPreRenderEval = false; + if (!this.HasSpecificWidth) + { + newW = _contentLeft + (int)System.Math.Ceiling(_renderVxFormattedString.Width) + _contentRight; + } + if (!this.HasSpecificHeight) + { + newH = _contentTop + (int)System.Math.Ceiling(_renderVxFormattedString.SpanHeight) + _contentBottom; } - break; - } - } - else - { - //short content - //but we must update content size - //config delay or not - if (!this.HasSpecificWidthAndHeight) - { - int newW = this.Width; - int newH = this.Height; - var buff = new TextBufferSpan(_textBuffer); - Size size = Typography.Text.GlobalTextService.TxtClient.MeasureString(buff, _font); - if (!this.HasSpecificWidth) - { - newW = _contentLeft + size.Width + _contentRight; - } - if (!this.HasSpecificHeight) - { - newH = _contentTop + size.Height + _contentBottom; - } - SuspendGraphicsUpdate(); - SetSize(newW, newH); - ResumeGraphicsUpdate(); + SuspendGraphicsUpdate(); + SetSize(newW, newH); + ResumeGraphicsUpdate(); - //after set this - NeedPreRenderEval = false; - } + NeedPreRenderEval = false; //mark as evalution is finish + } + break; } } else { - //no content + //short content + //but we must update content size + //config delay or not + if (!this.HasSpecificWidthAndHeight) + { + int newW = this.Width; + int newH = this.Height; + var buff = new Typography.Text.TextBufferSpan(_textBuffer); + Size size = Typography.Text.GlobalTextService.TxtClient.MeasureString(buff, _font); + if (!this.HasSpecificWidth) + { + newW = _contentLeft + size.Width + _contentRight; + } + if (!this.HasSpecificHeight) + { + newH = _contentTop + size.Height + _contentBottom; + } + + SuspendGraphicsUpdate(); + SetSize(newW, newH); + ResumeGraphicsUpdate(); + + NeedPreRenderEval = false; //mark as evalution is finish + } } } + +#if DEBUG + int _dbugRecreateCount; + System.DateTime _dbugLatestRecreated; +#endif protected override void RenderClientContent(DrawBoard d, UpdateArea updateArea) { #if DEBUG @@ -329,45 +355,60 @@ protected override void RenderClientContent(DrawBoard d, UpdateArea updateArea) //in that case, we can hint the text-rendering with host color instead //so we try to check the host color by policy that configure on this CustomTextRun - //TODO: if the - + //TODO: if the } - if (_textBuffer.Length > 2) + if (_textBuffer.Length > USE_STRIP_WHEN_LENGTH_MORE_THAN) { - //for long text ? => configurable? - //use formatted string - if (_renderVxFormattedString == null) + if (MayOverlapOther && _backColor.A == 0) //configure alpha here** { - _renderVxFormattedString = d.CreateFormattedString(_textBuffer, 0, _textBuffer.Length, DelayFormattedString); + //transparent + //short text => run + d.DrawText(_textBuffer, _contentLeft, _contentTop); } - //------------- - switch (_renderVxFormattedString.State) + else { - case RenderVxFormattedString.VxState.Ready: - - - - d.DrawRenderVx(_renderVxFormattedString, _contentLeft, _contentTop); - - break; - case RenderVxFormattedString.VxState.NoStrip: + if (_renderVxFormattedString == null) + { + _renderVxFormattedString = d.CreateFormattedString(_textBuffer, 0, _textBuffer.Length, DelayFormattedString); + } - //put this to the update queue system - //(TODO: add extension method for this) + if (_renderVxFormattedString.IsReset) + { + if (_renderVxFormattedString.State != RenderVxFormattedString.VxState.Waiting) + { + GlobalRootGraphic.CurrentRootGfx.EnqueueRenderRequest(new RenderBoxes.RenderElementRequest( + this, + RenderBoxes.RequestCommand.ProcessFormattedString, + _renderVxFormattedString)); + } - GlobalRootGraphic.CurrentRootGfx.EnqueueRenderRequest(new RenderBoxes.RenderElementRequest( - this, - RenderBoxes.RequestCommand.ProcessFormattedString, - _renderVxFormattedString)); + } + else + { + switch (_renderVxFormattedString.State) + { + case RenderVxFormattedString.VxState.Ready: + //bitmap strip is ready + d.DrawRenderVx(_renderVxFormattedString, _contentLeft, _contentTop); + break; + case RenderVxFormattedString.VxState.NoStrip: + //put this to the update queue system + if (_renderVxFormattedString.State != RenderVxFormattedString.VxState.Waiting) + { + GlobalRootGraphic.CurrentRootGfx.EnqueueRenderRequest(new RenderBoxes.RenderElementRequest( + this, + RenderBoxes.RequestCommand.ProcessFormattedString, + _renderVxFormattedString)); + } + break; + } + } - break; } } else { - - //short text => run d.DrawText(_textBuffer, _contentLeft, _contentTop); } // diff --git a/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/1_UIElement/3_AbstractRect.cs b/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/1_UIElement/3_AbstractRect.cs index 41e6c579d..4b34ce910 100644 --- a/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/1_UIElement/3_AbstractRect.cs +++ b/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/1_UIElement/3_AbstractRect.cs @@ -90,7 +90,7 @@ public AbstractRectUI(int width, int height) public VerticalAlignment VerticalAlignment { get; set; } - + public int CalculatedMinWidth { get; protected set; } public int CalculatedMinHeight { get; protected set; } @@ -99,12 +99,12 @@ public AbstractRectUI(int width, int height) public event EventHandler ViewportChanged;//TODO: review this*** => use event queue? - + protected void RaiseViewportChanged() { if (ViewportChanged != null) { - + using (Temp.Borrow(out ViewportChangedEventArgs changedEventArgs)) { changedEventArgs.Kind = ViewportChangedEventArgs.ChangeKind.Location; @@ -117,7 +117,7 @@ protected void RaiseLayoutFinished() { if (ViewportChanged != null) { - + using (Temp.Borrow(out ViewportChangedEventArgs changedEventArgs)) { changedEventArgs.Kind = ViewportChangedEventArgs.ChangeKind.LayoutDone; diff --git a/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/2_Basic/0_AbstractBox.cs b/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/2_Basic/0_AbstractBox.cs index 685791eac..46737820d 100644 --- a/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/2_Basic/0_AbstractBox.cs +++ b/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/2_Basic/0_AbstractBox.cs @@ -480,7 +480,7 @@ protected override void OnMouseWheel(UIMouseWheelEventArgs e) new_top = 0; } } - SetViewport(_viewportLeft, new_top); + SetViewport(_viewportLeft, new_top); } MouseWheel?.Invoke(this, e); } diff --git a/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/2_Basic/1_ImageBox.cs b/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/2_Basic/1_ImageBox.cs index d7d663c66..c2db03335 100644 --- a/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/2_Basic/1_ImageBox.cs +++ b/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/2_Basic/1_ImageBox.cs @@ -11,6 +11,8 @@ public class ImageBox : AbstractBox CustomImageRenderBox _imgRenderBox; ImageBinder _imageBinder; EventHandler _imgChangedSubscribe; + + public ImageBox() : this(16, 16) { //if user does not provide width and height, @@ -54,18 +56,16 @@ public ImageBinder ImageBinder } } } - - + public override RenderElement GetPrimaryRenderElement() { if (_imgRenderBox == null) { - var renderBox = new CustomImageRenderBox(this.Width, this.Height); - SetCommonProperties(renderBox, this); - renderBox.ImageBinder = _imageBinder; - - SetPrimaryRenderElement(renderBox); - _imgRenderBox = renderBox; + var imgBox = new CustomImageRenderBox(this.Width, this.Height); + SetCommonProperties(imgBox, this); + imgBox.ImageBinder = _imageBinder; + SetPrimaryRenderElement(imgBox); + _imgRenderBox = imgBox; } return _imgRenderBox; } @@ -76,8 +76,8 @@ public override void SetSize(int width, int height) this.CurrentPrimaryRenderElement?.SetSize(width, height); } public override void SetInnerContentSize(int w, int h) - { - this.CurrentPrimaryRenderElement?.SetSize(w, h); + { + this.CurrentPrimaryRenderElement?.SetSize(w, h); } void OnContentUpdate() { diff --git a/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/2_Basic/2_TextBox.cs b/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/2_Basic/2_TextBox.cs index 5ca462086..ec08d41cd 100644 --- a/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/2_Basic/2_TextBox.cs +++ b/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/2_Basic/2_TextBox.cs @@ -5,10 +5,9 @@ using System.Text; using PixelFarm.Drawing; -using LayoutFarm.TextEditing; +using LayoutFarm.TextFlow; using LayoutFarm.UI; -using Typography.Text; namespace LayoutFarm.CustomWidgets { public abstract class TextBoxBase : AbstractRectUI @@ -99,7 +98,7 @@ public TextSpanStyle DefaultSpanStyle // public int CurrentLineCharIndex => _textEditRenderElement.CurrentLineCharIndex; // - public int CurrentRunCharIndex => _textEditRenderElement.CurrentTextRunCharIndex; + public int CurrentLineNumber => _textEditRenderElement.CurrentLineNumber; public override void Focus() @@ -132,7 +131,7 @@ public override void Blur() public override int InnerHeight => (_textEditRenderElement != null) ? _textEditRenderElement.InnerContentHeight : base.InnerHeight; public abstract string Text { get; set; } - public abstract void SetText(IEnumerable lines); + // public void FindCurrentUnderlyingWord(out int startAt, out int len) { @@ -238,7 +237,7 @@ protected override void OnMouseUp(UIMouseUpEventArgs e) public class TextBox : TextBoxBase { - IEnumerable _doc; + PlainTextDocument _doc; bool _isEditable; public TextBox(int width, int height, bool multiline, bool isEditable = true) @@ -252,67 +251,45 @@ public TextBox(int width, int height, bool multiline, bool isEditable = true) /// write all lines into stbuilder /// /// - public void CopyContentTo(StringBuilder stBuilder) + public void CopyContentTo(Typography.Text.TextCopyBuffer output) + { + _textEditRenderElement.CopyContentToStringBuilder(output); + } + public void CopyCurrentLine(Typography.Text.TextCopyBuffer output) { - _textEditRenderElement.CopyContentToStringBuilder(stBuilder); + //TODO + _textEditRenderElement.CopyCurrentLine(output); } + + public VisualTextFlowEditSession GetEditSession() => TextEditRenderBox.GetEditSession(_textEditRenderElement); + #if DEBUG public override void SetLocation(int left, int top) { + //for debug base.SetLocation(left, top); } #endif - RunStyle _runStyle; - RunStyle GetDefaultRunStyle() - { - if (_runStyle == null) - { - return _runStyle = new RunStyle() - { - FontColor = DefaultSpanStyle.FontColor, - ReqFont = DefaultSpanStyle.ReqFont, - ContentHAlign = DefaultSpanStyle.ContentHAlign, - }; - } - else - { - return _runStyle; - } - } - - - public override void SetText(IEnumerable lines) - { - _doc = PlainTextDocumentHelper.CreatePlainTextDocument(lines); - ReloadDocument(); - } public override string Text { get { if (_textEditRenderElement != null) { - //TODO, use string builder pool - using (StringBuilderPool.GetFreeStringBuilder(out StringBuilder sb)) + + using (new TextUtf32RangeCopyPoolContext(out Typography.Text.TextCopyBufferUtf32 output)) { - CopyContentTo(sb); - return sb.ToString(); + CopyContentTo(output); + return output.ToString(); } } else { - //TODO, use string builder pool - using (StringBuilderPool.GetFreeStringBuilder(out StringBuilder sb)) + using (new StringBuilderPoolContext(out StringBuilder sb)) { - bool passFirstLine = false; - foreach (PlainTextLine line in _doc) - { - if (passFirstLine) { sb.AppendLine(); } - line.CopyText(sb); - passFirstLine = true; - } + _doc.WriteTo(sb); return sb.ToString(); } } @@ -321,16 +298,16 @@ public override string Text { if (_textEditRenderElement == null) { - _doc = PlainTextDocumentHelper.CreatePlainTextDocument(value); + _doc = new PlainTextDocument(value); return; } //--------------- if (value == null) { - _doc = new List(); + _doc = new PlainTextDocument(""); return; } - _doc = PlainTextDocumentHelper.CreatePlainTextDocument(value); + _doc = new PlainTextDocument(value); ReloadDocument(); //convert to runs } @@ -343,21 +320,7 @@ void ReloadDocument() } _textEditRenderElement.ClearAllChildren(); - int lineCount = 0; - - //RunStyle runstyle = GetDefaultRunStyle(); - foreach (PlainTextLine line in _doc) - { - if (lineCount > 0) - { - _textEditRenderElement.SplitCurrentLineToNewLine(); - } - - - _textEditRenderElement.AddTextLine(line); - lineCount++; - } - + _textEditRenderElement.Reload(_doc); this.InvalidateGraphics(); } public override RenderElement GetPrimaryRenderElement() @@ -415,7 +378,6 @@ public static TextEditRenderBox GetTextEditRenderBox(TextBox txtbox) return txtbox._textEditRenderElement; } - public static TextFlowEditSession GetEditSession(TextBox txtbox) => TextEditRenderBox.GetCurrentEditSession(txtbox._textEditRenderElement); public Run CurrentTextSpan => _textEditRenderElement.CurrentTextRun; @@ -423,31 +385,12 @@ public void ReplaceCurrentTextRunContent(int nBackspaces, string newstr) { _textEditRenderElement?.ReplaceCurrentTextRunContent(nBackspaces, newstr); } - - public void CopyCurrentLine(StringBuilder stbuilder) - { - _textEditRenderElement.CopyCurrentLine(stbuilder); - } - - //public void FormatCurrentSelection(TextSpanStyle spanStyle) - //{ - // //TODO: reimplement text-model again - // _textEditRenderElement.TextLayerController.DoFormatSelection(spanStyle); - - //} - //public void FormatCurrentSelection(TextSpanStyle spanStyle, FontStyle toggleFontStyle) - //{ - // //TODO: reimplement text-model again - // _textEditRenderElement.TextLayerController.DoFormatSelection(spanStyle, toggleFontStyle); - //} - - } public sealed class MaskTextBox : TextBoxBase { - List _actualUserInputText = new List(); + readonly List _actualUserInputText = new List(); int _keydownCharIndex = 0; public MaskTextBox(int width, int height) @@ -497,16 +440,7 @@ protected override void OnKeyPress(UIKeyEventArgs e) _textEditRenderElement.HandleKeyPress(e); e.CancelBubbling = true; } - public override void SetText(IEnumerable lines) - { - //not support in this version - //TODO: review here -#if DEBUG - System.Diagnostics.Debug.WriteLine("maskTextBox_setText:"); -#endif - - } public override string Text { get @@ -519,6 +453,7 @@ public override string Text set { //can not set by code? + } } @@ -563,14 +498,14 @@ public override RenderElement GetPrimaryRenderElement() } else { - VisualSelectionRangeSnapShot removedRange = e.SelectionSnapShot; + SelectionRangeSnapShot removedRange = e.SelectionSnapShot; _actualUserInputText.RemoveRange(removedRange.startColumnNum, removedRange.endColumnNum - removedRange.startColumnNum); } } else if (_keydownCharIndex == currentCharIndex) { //del - VisualSelectionRangeSnapShot removedRange = e.SelectionSnapShot; + SelectionRangeSnapShot removedRange = e.SelectionSnapShot; if (removedRange.endColumnNum == removedRange.startColumnNum) { _actualUserInputText.RemoveAt(_keydownCharIndex); diff --git a/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/2_Basic/4_Label.cs b/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/2_Basic/4_Label.cs index 08dca2f21..74796200f 100644 --- a/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/2_Basic/4_Label.cs +++ b/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/2_Basic/4_Label.cs @@ -7,7 +7,7 @@ namespace LayoutFarm.CustomWidgets public class Label : AbstractRectUI { - string _text; + string _text; //temp text during no text-run Color _textColor; //text color Color _backColor;//actual filling color @@ -42,22 +42,27 @@ public override RenderElement GetPrimaryRenderElement() { var t_run = new CustomTextRun(this.Width, this.Height); t_run.TextDrawingTech = _textDrawingTech; - t_run.TextColor = _textColor; t_run.BackColor = _backColor; - t_run.Text = this.Text; t_run.PaddingLeft = this.PaddingLeft; t_run.PaddingTop = this.PaddingTop; + t_run.MayOverlapOther = this.MayOverlapOther; t_run.SetVisible(this.Visible); - t_run.SetLocation(this.Left, this.Top); - t_run.SetController(this); - t_run.TransparentForMouseEvents = this.TransparentForMouseEvents; + t_run.DelayFormattedString = _delayTextEvalution; - // if (_font != null) { t_run.RequestFont = _font; } + t_run.Text = this.Text; + + t_run.SetLocation(this.Left, this.Top); + t_run.SetController(this); + t_run.TransparentForMouseEvents = this.TransparentForMouseEvents; + // + + + //IMPORTANT, place here in last-step _myTextRun = t_run; } //----------- @@ -102,22 +107,24 @@ public override void SetFont(RequestFont font) if (_myTextRun != null) { _myTextRun.RequestFont = font; - } - + } } // public override RenderElement CurrentPrimaryRenderElement => _myTextRun; // public string Text { - get => _text; + get => (_myTextRun != null) ? _myTextRun.Text : _text; set { - _text = value; if (_myTextRun != null) { _myTextRun.Text = value; } + else + { + _text = value; + } } } public TextDrawingTech TextDrawingTech @@ -133,6 +140,33 @@ public TextDrawingTech TextDrawingTech } } + bool _delayTextEvalution; + public bool DelayTextEvalution + { + get => _delayTextEvalution; + set + { + _delayTextEvalution = value; + if (_myTextRun != null) + { + _myTextRun.DelayFormattedString = value; + } + } + } + + bool _mayOverlapOther; + public bool MayOverlapOther + { + get => _mayOverlapOther; + set + { + _mayOverlapOther = value; + if (_myTextRun != null) + { + _myTextRun.MayOverlapOther = value; + } + } + } /// diff --git a/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/2_Basic/5_TextFlowLabel.cs b/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/2_Basic/5_TextFlowLabel.cs index ac04a163d..7d90094c2 100644 --- a/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/2_Basic/5_TextFlowLabel.cs +++ b/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/2_Basic/5_TextFlowLabel.cs @@ -2,7 +2,7 @@ using PixelFarm.Drawing; using LayoutFarm.UI; -using LayoutFarm.TextEditing; +using LayoutFarm.TextFlow; namespace LayoutFarm.CustomWidgets { @@ -14,7 +14,7 @@ public class TextFlowLabel : AbstractRectUI protected TextFlowRenderBox _textFlowRenderBox; - protected System.Collections.Generic.IEnumerable _doc; + protected PlainTextDocument _doc; public TextFlowLabel() : this(16, 16) { @@ -108,7 +108,7 @@ public string Text set { _orgText = value; - _doc = PlainTextDocumentHelper.CreatePlainTextDocument(value); + _doc = new PlainTextDocument(value); if (_textFlowRenderBox != null) { ReloadDocument(); @@ -123,19 +123,7 @@ void ReloadDocument() } _textFlowRenderBox.ClearAllChildren(); - int lineCount = 0; - - foreach (PlainTextLine line in _doc) - { - if (lineCount > 0) - { - _textFlowRenderBox.SplitCurrentLineToNewLine(); - } - //we create an unparse text run*** - _textFlowRenderBox.AddTextLine(line); - lineCount++; - } - + _textFlowRenderBox.Reload(_doc); this.InvalidateGraphics(); } diff --git a/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/4.1_Composites/TextBoxContainer.cs b/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/4.1_Composites/TextBoxContainer.cs index 9e2fb24d4..dcd046967 100644 --- a/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/4.1_Composites/TextBoxContainer.cs +++ b/src/PixelFarm/LayoutFarm.YourBasicCustomWidgets_SH/4.1_Composites/TextBoxContainer.cs @@ -19,7 +19,7 @@ public class TextBoxContainer : AbstractControlBox string _placeHolderText = ""; bool _isMultiLine; bool _isEditable; - TextEditing.TextSurfaceEventListener _textSurfaceEventListener; + LayoutFarm.TextFlow.TextSurfaceEventListener _textSurfaceEventListener; public event EventHandler KeyDown; public event EventHandler KeyUp; public TextBoxContainer(int w, int h, bool multiline, bool maskTextBox = false) @@ -89,7 +89,7 @@ public override RenderElement GetPrimaryRenderElement() _placeHolder.TextColor = Color.FromArgb(180, KnownColors.LightGray); baseRenderElement.AddChild(_placeHolder); - _textSurfaceEventListener = new TextEditing.TextSurfaceEventListener(); + _textSurfaceEventListener = new LayoutFarm.TextFlow.TextSurfaceEventListener(); _textSurfaceEventListener.KeyDown += textEvListener_KeyDown; TextBoxSwitcher textboxSwitcher = this.TextBoxSwitcher; @@ -132,7 +132,7 @@ public override RenderElement GetPrimaryRenderElement() return base.GetPrimaryRenderElement(); } } - void textEvListener_KeyDown(object sender, TextEditing.TextDomEventArgs e) + void textEvListener_KeyDown(object sender, LayoutFarm.TextFlow.TextDomEventArgs e) { if (!string.IsNullOrEmpty(_placeHolderText)) @@ -199,22 +199,7 @@ public void SetText(string value) _userText = value; } } - public void SetText(IEnumerable lines) - { - //TODO: review here, this version - //support only multiline mode - if (_myTextBox != null && _isMultiLine) - { - _myTextBox.SetText(lines); - } - else - { - -#if DEBUG - System.Diagnostics.Debug.WriteLine("set_text:"); -#endif - } - } + public override void Focus() { if (_textboxSwitcher != null) diff --git a/src/PixelFarm/PaintLab.AbstractPlatform/PaintLab.AbstractPlatform.csproj b/src/PixelFarm/PaintLab.AbstractPlatform/PaintLab.AbstractPlatform.csproj index 5da611d58..2c91d11dd 100644 --- a/src/PixelFarm/PaintLab.AbstractPlatform/PaintLab.AbstractPlatform.csproj +++ b/src/PixelFarm/PaintLab.AbstractPlatform/PaintLab.AbstractPlatform.csproj @@ -80,12 +80,6 @@ 0_REF_PaintLab.RenderTree.TextSurface\1.0_Common\DoubleBufferCustomRenderBox.cs - - 0_REF_PaintLab.RenderTree.TextSurface\1.0_Common\PlainTextDocumentHelper.cs - - - 0_REF_PaintLab.RenderTree.TextSurface\1.0_Common\StringBuilderPool.cs - 0_REF_PaintLab.RenderTree.TextSurface\1.1_Runs\CharLocation.cs @@ -119,12 +113,6 @@ 0_REF_PaintLab.RenderTree.TextSurface\1.2_Lines\1_TextLine_CORE_Collection.cs - - 0_REF_PaintLab.RenderTree.TextSurface\1.2_Lines\2_TextLine_PRIVATE_CollectionFeatures2.cs - - - 0_REF_PaintLab.RenderTree.TextSurface\1.2_Lines\3_TextLine_PUBLIC_CollectionFeatures.cs - 0_REF_PaintLab.RenderTree.TextSurface\1.2_Lines\4_TextLine_ArrangeAndResizingMechanism.cs @@ -134,12 +122,12 @@ 0_REF_PaintLab.RenderTree.TextSurface\1.2_Lines\debugActivityRecorder.cs + + 0_REF_PaintLab.RenderTree.TextSurface\1.2_Lines\RunListPool.cs + 0_REF_PaintLab.RenderTree.TextSurface\1.2_Lines\TextLineWalker.cs - - 0_REF_PaintLab.RenderTree.TextSurface\1.2_Lines\TextRangeCopy.cs - 0_REF_PaintLab.RenderTree.TextSurface\1.3_Layers\ITextFlowOwner.cs @@ -149,18 +137,15 @@ 0_REF_PaintLab.RenderTree.TextSurface\1.3_Layers\TextFlowLayer.cs - - 0_REF_PaintLab.RenderTree.Text\2.1_MultiLineController\DocumentActions.cs - - - 0_REF_PaintLab.RenderTree.Text\2.1_MultiLineController\TextFlowEditSession.cs - - - 0_REF_PaintLab.RenderTree.Text\2.1_MultiLineController\TextFlowSelectSession.cs - 0_REF_PaintLab.RenderTree.Text\2.1_MultiLineController\TextSurfaceEventListener.cs + + 0_REF_PaintLab.RenderTree.Text\VisualTextFlowEditSession_part1.cs + + + 0_REF_PaintLab.RenderTree.Text\VisualTextFlowEditSession_part2.cs + 0_REF_PaintLab.RenderTree.Text\2.2_TextRenderBox\EditorCaret.cs @@ -280,5 +265,6 @@ Typography.One + \ No newline at end of file diff --git a/src/PixelFarm/PaintLab.AppHost/PaintLab.AppHost.projitems b/src/PixelFarm/PaintLab.AppHost/PaintLab.AppHost.projitems index 843def687..ddeb85570 100644 --- a/src/PixelFarm/PaintLab.AppHost/PaintLab.AppHost.projitems +++ b/src/PixelFarm/PaintLab.AppHost/PaintLab.AppHost.projitems @@ -14,7 +14,5 @@ - - \ No newline at end of file diff --git a/src/PixelFarm/PaintLab.AppHost/SmartApp.cs b/src/PixelFarm/PaintLab.AppHost/SmartApp.cs deleted file mode 100644 index 290d97023..000000000 --- a/src/PixelFarm/PaintLab.AppHost/SmartApp.cs +++ /dev/null @@ -1,61 +0,0 @@ -//Apache2, 2014-present, WinterDev - -using PixelFarm.Drawing; -using LayoutFarm.CustomWidgets; -using LayoutFarm.UI; -namespace LayoutFarm -{ - public abstract class SmartApp : App - { - Box _primaryContainer; - AppHost _appHost; - - protected AppHost AppHost => _appHost; - protected sealed override void OnStart(AppHost host) - { - _appHost = host; - OnInitializing(); - } - protected virtual void OnInitializing() { } - public void SetPrimaryContainer(Box primaryContainer) - { - _primaryContainer = primaryContainer; - } - public bool Visible - { - get => (_primaryContainer != null) ? _primaryContainer.Visible : true; - set - { - if (_primaryContainer != null) - { - _primaryContainer.Visible = value; - } - } - } - - protected void AddToPrimaryContainer(UIElement ui) - { - if (_primaryContainer != null) - { - _primaryContainer.Add(ui); - } - else - { - _appHost.AddChild(ui); - } - } - protected Size GetPrimaryContainerSize() - { - if (_primaryContainer != null) - { - return new Size(_primaryContainer.Width, _primaryContainer.Height); - } - else - { - //use primary screen size ? - //or main form size? - return new Size(_appHost.PrimaryScreenWidth, _appHost.PrimaryScreenHeight); - } - } - } -} \ No newline at end of file diff --git a/src/PixelFarm/PaintLab.Platforms.Glfw/PaintLab.Platforms.Glfw.csproj b/src/PixelFarm/PaintLab.Platforms.Glfw/PaintLab.Platforms.Glfw.csproj index ef0716c8d..86c42d946 100644 --- a/src/PixelFarm/PaintLab.Platforms.Glfw/PaintLab.Platforms.Glfw.csproj +++ b/src/PixelFarm/PaintLab.Platforms.Glfw/PaintLab.Platforms.Glfw.csproj @@ -49,10 +49,6 @@ - - {662f2274-d6f8-413a-a908-1b2f10c01348} - PixelFarm.One.HtmlRenderer - {f5a89623-87b9-42a3-a58c-abee7c9bbca2} MiniOpenTK_Net20 diff --git a/src/PixelFarm/PaintLab.Platforms.Win32/PaintLab.Platforms.Win32.csproj b/src/PixelFarm/PaintLab.Platforms.Win32/PaintLab.Platforms.Win32.csproj index c0500a147..d815623f2 100644 --- a/src/PixelFarm/PaintLab.Platforms.Win32/PaintLab.Platforms.Win32.csproj +++ b/src/PixelFarm/PaintLab.Platforms.Win32/PaintLab.Platforms.Win32.csproj @@ -66,9 +66,9 @@ - - {662f2274-d6f8-413a-a908-1b2f10c01348} - PixelFarm.One.HtmlRenderer + + {5b9fe9f1-12ce-4775-bcef-0ad3cb614ee5} + PixelFarm.One {f5a89623-87b9-42a3-a58c-abee7c9bbca2} diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.0_Common/DoubleBufferCustomRenderBox.cs b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.0_Common/DoubleBufferCustomRenderBox.cs index 60507c60d..3448066c7 100644 --- a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.0_Common/DoubleBufferCustomRenderBox.cs +++ b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.0_Common/DoubleBufferCustomRenderBox.cs @@ -3,7 +3,7 @@ using PixelFarm.Drawing; -namespace LayoutFarm.TextEditing +namespace LayoutFarm.TextFlow { public class DoubleBufferCustomRenderBox : AbstractRectRenderElement { @@ -149,7 +149,8 @@ protected override void RenderClientContent(DrawBoard d, UpdateArea updateArea) System.Diagnostics.Debug.WriteLine("double_buffer_update:" + dbug_obj_id + " use cache"); } #endif - painter.DrawImage(_builtInBackBuffer.GetImage(), 0, 0, this.Width, this.Height); + //painter.DrawImage(_builtInBackBuffer.GetImage(), 0, 0, this.Width, this.Height); + painter.DrawImage(_builtInBackBuffer.GetImage(), 0, 0); } else { diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.0_Common/PlainTextDocumentHelper.cs b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.0_Common/PlainTextDocumentHelper.cs index 8b519bc68..5f282702b 100644 --- a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.0_Common/PlainTextDocumentHelper.cs +++ b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.0_Common/PlainTextDocumentHelper.cs @@ -1,35 +1 @@ -//Apache2, 2014-present, WinterDev - -using System; -using System.Collections.Generic; - -namespace LayoutFarm.TextEditing -{ - public static class PlainTextDocumentHelper - { - public static List CreatePlainTextDocument(string orgText) - { - var lines = new List(); - using (System.IO.StringReader reader = new System.IO.StringReader(orgText)) - { - string line = reader.ReadLine(); - while (line != null) - { - //... - lines.Add(new PlainTextLine(line)); - line = reader.ReadLine(); - } - } - return lines; - } - public static List CreatePlainTextDocument(IEnumerable lines) - { - var plainTextLines = new List(); - foreach (string line in lines) - { - plainTextLines.Add(new PlainTextLine(line)); - } - return plainTextLines; - } - } -} \ No newline at end of file + \ No newline at end of file diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.0_Common/StringBuilderPool.cs b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.0_Common/StringBuilderPool.cs deleted file mode 100644 index f25fd0ff8..000000000 --- a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.0_Common/StringBuilderPool.cs +++ /dev/null @@ -1,85 +0,0 @@ -//Apache2, 2014-present, WinterDev - -using System.Collections.Generic; -using System.Text; - -namespace LayoutFarm.TextEditing -{ - public static class StringBuilderPool - { - [System.ThreadStatic] - static Stack s_stringBuilderPool; - - public static StringBuilder GetFreeStringBuilder() - { - if (s_stringBuilderPool == null) - { - s_stringBuilderPool = new Stack(); - } - - if (s_stringBuilderPool.Count > 0) - { - return s_stringBuilderPool.Pop(); - } - else - { - return new StringBuilder(); - } - } - public static void ReleaseStringBuilder(StringBuilder stBuilder) - { - stBuilder.Length = 0; - s_stringBuilderPool.Push(stBuilder); - } - - - public static StringBuilderPoolContext GetFreeStringBuilder(out StringBuilder stbuilder) - { - return new StringBuilderPoolContext(out stbuilder); - } - } - - public struct StringBuilderPoolContext : System.IDisposable - { - StringBuilder _cacheStBuilder; - public StringBuilderPoolContext(out StringBuilder stbuilder) - { - _cacheStBuilder = stbuilder = StringBuilderPool.GetFreeStringBuilder(); - } - public void Dispose() - { - if (_cacheStBuilder != null) - { - StringBuilderPool.ReleaseStringBuilder(_cacheStBuilder); - _cacheStBuilder = null; - } - } - } - - struct TempTextLineCopyContext : System.IDisposable - { - class StringBuilderPoolOwner { } //temp class for our private string builder - - StringBuilder _tempStBuilder; - public TempTextLineCopyContext(TextLineBox textline, out Typography.Text.TextBufferSpan buffSpan) - { - _tempStBuilder = StringBuilderPool.GetFreeStringBuilder(); - textline.CopyLineContent(_tempStBuilder); - - int len = _tempStBuilder.Length; - char[] charBuffer = new char[len]; - _tempStBuilder.CopyTo(0, charBuffer, 0, len); - buffSpan = new Typography.Text.TextBufferSpan(charBuffer); - } - public void Dispose() - { - if (_tempStBuilder != null) - { - StringBuilderPool.ReleaseStringBuilder(_tempStBuilder); - _tempStBuilder = null; - } - } - } - - -} \ No newline at end of file diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.1_Runs/CharLocation.cs b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.1_Runs/CharLocation.cs index 6b1ec994d..45714c948 100644 --- a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.1_Runs/CharLocation.cs +++ b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.1_Runs/CharLocation.cs @@ -1,6 +1,6 @@ //Apache2, 2014-present, WinterDev -namespace LayoutFarm.TextEditing +namespace LayoutFarm.TextFlow { public readonly struct CharLocation { diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.1_Runs/Run.cs b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.1_Runs/Run.cs index d9b8ed9fe..801939237 100644 --- a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.1_Runs/Run.cs +++ b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.1_Runs/Run.cs @@ -2,22 +2,20 @@ using System; using System.Collections.Generic; -using System.Text; using PixelFarm.Drawing; +using Typography.Text; -namespace LayoutFarm.TextEditing +namespace LayoutFarm.TextFlow { /// /// any run, text, image etc /// - public abstract class Run + public abstract partial class Run { - //bool _validCalSize; - //bool _validContentArr; - + readonly RunStyle _runStyle; TextLineBox _ownerTextLine; - RunStyle _runStyle; + LinkedListNode _linkNode; int _left; @@ -25,26 +23,17 @@ public abstract class Run int _width; int _height; - internal Run(RunStyle runStyle) { _runStyle = runStyle; - _width = _height = 10; + _width = _height = 10;//default } protected RequestFont GetFont() => _runStyle.ReqFont; - protected int MeasureLineHeightInt32() => (int)Math.Round(_runStyle.MeasureBlankLineHeight()); - - protected float MeasureLineHeight() => _runStyle.MeasureBlankLineHeight(); - - protected Size MeasureString(in TextBufferSpan textBufferSpan) => _runStyle.MeasureString(textBufferSpan); + protected Size MeasureString(in Typography.Text.TextBufferSpan textBufferSpan) => _runStyle.MeasureString(textBufferSpan); public RunStyle RunStyle => _runStyle; - // - public virtual void SetStyle(RunStyle runStyle) => _runStyle = runStyle; - - public bool HitTest(Rectangle r) => Bounds.IntersectsWith(r); public bool HitTest(UpdateArea r) => Bounds.IntersectsWith(r.CurrentRect); @@ -55,7 +44,7 @@ internal Run(RunStyle runStyle) public abstract void Draw(DrawBoard d, UpdateArea updateArea); public bool HasParent => _ownerTextLine != null; - public Size Size => new Size(_width, _height); + public int Width => _width; public int Height => _height; public int Left => _left; @@ -87,9 +76,12 @@ public static void RemoveParentLink(Run run) internal abstract bool IsInsertable { get; } public abstract int CharacterCount { get; } - public abstract char GetChar(int index); - public abstract string GetText(); - public abstract void WriteTo(StringBuilder stbuilder); + + public abstract int GetChar(int index); + + public abstract void WriteTo(Typography.Text.TextCopyBuffer output); + //public abstract void WriteTo(Typography.Text.TextCopyBuffer output, int start, int len); + //public abstract void WriteTo(Typography.Text.TextCopyBuffer output, int start); //-------------------- //model public abstract CharLocation GetCharacterFromPixelOffset(int pixelOffset); @@ -99,32 +91,25 @@ public static void RemoveParentLink(Run run) /// /// public abstract int GetRunWidth(int charOffset); + ///// + ///// get run with from charOffset to + ///// + ///// + ///// + ///// + //public abstract int GetRunWidth(int startAtCharOffset, int count); - /////////////////////////////////////////////////////////////// - //edit funcs - internal abstract void InsertAfter(int index, char c); - internal abstract CopyRun Remove(int startIndex, int length, bool withFreeRun); - - internal static CopyRun InnerRemove(Run tt, int startIndex, int length, bool withFreeRun) - { - return tt.Remove(startIndex, length, withFreeRun); - } - internal static CopyRun InnerRemove(Run tt, int startIndex, bool withFreeRun) - { - return tt.Remove(startIndex, tt.CharacterCount - (startIndex), withFreeRun); - } internal static CharLocation InnerGetCharacterFromPixelOffset(Run tt, int pixelOffset) { return tt.GetCharacterFromPixelOffset(pixelOffset); } public abstract void UpdateRunWidth(); - /////////////////////////////////////////////////////////////// - public abstract CopyRun CreateCopy(); - public abstract CopyRun LeftCopy(int index); - public abstract CopyRun Copy(int startIndex, int length); - public abstract CopyRun Copy(int startIndex); - public abstract void CopyContentToStringBuilder(StringBuilder stBuilder); - //------------------------------ + + //public abstract TextSegment LeftCopy(int index); + //public abstract TextSegment Copy(int startIndex, int length); + //public abstract TextSegment Copy(int startIndex); + + ////------------------------------ //owner, neighbor /// /// next run @@ -146,28 +131,27 @@ internal void SetLinkNode(LinkedListNode linkNode, TextLineBox owner) _ownerTextLine = owner; owner.InvalidateCharCount(); } - - public void TopDownReCalculateContentSize() => this.UpdateRunWidth(); protected internal void InvalidateOwnerLineCharCount() => _ownerTextLine?.InvalidateCharCount(); -#if DEBUG - //public override string dbug_FullElementDescription() - //{ - // string user_elem_id = null; - // if (user_elem_id != null) - // { - // return dbug_FixedElementCode + dbug_GetBoundInfo() + " " - // + " i" + dbug_obj_id + "a " + ((EditableRun)this).GetText() + ",(ID " + user_elem_id + ") " + dbug_GetLayoutInfo(); - // } - // else - // { - // return dbug_FixedElementCode + dbug_GetBoundInfo() + " " - // + " i" + dbug_obj_id + "a " + ((EditableRun)this).GetText() + " " + dbug_GetLayoutInfo(); - // } - //} - //public override string ToString() - //{ - // return "[" + this.dbug_obj_id + "]" + GetText(); - //} -#endif + + } + + public static class RunExtensions + { + [ThreadStatic] + static Typography.Text.TextCopyBufferUtf32 s_copyBuffer; + public static string GetUpperString(this Run textRun) + { + //TODO: review here + if (s_copyBuffer != null) + { + s_copyBuffer = new TextCopyBufferUtf32(); + } + else + { + s_copyBuffer.Clear(); + } + textRun.WriteTo(s_copyBuffer); + return s_copyBuffer.ToString().ToUpper(); + } } } \ No newline at end of file diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.1_Runs/RunStyle.cs b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.1_Runs/RunStyle.cs index 7cdbdfc83..5290afdab 100644 --- a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.1_Runs/RunStyle.cs +++ b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.1_Runs/RunStyle.cs @@ -1,12 +1,8 @@ //Apache2, 2014-present, WinterDev - - using PixelFarm.Drawing; -using Typography.TextBreak; -using Typography.TextLayout; using Typography.Text; -namespace LayoutFarm.TextEditing +namespace LayoutFarm.TextFlow { public class RunStyle { @@ -53,7 +49,7 @@ public ResolvedFont ResolvedFont } } // - internal Size MeasureString(in PixelFarm.Drawing.TextBufferSpan textBufferSpan) + internal Size MeasureString(in Typography.Text.TextBufferSpan textBufferSpan) { return GlobalTextService.TxtClient.MeasureString(textBufferSpan, ReqFont); } @@ -62,33 +58,6 @@ internal float MeasureBlankLineHeight() { return GlobalTextService.TxtClient.MeasureBlankLineHeight(ReqFont); } - - - - public void BreakToLineSegments(in Typography.Text.TextBufferSpan textBufferSpan, WordVisitor wordVisitor) - => GlobalTextService.TxtClient.BreakToLineSegments(textBufferSpan, wordVisitor); - - public void CalculateUserCharGlyphAdvancePos( - in Typography.Text.TextBufferSpan textBufferSpan, - ref TextSpanMeasureResult measureResult) - { - GlobalTextService.TxtClient.CalculateUserCharGlyphAdvancePos( - textBufferSpan, - ReqFont, - ref measureResult); - } - - internal void CalculateUserCharGlyphAdvancePos(in Typography.Text.TextBufferSpan textBufferSpan, - ILineSegmentList lineSegs, - ref TextSpanMeasureResult measureResult) - { - GlobalTextService.TxtClient.CalculateUserCharGlyphAdvancePos( - textBufferSpan, - lineSegs, - ReqFont, - ref measureResult); - } - } } \ No newline at end of file diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.1_Runs/SolidRun.cs b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.1_Runs/SolidRun.cs index 3be035295..cfcecaeeb 100644 --- a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.1_Runs/SolidRun.cs +++ b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.1_Runs/SolidRun.cs @@ -1,100 +1,68 @@ //Apache2, 2014-present, WinterDev using System; -using System.Text; using PixelFarm.Drawing; +using Typography.Text; -namespace LayoutFarm.TextEditing +namespace LayoutFarm.TextFlow { public class SolidRun : Run { //TODO: review here=> who should store/handle this handle? , owner TextBox or this run? Action _externalCustomDraw; - char[] _mybuffer; + TextBufferSpan _mybuffer; - public SolidRun(char[] copyBuffer, RunStyle style) + public SolidRun(TextBufferSpan copyBuffer, RunStyle style) : base(style) { //check line break? - _mybuffer = copyBuffer; UpdateRunWidth(); } - public SolidRun(string str, RunStyle style) - : base(style) - { - - if (str != null && str.Length > 0) - { - _mybuffer = str.ToCharArray(); - if (_mybuffer.Length == 1 && _mybuffer[0] == '\n') - { - //this.IsLineBreak = true; - throw new NotSupportedException(); - } - UpdateRunWidth(); - } - else - { - throw new Exception("string must be null or zero length"); - } - } public void SetCustomExternalDraw(Action externalCustomDraw) => _externalCustomDraw = externalCustomDraw; public RenderElement ExternalRenderElement { get; set; } - public string RawText { get; set; } - - public override CopyRun CreateCopy() => MakeTextRun(0, _mybuffer.Length); + public string RawText { get; set; } //TODO: review here - public override CopyRun Copy(int startIndex) + public override void WriteTo(Typography.Text.TextCopyBuffer output) { - if (startIndex == 0) - { - int length = _mybuffer.Length - startIndex; - if (startIndex > -1 && length > 0) - { - return MakeTextRun(startIndex, length); - } - } - return null; - } - CopyRun MakeTextRun(int sourceIndex, int length) - { - if (length > 0) - { - sourceIndex = 0; - length = _mybuffer.Length; - - char[] newContent = new char[length]; - Array.Copy(_mybuffer, sourceIndex, newContent, 0, length); - return new CopyRun(newContent) { RunKind = RunKind.Solid }; - } - else - { - throw new Exception("string must be null or zero length"); - } + _mybuffer.WriteTo(output); } + //public override void WriteTo(Typography.Text.TextCopyBuffer output, int start) + //{ + // //write data to buffer + // output.Append(_mybuffer); + //} + //public override void WriteTo(Typography.Text.TextCopyBuffer output, int start, int len) + //{ + // throw new NotSupportedException(); + // //if (start == 0) + // //{ + // // int length = _mybuffer.Count - start; + // // if (start > -1 && length > 0) + // // { + // // output.Append(_mybuffer, start, len); + // // } + // //} + //} - public override int GetRunWidth(int charOffset) => CalculateDrawingStringSize(_mybuffer, charOffset).Width; - public override string GetText() => new string(_mybuffer); - - public override void WriteTo(StringBuilder stbuilder) => stbuilder.Append(_mybuffer); + public override int GetRunWidth(int charOffset) => CalculateDrawingStringSize(0, charOffset).Width; + //public override int GetRunWidth(int startAtCharOffset, int count) + //{ + // return MeasureString(_mybuffer.CreateSubspan(startAtCharOffset, count)).Width; + //} public override void UpdateRunWidth() { - Size size = CalculateDrawingStringSize(_mybuffer, _mybuffer.Length); + Size size = CalculateDrawingStringSize(0, _mybuffer.len); SetSize(size.Width, size.Height); } - public override char GetChar(int index) => _mybuffer[index]; - - public override void CopyContentToStringBuilder(StringBuilder stBuilder) => stBuilder.Append(RawText); + public override int GetChar(int index) => _mybuffer.GetChar(index); - public override int CharacterCount => (_mybuffer.Length == 0) ? 0 : 1; + public override int CharacterCount => _mybuffer.len; - Size CalculateDrawingStringSize(char[] buffer, int length) => MeasureString(new TextBufferSpan(buffer, 0, length)); - - public override CopyRun Copy(int startIndex, int length) => (startIndex > -1 && length > 0) ? MakeTextRun(startIndex, length) : null; + Size CalculateDrawingStringSize(int start, int length) => MeasureString(_mybuffer.CreateSubspan(start, length)); const int SAME_FONT_SAME_TEXT_COLOR = 0; const int SAME_FONT_DIFF_TEXT_COLOR = 1; @@ -158,46 +126,48 @@ public override void Draw(DrawBoard d, UpdateArea updateArea) //{ //TODO: review here, we don't need to do this + + //TODO: /... RunStyle style = this.RunStyle; switch (EvaluateFontAndTextColor(d, style)) { case DIFF_FONT_SAME_TEXT_COLOR: { - var prevFont = d.CurrentFont; - d.CurrentFont = style.ReqFont; - d.DrawText(_mybuffer, - new Rectangle(0, 0, bWidth, bHeight), - style.ContentHAlign); - d.CurrentFont = prevFont; + //var prevFont = d.CurrentFont; + //d.CurrentFont = style.ReqFont; + //d.DrawText(_mybuffer, + // new Rectangle(0, 0, bWidth, bHeight), + // style.ContentHAlign); + //d.CurrentFont = prevFont; } break; case DIFF_FONT_DIFF_TEXT_COLOR: { - var prevFont = d.CurrentFont; - var prevColor = d.CurrentTextColor; - d.CurrentFont = style.ReqFont; - d.CurrentTextColor = style.FontColor; - d.DrawText(_mybuffer, - new Rectangle(0, 0, bWidth, bHeight), - style.ContentHAlign); - d.CurrentFont = prevFont; - d.CurrentTextColor = prevColor; + //var prevFont = d.CurrentFont; + //var prevColor = d.CurrentTextColor; + //d.CurrentFont = style.ReqFont; + //d.CurrentTextColor = style.FontColor; + //d.DrawText(_mybuffer, + // new Rectangle(0, 0, bWidth, bHeight), + // style.ContentHAlign); + //d.CurrentFont = prevFont; + //d.CurrentTextColor = prevColor; } break; case SAME_FONT_DIFF_TEXT_COLOR: { - var prevColor = d.CurrentTextColor; - d.DrawText(_mybuffer, - new Rectangle(0, 0, bWidth, bHeight), - style.ContentHAlign); - d.CurrentTextColor = prevColor; + //var prevColor = d.CurrentTextColor; + //d.DrawText(_mybuffer, + // new Rectangle(0, 0, bWidth, bHeight), + // style.ContentHAlign); + //d.CurrentTextColor = prevColor; } break; default: { - d.DrawText(_mybuffer, - new Rectangle(0, 0, bWidth, bHeight), - style.ContentHAlign); + //d.DrawText(_mybuffer, + // new Rectangle(0, 0, bWidth, bHeight), + // style.ContentHAlign); } break; } @@ -217,89 +187,152 @@ public override CharLocation GetCharacterFromPixelOffset(int pixelOffset) return new CharLocation(0, 1); } } + + //public override TextSegment Copy(int startIndex) + //{ + // if (startIndex == 0) + // { + + // int length = _mybuffer.Count - startIndex; + // if (startIndex > -1 && length > 0) + // { + // return _mybuffer.MakeSubSpan(startIndex, length); + // } + // } + // return new TextSegment();//empty + //} + //public override TextSegment Copy(int startIndex, int length) + //{ + // return _mybuffer.MakeSubSpan(startIndex, length); + //} + //public override TextSegment LeftCopy(int index) + //{ + // if (index == 0) + // { + // return new TextSegment();//empty + // } + + // if (index > -1) + // { + // return _mybuffer.MakeLeftSubSpan(index); + // } + // else + // { + // return new TextSegment();//empty + // } + //} + //public override CopyRun Copy(int startIndex) + //{ + // if (startIndex == 0) + // { + // int length = _mybuffer.Length - startIndex; + // if (startIndex > -1 && length > 0) + // { + // return MakeTextRun(startIndex, length); + // } + // } + // return null; + //} + //CopyRun MakeTextRun(int sourceIndex, int length) + //{ + // if (length > 0) + // { + // sourceIndex = 0; + // length = _mybuffer.Length; + + // char[] newContent = new char[length]; + // Array.Copy(_mybuffer, sourceIndex, newContent, 0, length); + // return new CopyRun(newContent) { RunKind = RunKind.Solid }; + // } + // else + // { + // throw new Exception("string must be null or zero length"); + // } + //} + //------------------------------------------- // internal override bool IsInsertable => false; // - public override CopyRun LeftCopy(int index) - { - if (index == 0) - { - return null; - } + // public override CopyRun LeftCopy(int index) + // { + // if (index == 0) + // { + // return null; + // } - if (index > -1) - { - return MakeTextRun(0, _mybuffer.Length); - } - else - { - return null; - } - } - internal override void InsertAfter(int index, char c) - { - //TODO: review here - //solid text run should not be editable - int oldLexLength = _mybuffer.Length; - char[] newBuff = new char[oldLexLength + 1]; - if (index > -1 && index < _mybuffer.Length - 1) - { - Array.Copy(_mybuffer, newBuff, index + 1); - newBuff[index + 1] = c; - Array.Copy(_mybuffer, index + 1, newBuff, index + 2, oldLexLength - index - 1); - } - else if (index == -1) - { - newBuff[0] = c; - Array.Copy(_mybuffer, 0, newBuff, 1, _mybuffer.Length); - } - else if (index == oldLexLength - 1) - { - Array.Copy(_mybuffer, newBuff, oldLexLength); - newBuff[oldLexLength] = c; - } - else - { - throw new NotSupportedException(); - } - _mybuffer = newBuff; - InvalidateOwnerLineCharCount(); - UpdateRunWidth(); - } + // if (index > -1) + // { + // return MakeTextRun(0, _mybuffer.Length); + // } + // else + // { + // return null; + // } + // } + //// internal override void InsertAfter(int index, char c) + // { + // //TODO: review here + // //solid text run should not be editable + // int oldLexLength = _mybuffer.Length; + // char[] newBuff = new char[oldLexLength + 1]; + // if (index > -1 && index < _mybuffer.Length - 1) + // { + // Array.Copy(_mybuffer, newBuff, index + 1); + // newBuff[index + 1] = c; + // Array.Copy(_mybuffer, index + 1, newBuff, index + 2, oldLexLength - index - 1); + // } + // else if (index == -1) + // { + // newBuff[0] = c; + // Array.Copy(_mybuffer, 0, newBuff, 1, _mybuffer.Length); + // } + // else if (index == oldLexLength - 1) + // { + // Array.Copy(_mybuffer, newBuff, oldLexLength); + // newBuff[oldLexLength] = c; + // } + // else + // { + // throw new NotSupportedException(); + // } + // _mybuffer = newBuff; + // InvalidateOwnerLineCharCount(); + // UpdateRunWidth(); + // } - internal override CopyRun Remove(int startIndex, int length, bool withFreeRun) - { - if (startIndex == _mybuffer.Length) - { - //at the end - return null; - } + // internal override CopyRun Remove(int startIndex, int length, bool withFreeRun) + // { + // if (startIndex == _mybuffer.Length) + // { + // //at the end + // return null; + // } - // - startIndex = 0; //*** - length = _mybuffer.Length; - CopyRun freeRun = null; - if (startIndex > -1 && length > 0) - { - int oldLexLength = _mybuffer.Length; - char[] newBuff = new char[oldLexLength - length]; - if (withFreeRun) - { - freeRun = MakeTextRun(startIndex, length); - } - if (startIndex > 0) - { - Array.Copy(_mybuffer, 0, newBuff, 0, startIndex); - } + // // + // startIndex = 0; //*** + // length = _mybuffer.Length; + // CopyRun freeRun = null; + // if (startIndex > -1 && length > 0) + // { + // int oldLexLength = _mybuffer.Length; + // char[] newBuff = new char[oldLexLength - length]; + // if (withFreeRun) + // { + // freeRun = MakeTextRun(startIndex, length); + // } + // if (startIndex > 0) + // { + // Array.Copy(_mybuffer, 0, newBuff, 0, startIndex); + // } - Array.Copy(_mybuffer, startIndex + length, newBuff, startIndex, oldLexLength - startIndex - length); - _mybuffer = newBuff; - InvalidateOwnerLineCharCount(); - UpdateRunWidth(); - } + // Array.Copy(_mybuffer, startIndex + length, newBuff, startIndex, oldLexLength - startIndex - length); + // _mybuffer = newBuff; + // InvalidateOwnerLineCharCount(); + // UpdateRunWidth(); + // } - return withFreeRun ? freeRun : null; - } + // return withFreeRun ? freeRun : null; + // } } } diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.1_Runs/TextRun.cs b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.1_Runs/TextRun.cs index 736569337..613716485 100644 --- a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.1_Runs/TextRun.cs +++ b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.1_Runs/TextRun.cs @@ -1,52 +1,32 @@ //Apache2, 2014-present, WinterDev using System; -using System.Text; +using PixelFarm.Drawing; + using Typography.Text; using Typography.TextLayout; -using Typography.TextBreak; - -using PixelFarm.Drawing; -namespace LayoutFarm.TextEditing +namespace LayoutFarm.TextFlow { - public class TextRun : Run, IDisposable { - //text run is a collection of words that has the same presentation format (font, style, color, etc). - //a run may contain multiple words -#if DEBUG - char[] _dbugmybuffer; - char[] _mybuffer => _dbugmybuffer; -#else - char[] _mybuffer; -#endif + internal TextBufferSpan _mybuffer; + int[] _charAdvances = null; + RenderVxFormattedString _renderVxFormattedString; //re-creatable from original content - int[] _outputUserCharAdvances = null;//TODO: review here-> change this to caret stop position - bool _content_unparsed; - TextPrinterLineSegmentList _lineSegs; - RenderVxFormattedString _renderVxFormattedString; + bool _content_Parsed;// - - [ThreadStatic] - static TextPrinterWordVisitor s_wordVistor; - - - public TextRun(RunStyle runstyle, char[] copyBuffer) + internal TextRun(RunStyle runstyle, TextBufferSpan copyBuffer) : base(runstyle) { -#if DEBUG - if (copyBuffer.Length == 0) - { - - } -#endif //we need font info (in style) for evaluating the size fo this span //without font info we can't measure the size of this span - SetNewContent(copyBuffer); + + _mybuffer = copyBuffer; UpdateRunWidth(); } + public bool DelayFormattedString { get; set; } public void Dispose() { @@ -55,70 +35,62 @@ public void Dispose() _renderVxFormattedString.Dispose(); _renderVxFormattedString = null; } + _content_Parsed = false; } - //each editable run has it own (dynamic) char buffer - void SetNewContent(char[] newbuffer) + internal void SetNewContent(TextBufferSpan newsegment) { -#if DEBUG - _dbugmybuffer = newbuffer; -#else - _mybuffer = newbuffer; -#endif - - _content_unparsed = true; - - _renderVxFormattedString?.Dispose(); //clear old _renderVxFormattedString + _mybuffer = newsegment; + _content_Parsed = false; + _renderVxFormattedString?.Dispose(); _renderVxFormattedString = null; } - public override CopyRun CreateCopy() + public override void WriteTo(TextCopyBuffer output) { - char[] copyBuffer = new char[_mybuffer.Length]; - Array.Copy(_mybuffer, copyBuffer, copyBuffer.Length); - return new CopyRun(copyBuffer); + _mybuffer.WriteTo(output); } - public override void WriteTo(StringBuilder stbuilder) => stbuilder.Append(_mybuffer); - public override CopyRun Copy(int startIndex) + public override int GetRunWidth(int charOffset) { - int length = _mybuffer.Length - startIndex; - if (startIndex > -1 && length > 0) - { - return MakeCopy(startIndex, length); - } - else + if (!_content_Parsed) { - return null; + UpdateRunWidth(); } - } - CopyRun MakeCopy(int sourceIndex, int length) - { - if (length > 0) + + //the content is parsed *** + if (_mybuffer.Count == charOffset) { - //CopyRun newTextRun = null; - char[] newContent = new char[length]; - Array.Copy(_mybuffer, sourceIndex, newContent, 0, length); - return new CopyRun(newContent); + return this.Width; } else { - throw new Exception("string must be null or zero length"); + //ca + int total = 0; + if (_charAdvances != null) + { + for (int i = 0; i < charOffset; ++i) + { + total += _charAdvances[i]; + } + } + return total; } } - public override int GetRunWidth(int charOffset) => CalculateDrawingStringSize(charOffset).Width; - - public override string GetText() => new string(_mybuffer); - public override void UpdateRunWidth() { - //*** - var textBufferSpan = new Typography.Text.TextBufferSpan(_mybuffer); - + //1 check if we need to recalculate all? //TODO: review here, //1. if mybuffer lenght is not changed,we don't need to alloc new array? - _outputUserCharAdvances = new int[_mybuffer.Length]; + if (_content_Parsed) { return; } + + if (_charAdvances == null || _charAdvances.Length != _mybuffer.Count) + { + //sometime we change only font style + //so the buffer char_count is not changed + _charAdvances = new int[_mybuffer.Count]; + } if (_renderVxFormattedString != null) { @@ -126,29 +98,16 @@ public override void UpdateRunWidth() _renderVxFormattedString = null; } - var measureResult = new TextSpanMeasureResult(); - measureResult.outputXAdvances = _outputUserCharAdvances; - - if (_content_unparsed) - { - //parse the content first - if (_lineSegs == null) { _lineSegs = new TextPrinterLineSegmentList(); } - _lineSegs.Clear(); - // - if (s_wordVistor == null) - { - s_wordVistor = new TextPrinterWordVisitor(); - } + var measureResult = new TextSpanMeasureResult(); + measureResult.outputXAdvances = _charAdvances; - s_wordVistor.SetLineSegmentList(_lineSegs); - RunStyle.BreakToLineSegments(textBufferSpan, s_wordVistor); - s_wordVistor.SetLineSegmentList(null); + GlobalTextService.TxtClient.CalculateUserCharGlyphAdvancePos( + _mybuffer, + RunStyle.ReqFont, + ref measureResult); - //BreakToLineSegs(textBufferSpan); - } - _content_unparsed = false; - RunStyle.CalculateUserCharGlyphAdvancePos(textBufferSpan, _lineSegs, ref measureResult); + _content_Parsed = true; SetSize(measureResult.outputTotalW, measureResult.lineHeight); @@ -163,54 +122,25 @@ protected void AdjustClientBounds(ref Rectangle bounds) bounds.Offset(0, this.OwnerLine.Top); } } - public override char GetChar(int index) => _mybuffer[index]; + public override int GetChar(int index) => _mybuffer.GetChar(index); - public override void CopyContentToStringBuilder(StringBuilder stBuilder) => stBuilder.Append(_mybuffer); + public override int CharacterCount => _mybuffer.Count; - public override int CharacterCount => _mybuffer.Length; + //public override void SetStyle(RunStyle runstyle) + //{ + // //TODO: review this again + // //update style may affect the 'visual' layout of the span + // //the span may expand large or shrink down + // //so we invalidate graphics area pre and post - public override void SetStyle(RunStyle runstyle) - { - //TODO: review this again - //update style may affect the 'visual' layout of the span - //the span may expand large or shrink down - //so we invalidate graphics area pre and post - - //TODO: review here*** - this.InvalidateGraphics(); - base.SetStyle(runstyle); - this.InvalidateGraphics(); - UpdateRunWidth(); - } - Size CalculateDrawingStringSize(int length) - { - if (!_content_unparsed) - { - //the content is parsed *** + // //TODO: review here*** + // this.InvalidateGraphics(); + // base.SetStyle(runstyle); + // this.InvalidateGraphics(); + // UpdateRunWidth(); + //} - if (_mybuffer.Length == length) - { - return this.Size; - } - else - { - //ca - int total = 0; - if (_outputUserCharAdvances != null) - { - for (int i = 0; i < length; ++i) - { - total += _outputUserCharAdvances[i]; - } - } - return new Size(total, MeasureLineHeightInt32()); - } - } - return MeasureString(new PixelFarm.Drawing.TextBufferSpan(_mybuffer, 0, length)); - } - - public override CopyRun Copy(int startIndex, int length) => (startIndex > -1 && length > 0) ? MakeCopy(startIndex, length) : null; const int SAME_FONT_SAME_TEXT_COLOR = 0; const int SAME_FONT_DIFF_TEXT_COLOR = 1; @@ -251,14 +181,13 @@ static int EvaluateFontAndTextColor(DrawBoard d, RunStyle runstyle) void DrawText(DrawBoard d) { - - //d.DrawText(_mybuffer, - // new Rectangle(0, 0, bWidth, bHeight), - // style.ContentHAlign); - if (_renderVxFormattedString == null) { - _renderVxFormattedString = d.CreateFormattedString(_mybuffer, 0, _mybuffer.Length, DelayFormattedString); + _renderVxFormattedString = d.CreateFormattedString( + _mybuffer.GetRawUtf32Buffer(),//TODO: review here again + _mybuffer.start, + _mybuffer.Count, + DelayFormattedString); } switch (_renderVxFormattedString.State) @@ -344,18 +273,30 @@ public override CharLocation GetCharacterFromPixelOffset(int pixelOffset) { if (pixelOffset < Width) { - int j = _outputUserCharAdvances.Length; + int j = _charAdvances.Length; int accWidth = 0; //accummulate width for (int i = 0; i < j; i++) { - int charW = _outputUserCharAdvances[i]; + int charW = _charAdvances[i]; + if (charW == 0) + { + continue; + } if (accWidth + charW > pixelOffset) { //stop //then decide that if width > char/w => please consider stop at next char + if (pixelOffset - accWidth > (charW / 2)) { //this run is no select + //but we must check if + if ((i < j - 1) && (_charAdvances[i + 1] == 0)) + { + //temp fix for surrogate pair + return new CharLocation(accWidth + charW, i + 2); + } + return new CharLocation(accWidth + charW, i + 1); } else @@ -379,71 +320,7 @@ public override CharLocation GetCharacterFromPixelOffset(int pixelOffset) return new CharLocation(0, 1); } } - //------------------------------------------- - // - internal override bool IsInsertable => true; - // - public override CopyRun LeftCopy(int index) => (index > 0) ? MakeCopy(0, index) : null; - - internal override void InsertAfter(int index, char c) - { - int oldLexLength = _mybuffer.Length; - char[] newBuff = new char[oldLexLength + 1]; - if (index > -1 && index < _mybuffer.Length - 1) - { - Array.Copy(_mybuffer, newBuff, index + 1); - newBuff[index + 1] = c; - Array.Copy(_mybuffer, index + 1, newBuff, index + 2, oldLexLength - index - 1); - } - else if (index == -1) - { - newBuff[0] = c; - Array.Copy(_mybuffer, 0, newBuff, 1, _mybuffer.Length); - } - else if (index == oldLexLength - 1) - { - Array.Copy(_mybuffer, newBuff, oldLexLength); - newBuff[oldLexLength] = c; - } - else - { - throw new NotSupportedException(); - } - - SetNewContent(newBuff); - InvalidateOwnerLineCharCount(); - UpdateRunWidth(); - } - internal override CopyRun Remove(int startIndex, int length, bool withFreeRun) - { - CopyRun freeRun = null; - if (startIndex > -1 && length > 0) - { - int oldLexLength = _mybuffer.Length; - char[] newBuff = new char[oldLexLength - length]; - if (withFreeRun) - { - freeRun = MakeCopy(startIndex, length); - } - if (startIndex > 0) - { - Array.Copy(_mybuffer, 0, newBuff, 0, startIndex); - } - - Array.Copy(_mybuffer, startIndex + length, newBuff, startIndex, oldLexLength - startIndex - length); - SetNewContent(newBuff); - InvalidateOwnerLineCharCount(); - UpdateRunWidth(); - } - return withFreeRun ? freeRun : null; - } - -#if DEBUG - public override string ToString() - { - return new string(_mybuffer); - } -#endif + internal override bool IsInsertable => true; } } diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.1_Runs/TextSpanStyle.cs b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.1_Runs/TextSpanStyle.cs index 00696ade0..9125a45de 100644 --- a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.1_Runs/TextSpanStyle.cs +++ b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.1_Runs/TextSpanStyle.cs @@ -1,6 +1,6 @@ //Apache2, 2014-present, WinterDev using PixelFarm.Drawing; -namespace LayoutFarm.TextEditing +namespace LayoutFarm.TextFlow { public struct TextSpanStyle diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.1_Runs/VisualPointInfo.cs b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.1_Runs/VisualPointInfo.cs index 576d1b098..7916c30c3 100644 --- a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.1_Runs/VisualPointInfo.cs +++ b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.1_Runs/VisualPointInfo.cs @@ -1,12 +1,12 @@ //Apache2, 2014-present, WinterDev -namespace LayoutFarm.TextEditing +namespace LayoutFarm.TextFlow { public abstract class VisualPointInfo { readonly int _lineCharIndex; - int _onTextRunCharOffset; int _caretXPos; + int _onTextRunCharOffset; int _onTextRunPixelOffset; public VisualPointInfo(int lineCharIndex) { @@ -20,11 +20,7 @@ public void SetAdditionVisualInfo(int onTextRunCharOffset, int caretXPos, int te } public int LineCharIndex => _lineCharIndex; - public int TextRunCharOffset => _onTextRunCharOffset; - internal abstract Run Run { get; } - - //public bool IsOnTheBeginOfLine => RunLocalSelectedIndex == -1; public bool IsOnTheBeginOfLine => _lineCharIndex == 0; public abstract int LineId { get; } public abstract int LineTop { get; } @@ -32,49 +28,26 @@ public void SetAdditionVisualInfo(int onTextRunCharOffset, int caretXPos, int te public abstract int LineNumber { get; } public abstract int CurrentWidth { get; } - public int RunLocalSelectedIndex => _lineCharIndex - _onTextRunCharOffset; + //public int TextRunCharOffset => _onTextRunCharOffset; + //public int RunLocalSelectedIndex => _lineCharIndex - _onTextRunCharOffset; public int X => _caretXPos; - public int TextRunPixelOffset => _onTextRunPixelOffset; - - //#if DEBUG - // public override string ToString() - // { - // if (_copyRun == null) - // { - // return "null " + " ,local[" + RunLocalSelectedIndex + "]"; - // } - // else - // { - // return _copyRun.ToString() + " ,local[" + RunLocalSelectedIndex + "]"; - // } - // } - //#endif - + //public int TextRunPixelOffset => _onTextRunPixelOffset; } public class EditableVisualPointInfo : VisualPointInfo { - TextLineBox _line; - Run _hitRun; - internal EditableVisualPointInfo(TextLineBox line, int index, Run hitRun) - : base(index) + readonly TextLineBox _line; + internal EditableVisualPointInfo(TextLineBox line, int lineCharIndex) + : base(lineCharIndex) { - if (index < 0) - { - } _line = line; - _hitRun = hitRun; } - internal override Run Run => _hitRun; internal TextLineBox Line => _line; - - internal TextLineBox EditableLine => _line; - public override int LineTop => _line.Top; public override int CurrentWidth => _line.LineWidth; diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.1_Runs/VisualSelectionRanges.cs b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.1_Runs/VisualSelectionRanges.cs index f303595ea..0f2f643fe 100644 --- a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.1_Runs/VisualSelectionRanges.cs +++ b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.1_Runs/VisualSelectionRanges.cs @@ -4,30 +4,10 @@ using System.Collections.Generic; using System.Text; using PixelFarm.Drawing; -namespace LayoutFarm.TextEditing +namespace LayoutFarm.TextFlow { - public readonly struct VisualSelectionRangeSnapShot - { - public readonly int startLineNum; - public readonly int startColumnNum; - public readonly int endLineNum; - public readonly int endColumnNum; - public VisualSelectionRangeSnapShot(int startLineNum, int startColumnNum, int endLineNum, int endColumnNum) - { - this.startLineNum = startLineNum; - this.startColumnNum = startColumnNum; - this.endLineNum = endLineNum; - this.endColumnNum = endColumnNum; - } - public bool IsEmpty() - { - return startLineNum == 0 && startColumnNum == 0 - && endLineNum == 0 && endColumnNum == 0; - } - public static readonly VisualSelectionRangeSnapShot Empty = new VisualSelectionRangeSnapShot(); - } - public class VisualSelectionRange + public sealed class VisualSelectionRange { EditableVisualPointInfo _startPoint = null; EditableVisualPointInfo _endPoint = null; @@ -66,6 +46,7 @@ internal EditableVisualPointInfo EndPoint } else { + //??? _endPoint = null; } } @@ -76,7 +57,7 @@ internal EditableVisualPointInfo EndPoint // public bool IsOnTheSameLine => _startPoint.LineId == _endPoint.LineId; // - public void SwapIfUnOrder() + public void Normalize() { if (IsOnTheSameLine) { @@ -104,11 +85,7 @@ public bool IsValid { if (_startPoint != null && _endPoint != null) { - if ((_startPoint.Run != null && !_startPoint.Run.HasParent) || - (_endPoint.Run != null && !_endPoint.Run.HasParent)) - { - throw new NotSupportedException("text range err"); - } + if ((_startPoint.LineCharIndex == _endPoint.LineCharIndex) && (_startPoint.LineId == _endPoint.LineId)) { @@ -183,7 +160,7 @@ internal ClipRectKind GetLineClip(int lineNo, out int clipLeft, out int clipWidt if (IsOnTheSameLine) { if (lineNo == _startPoint.LineId) - { + { clipLeft = TopEnd.X; clipWidth = BottomEnd.X - clipLeft; @@ -193,7 +170,7 @@ internal ClipRectKind GetLineClip(int lineNo, out int clipLeft, out int clipWidt { clipLeft = clipWidth = 0; return ClipRectKind.No; - } + } } else { @@ -245,7 +222,7 @@ public void Draw(DrawBoard destPage, UpdateArea updateArea) int bottomLineId = BottomEnd.LineId; if (bottomLineId - topLineId > 1) { - TextLineBox adjacentStartLine = topEndPoint.EditableLine.Next; + TextLineBox adjacentStartLine = topEndPoint.Line.Next; while (adjacentStartLine != BottomEnd.Line) { destPage.FillRectangle(BackgroundColor, 0, @@ -254,7 +231,10 @@ public void Draw(DrawBoard destPage, UpdateArea updateArea) adjacentStartLine.ActualLineHeight); adjacentStartLine = adjacentStartLine.Next; } + +#if DEBUG TextLineBox adjacentStopLine = BottomEnd.Line.Prev; +#endif } VisualPointInfo bottomEndPoint = BottomEnd; lineYPos = bottomEndPoint.LineTop; @@ -264,42 +244,15 @@ public void Draw(DrawBoard destPage, UpdateArea updateArea) } public void UpdateSelectionRange() { - if (_startPoint.Run != null && !_startPoint.Run.HasParent) - { - TextLineBox startLine = _startPoint.EditableLine; - _startPoint = startLine.GetTextPointInfoFromCharIndex(_startPoint.LineCharIndex); - } - if (_endPoint.Run != null && !_endPoint.Run.HasParent) - { - TextLineBox stopLine = _endPoint.EditableLine; - _endPoint = stopLine.GetTextPointInfoFromCharIndex(_endPoint.LineCharIndex); - } - } - - public IEnumerable GetPrintableTextRunIter() - { - Run startRun = null; - if (_startPoint.Run == null) - { - TextLineBox line = _startPoint.EditableLine; - startRun = line.FirstRun; - } - else - { - startRun = _startPoint.Run.NextRun; - } + if (!IsValid) { return; } - TextFlowLayer layer = _layer; - foreach (Run t in layer.GetDrawingIter(startRun, _endPoint.Run)) - { - yield return t; - - } + _startPoint = _startPoint.Line.GetTextPointInfoFromCharIndex(_startPoint.LineCharIndex); + _endPoint = _endPoint.Line.GetTextPointInfoFromCharIndex(_endPoint.LineCharIndex); } - public VisualSelectionRangeSnapShot GetSelectionRangeSnapshot() + public SelectionRangeSnapShot GetSelectionRangeSnapshot() { - return new VisualSelectionRangeSnapShot( + return new SelectionRangeSnapShot( _startPoint.LineNumber, _startPoint.LineCharIndex, _endPoint.LineNumber, @@ -345,12 +298,12 @@ public MarkerLocation(int lineNum, float x_offset, TextLineBox line) } TextFlowLayer _textLayer; - VisualSelectionRangeSnapShot _selectionRangeSnapshot; + SelectionRangeSnapShot _selectionRangeSnapshot; MarkerLocation _startLocation; MarkerLocation _stopLocation; - public VisualMarkerSelectionRange(VisualSelectionRangeSnapShot selectionRangeSnapshot) + public VisualMarkerSelectionRange(SelectionRangeSnapShot selectionRangeSnapshot) { _selectionRangeSnapshot = selectionRangeSnapshot; BackgroundColor = Color.FromArgb(80, Color.Yellow);//test, default @@ -395,7 +348,7 @@ public void Draw(DrawBoard destPage, UpdateArea updateArea) if (IsOnTheSameLine) { TextLineBox line = _startLocation.line; - if (line.OwnerFlowLayer == null) + if (!line.HasOwnerFlowLayer) { //this marker should be remove or not return; @@ -409,7 +362,7 @@ public void Draw(DrawBoard destPage, UpdateArea updateArea) TextLineBox startLine = _startLocation.line; TextLineBox endLine = _stopLocation.line; - if (startLine.OwnerFlowLayer == null || endLine.OwnerFlowLayer == null) + if (!startLine.HasOwnerFlowLayer || !endLine.HasOwnerFlowLayer) { //this marker should be remove or not return; diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/0_TextLine.cs b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/0_TextLine.cs index fbadcc154..21999b61a 100644 --- a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/0_TextLine.cs +++ b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/0_TextLine.cs @@ -3,11 +3,12 @@ using System; using System.Diagnostics; using System.Collections.Generic; -using System.Text; + using PixelFarm.Drawing; using LayoutFarm.RenderBoxes; -namespace LayoutFarm.TextEditing +using Typography.Text; +namespace LayoutFarm.TextFlow { #if DEBUG @@ -15,15 +16,17 @@ namespace LayoutFarm.TextEditing #endif sealed partial class TextLineBox { - //this class dose not have Painting function + + //this class does not have Painting function //we paint each run at text-layer object - //current line runs readonly LinkedList _runs = new LinkedList(); + /// /// owner layer /// TextFlowLayer _textFlowLayer; - int _currentLineNumber; + + int _currentLineNumber; //relative to its ownerFlowLayer int _actualLineHeight; int _actualLineWidth; int _lineTop; @@ -32,7 +35,7 @@ sealed partial class TextLineBox bool _validCharCount = false; int _cacheCharCount; - // + //_lineFlags const int LINE_CONTENT_ARRANGED = 1 << (1 - 1); const int LOCAL_SUSPEND_LINE_REARRANGE = 1 << (3 - 1); const int END_WITH_LINE_BREAK = 1 << (4 - 1); @@ -41,21 +44,28 @@ sealed partial class TextLineBox static int dbugLineTotalCount = 0; internal int dbugLineId; #endif + + internal TextLineBox(TextFlowLayer textFlowLayer) { _textFlowLayer = textFlowLayer; + _actualLineHeight = textFlowLayer.DefaultLineHeight; //we start with default line height + // #if DEBUG this.dbugLineId = dbugLineTotalCount; dbugLineTotalCount++; - #endif OverlappedTop = 3; //test only OverlappedBottom = 3; //test only } - + TextFlowLayer OwnerFlowLayer => _textFlowLayer; + /// + /// primary text baseline + /// + public ushort Baseline { get; set; } internal void ClientRunInvalidateGraphics(Run clientRun) { //bubble-up invalidated area from client @@ -68,20 +78,35 @@ internal void ClientRunInvalidateGraphics(Run clientRun) internal byte OverlappedTop { get; set; } internal byte OverlappedBottom { get; set; } - internal void RemoveOwnerFlowLayer() => _textFlowLayer = null; + /// + /// detach from owner line + /// + internal void RemoveOwnerFlowLayer() + { + _textFlowLayer = null; + } + internal bool HasOwnerFlowLayer => _textFlowLayer != null; + /// + /// number of run in this line + /// public int RunCount => _runs.Count; /// /// first run node /// public LinkedListNode First => _runs.First; - // + + /// + /// first run + /// + public Run FirstRun => _runs.First?.Value; + /// /// last run node /// public LinkedListNode Last => _runs.Last; - // + internal Run LastRun => _runs.Last?.Value; public float GetXOffsetAtCharIndex(int charIndex) @@ -101,16 +126,7 @@ public float GetXOffsetAtCharIndex(int charIndex) acc_charCount += r.CharacterCount; r = r.NextRun; } - //foreach (Run r in _runs) - //{ - // if (r.CharacterCount + acc_charCount >= charIndex) - // { - // //found at this run - // return xoffset + r.GetRunWidth(charIndex - acc_charCount); - // } - // xoffset += r.Width; - // acc_charCount += r.CharacterCount; - //} + return 0;//? } public void TextLineReCalculateActualLineSize() @@ -138,14 +154,9 @@ public void TextLineReCalculateActualLineSize() } internal bool HitTestCore(HitChain hitChain) { - hitChain.GetTestPoint(out int testX, out int testY); - if (this.RunCount == 0) - { - return false; - } - else + LinkedListNode cnode = this.First; + if (cnode != null) { - LinkedListNode cnode = this.First; int curLineTop = _lineTop; hitChain.OffsetTestPoint(0, -curLineTop); while (cnode != null) @@ -158,12 +169,12 @@ internal bool HitTestCore(HitChain hitChain) cnode = cnode.Next; } hitChain.OffsetTestPoint(0, curLineTop); - return false; } + return false; } - public TextFlowLayer OwnerFlowLayer => _textFlowLayer; - // + +#if DEBUG public bool EndWithLineBreak { get => (_lineFlags & END_WITH_LINE_BREAK) != 0; @@ -180,7 +191,7 @@ public bool EndWithLineBreak } } } - +#endif public bool IntersectsWith(int y) => y >= _lineTop && y < (_lineTop + _actualLineHeight); // public int Top => _lineTop; @@ -191,7 +202,18 @@ public bool EndWithLineBreak public int ActualLineHeight => _actualLineHeight; // public Rectangle ActualLineArea => new Rectangle(0, _lineTop - OverlappedTop, _actualLineWidth, _actualLineHeight + OverlappedTop + OverlappedBottom); - + public int LineBottom => _lineTop + _actualLineHeight; + // + internal int LineWidth + { + get + { + Run lastRun = this.LastRun; + return (lastRun != null) ? lastRun.Right : 0; + } + } + public void SetTop(int linetop) => _lineTop = linetop; + // internal IEnumerable GetRunIterForward(Run startVisualElement) { if (startVisualElement != null) @@ -222,8 +244,6 @@ internal IEnumerable GetRunIterForward(Run startVisualElement, Run stopVisu } } - internal void InvalidateCharCount() => _validCharCount = false; - public int CharCount() { //TODO: reimplement this again @@ -233,74 +253,55 @@ public int CharCount() } int charCount = 0; - foreach (Run r in _runs) + + var linkNode = _runs.First; + while (linkNode != null) { - charCount += r.CharacterCount; + charCount += linkNode.Value.CharacterCount; + linkNode = linkNode.Next; } + _validCharCount = true; return _cacheCharCount = charCount; } public IEnumerable GetRunIter() { - foreach (Run r in _runs) + var linkNode = _runs.First; + while (linkNode != null) { - yield return r; + yield return linkNode.Value; + linkNode = linkNode.Next; } } - - // - public int LineBottom => _lineTop + _actualLineHeight; - // - internal int LineWidth - { - get - { - Run lastRun = this.LastRun; - return (lastRun != null) ? lastRun.Right : 0; - } - } - public void SetTop(int linetop) => _lineTop = linetop; // + public int LineNumber => _currentLineNumber; - // internal void SetLineNumber(int value) => _currentLineNumber = value; - // - bool IsFirstLine => _currentLineNumber == 0; - // - bool IsLastLine => _currentLineNumber == _textFlowLayer.LineCount - 1; - // - bool IsSingleLine => IsFirstLine && IsLastLine; + + // public bool IsBlankLine => RunCount == 0; // public TextLineBox Next => (_currentLineNumber < _textFlowLayer.LineCount - 1) ? _textFlowLayer.GetTextLine(_currentLineNumber + 1) : null; - public TextLineBox Prev => (_currentLineNumber > 0) ? _textFlowLayer.GetTextLine(_currentLineNumber - 1) : null; - - public Run FirstRun => _runs.First?.Value; - - public bool NeedArrange => (_lineFlags & LINE_CONTENT_ARRANGED) == 0; - - internal void ValidateContentArrangement() => _lineFlags |= LINE_CONTENT_ARRANGED; - - public static void InnerCopyLineContent(TextLineBox line, StringBuilder stBuilder) - { - line.CopyLineContent(stBuilder); - } - public void CopyLineContent(StringBuilder stBuilder) + public void CopyLineContent(TextCopyBuffer output) { LinkedListNode curNode = this.First; while (curNode != null) { Run v = curNode.Value; - v.CopyContentToStringBuilder(stBuilder); + v.WriteTo(output); curNode = curNode.Next; } //not include line-end char? } + #if DEBUG + public bool dbugNeedArrange => (_lineFlags & LINE_CONTENT_ARRANGED) == 0; + internal void dbugValidateContentArrangement() => _lineFlags |= LINE_CONTENT_ARRANGED; + public override string ToString() { return this.dbugShortLineInfo; @@ -317,11 +318,6 @@ public string dbugShortLineInfo internal bool dbugHasOwner => _textFlowLayer != null; #endif - //internal bool IsLocalSuspendLineRearrange => (_lineFlags & LOCAL_SUSPEND_LINE_REARRANGE) != 0; - //internal void InvalidateLineLayout() - //{ - // _lineFlags &= ~LINE_SIZE_VALID; - // _lineFlags &= ~LINE_CONTENT_ARRANGED; - //} + } } \ No newline at end of file diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/1_TextLine_CORE_Collection.cs b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/1_TextLine_CORE_Collection.cs index 4408e7af1..be06d5766 100644 --- a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/1_TextLine_CORE_Collection.cs +++ b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/1_TextLine_CORE_Collection.cs @@ -2,20 +2,27 @@ using System; using System.Collections.Generic; -namespace LayoutFarm.TextEditing +namespace LayoutFarm.TextFlow { partial class TextLineBox { - void AddNormalRunToLast(Run v) => v.SetLinkNode(_runs.AddLast(v), this); - - void AddNormalRunToFirst(Run v) => v.SetLinkNode(_runs.AddFirst(v), this); - static LinkedListNode GetLineLinkNode(Run ve) => ve.LinkNode; - void AddNormalRunBefore(Run beforeVisualElement, Run v) => v.SetLinkNode(_runs.AddBefore(GetLineLinkNode(beforeVisualElement), v), this); - - void AddNormalRunAfter(Run afterVisualElement, Run v) => v.SetLinkNode(_runs.AddAfter(GetLineLinkNode(afterVisualElement), v), this); - + + public void AddLast(Run v) => v.SetLinkNode(_runs.AddLast(v), this); + public void ReplaceAll(IEnumerable runs) + { + this.Clear(); + this.LocalSuspendLineReArrange(); + if (runs != null) + { + foreach (Run r in runs) + { + this.AddLast(r); + } + } + this.LocalResumeLineReArrange(); + } public void Clear() { LinkedListNode curNode = this.First; @@ -29,42 +36,53 @@ public void Clear() _validCharCount = true; } - public void Remove(Run v) - { - //#if DEBUG - // if (v.IsLineBreak) - // { - // throw new NotSupportedException("not support line break"); - // } - //#endif + internal void InvalidateCharCount() => _validCharCount = false; - _runs.Remove(GetLineLinkNode(v)); - Run.RemoveParentLink(v); - if ((_lineFlags & LOCAL_SUSPEND_LINE_REARRANGE) != 0) - { - return; - } + //void AddNormalRunToLast(Run v) => v.SetLinkNode(_runs.AddLast(v), this); - if (!this.EndWithLineBreak && this.RunCount == 0 && _currentLineNumber > 0) - { - if (!_textFlowLayer.GetTextLine(_currentLineNumber - 1).EndWithLineBreak) - { - _textFlowLayer.Remove(_currentLineNumber); - } - } - else - { - //var ownerVe = editableFlowLayer.OwnerRenderElement; - //if (ownerVe != null) - //{ - // RenderElement.InnerInvalidateLayoutAndStartBubbleUp(ownerVe); - //} - //else - //{ - // throw new NotSupportedException(); - //} - } - } + //void AddNormalRunToFirst(Run v) => v.SetLinkNode(_runs.AddFirst(v), this); + + //void AddNormalRunBefore(Run beforeVisRun, Run v) => v.SetLinkNode(_runs.AddBefore(GetLineLinkNode(beforeVisRun), v), this); + + //void AddNormalRunAfter(Run afterVisRun, Run v) => v.SetLinkNode(_runs.AddAfter(GetLineLinkNode(afterVisRun), v), this); + + //public void Remove(Run v) + //{ + // //#if DEBUG + // // if (v.IsLineBreak) + // // { + // // throw new NotSupportedException("not support line break"); + // // } + // //#endif + + + // _runs.Remove(GetLineLinkNode(v)); + // Run.RemoveParentLink(v); + // if ((_lineFlags & LOCAL_SUSPEND_LINE_REARRANGE) != 0) + // { + // return; + // } + + // if (!this.EndWithLineBreak && this.RunCount == 0 && _currentLineNumber > 0) + // { + // if (!_textFlowLayer.GetTextLine(_currentLineNumber - 1).EndWithLineBreak) + // { + // _textFlowLayer.Remove(_currentLineNumber); + // } + // } + // else + // { + // //var ownerVe = editableFlowLayer.OwnerRenderElement; + // //if (ownerVe != null) + // //{ + // // RenderElement.InnerInvalidateLayoutAndStartBubbleUp(ownerVe); + // //} + // //else + // //{ + // // throw new NotSupportedException(); + // //} + // } + //} } } \ No newline at end of file diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/2_TextLine_PRIVATE_CollectionFeatures2.cs b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/2_TextLine_PRIVATE_CollectionFeatures2.cs deleted file mode 100644 index e45220f96..000000000 --- a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/2_TextLine_PRIVATE_CollectionFeatures2.cs +++ /dev/null @@ -1,265 +0,0 @@ -//Apache2, 2014-present, WinterDev - -using System; -using System.Collections.Generic; -namespace LayoutFarm.TextEditing -{ - static class Temp - { - public readonly struct TempContext : IDisposable - { - internal readonly T _tool; - internal TempContext(out T tool) - { - Temp.GetFreeItem(out _tool); - tool = _tool; - } - public void Dispose() - { - Temp.Release(_tool); - } - } - - public delegate T CreateNewItemDelegate(); - public delegate void ReleaseItemDelegate(T item); - - - [System.ThreadStatic] - static Stack s_pool; - [System.ThreadStatic] - static CreateNewItemDelegate s_newHandler; - [System.ThreadStatic] - static ReleaseItemDelegate s_releaseCleanUp; - - public static TempContext Borrow(out T freeItem) - { - return new TempContext(out freeItem); - } - - public static void SetNewHandler(CreateNewItemDelegate newHandler, ReleaseItemDelegate releaseCleanUp = null) - { - //set new instance here, must set this first*** - if (s_pool == null) - { - s_pool = new Stack(); - } - s_newHandler = newHandler; - s_releaseCleanUp = releaseCleanUp; - } - internal static void GetFreeItem(out T freeItem) - { - if (s_pool.Count > 0) - { - freeItem = s_pool.Pop(); - } - else - { - freeItem = s_newHandler(); - } - } - internal static void Release(T item) - { - s_releaseCleanUp?.Invoke(item); - s_pool.Push(item); - //... - } - public static bool IsInit() - { - return s_pool != null; - } - } - - - static class RunListPool - { - public static Temp>.TempContext Borrow(out List runList) - { - if (!Temp>.IsInit()) - { - Temp>.SetNewHandler(() => new List(), - s => s.Clear() - ); - } - return Temp>.Borrow(out runList); - } - public static Temp>.TempContext Borrow(out LinkedList runList) - { - if (!Temp>.IsInit()) - { - Temp>.SetNewHandler(() => new LinkedList(), - s => s.Clear() - ); - } - return Temp>.Borrow(out runList); - } - } - - partial class TextLineBox - { - public void AddLineBreakAfter(Run afterTextRun) - { - if (afterTextRun == null) - { - this.EndWithLineBreak = true; - TextLineBox newline = _textFlowLayer.InsertNewLine(_currentLineNumber + 1); - // - if (_textFlowLayer.LineCount - 1 != newline.LineNumber) - { - newline.EndWithLineBreak = true; - } - } - else if (afterTextRun.NextRun == null) - { - this.EndWithLineBreak = true; - TextLineBox newline = _textFlowLayer.InsertNewLine(_currentLineNumber + 1); - // - if (_textFlowLayer.LineCount - 1 != newline.LineNumber) - { - newline.EndWithLineBreak = true; - } - } - else - { - - using (RunListPool.Borrow(out List tempTextRuns)) - { - if (afterTextRun != null) - { - foreach (Run t in GetRunIterForward(afterTextRun.NextRun)) - { - tempTextRuns.Add(t); - } - } - - bool thisEndWithLineBreak = this.EndWithLineBreak; - - this.EndWithLineBreak = true; - this.LocalSuspendLineReArrange(); - - TextLineBox newTextline = _textFlowLayer.InsertNewLine(_currentLineNumber + 1); - newTextline.EndWithLineBreak = thisEndWithLineBreak; - - // - int j = tempTextRuns.Count; - newTextline.LocalSuspendLineReArrange(); - int cx = 0; - for (int i = 0; i < j; ++i) - { - Run t = tempTextRuns[i]; - this.Remove(t); - newTextline.AddLast(t); - Run.DirectSetLocation(t, cx, 0); - cx += t.Width; - } - - newTextline.LocalResumeLineReArrange(); - this.LocalResumeLineReArrange(); - } - - } - } - void AddLineBreakBefore(Run beforeTextRun) - { - if (beforeTextRun == null) - { - this.EndWithLineBreak = true; - _textFlowLayer.InsertNewLine(_currentLineNumber + 1); - } - else - { - //TODO: use pool - using (RunListPool.Borrow(out List tempTextRuns)) - { - if (beforeTextRun != null) - { - foreach (Run t in GetRunIterForward(beforeTextRun)) - { - tempTextRuns.Add(t); - } - } - this.EndWithLineBreak = true; - TextLineBox newTextline = _textFlowLayer.InsertNewLine(_currentLineNumber + 1); - // - this.LocalSuspendLineReArrange(); - newTextline.LocalSuspendLineReArrange(); - int j = tempTextRuns.Count; - for (int i = 0; i < j; ++i) - { - Run t = tempTextRuns[i]; - this.Remove(t); - newTextline.AddLast(t); - } - this.LocalResumeLineReArrange(); - newTextline.LocalResumeLineReArrange(); - } - } - } - - void RemoveLeft(Run t) - { - if (t == null) return; - - LocalSuspendLineReArrange(); - using (RunListPool.Borrow(out LinkedList tobeRemoveTextRuns)) - { - CollectLeftRuns(t, tobeRemoveTextRuns); - LinkedListNode curNode = tobeRemoveTextRuns.First; - - while (curNode != null) - { - Remove(curNode.Value); - curNode = curNode.Next; - } - } - LocalResumeLineReArrange(); - } - void RemoveRight(Run t) - { - LocalSuspendLineReArrange(); - - using (RunListPool.Borrow(out LinkedList tobeRemoveTextRuns)) - { - CollectRightRuns(t, tobeRemoveTextRuns); - - LinkedListNode curNode = tobeRemoveTextRuns.First; - - while (curNode != null) - { - Remove(curNode.Value); - curNode = curNode.Next; - } - } - - LocalResumeLineReArrange(); - } - - void CollectLeftRuns(Run t, LinkedList output) - { - foreach (Run r in GetRunIterForward(this.FirstRun, t)) - { - output.AddLast(r); - } - } - void CollectRightRuns(Run t, LinkedList output) - { - foreach (Run r in _textFlowLayer.TextRunForward(t, this.LastRun)) - { - output.AddLast(r); - } - } - public void ReplaceAll(IEnumerable textRuns) - { - this.Clear(); - this.LocalSuspendLineReArrange(); - if (textRuns != null) - { - foreach (Run r in textRuns) - { - this.AddLast(r); - } - } - - this.LocalResumeLineReArrange(); - } - } -} \ No newline at end of file diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/3_TextLine_PUBLIC_CollectionFeatures.cs b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/3_TextLine_PUBLIC_CollectionFeatures.cs deleted file mode 100644 index 52c422f44..000000000 --- a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/3_TextLine_PUBLIC_CollectionFeatures.cs +++ /dev/null @@ -1,61 +0,0 @@ -//Apache2, 2014-present, WinterDev - -namespace LayoutFarm.TextEditing -{ - partial class TextLineBox - { - public void AddLast(Run v) - { - AddNormalRunToLast(v); - } - public void AddLineBreakAfterLastRun() - { - AddLineBreakAfter(this.LastRun); - } - public void AddLineBreakBeforeFirstRun() - { - AddLineBreakBefore(this.FirstRun); - } - public void AddFirst(Run v) - { - AddNormalRunToFirst(v); - } - public RunStyle DefaultRunStyle => _textFlowLayer.DefaultRunStyle; - public Run AddBefore(Run beforeVisualElement, CopyRun v) - { - var newRun = new TextRun(DefaultRunStyle, v.RawContent); - AddBefore(beforeVisualElement, newRun); - return newRun; - } - public void AddBefore(Run beforeVisualElement, Run v) - { - AddNormalRunBefore(beforeVisualElement, v); - } - public TextRun AddAfter(Run afterVisualElement, CopyRun v) - { - var newRun = new TextRun(DefaultRunStyle, v.RawContent); - AddAfter(afterVisualElement, newRun); - return newRun; - } - public void AddAfter(Run afterVisualElement, Run v) - { - AddNormalRunAfter(afterVisualElement, v); - } - internal void UnsafeAddLast(Run run) - { - run.SetLinkNode(_runs.AddLast(run), this); - } - internal void UnsafeAddFirst(Run run) - { - run.SetLinkNode(_runs.AddFirst(run), this); - } - internal void UnsafeAddAfter(Run after, Run run) - { - run.SetLinkNode(_runs.AddAfter(GetLineLinkNode(after), run), this); - } - internal void UnsafeRemoveVisualElement(Run v) - { - _runs.Remove(GetLineLinkNode(v)); - } - } -} \ No newline at end of file diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/4_TextLine_ArrangeAndResizingMechanism.cs b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/4_TextLine_ArrangeAndResizingMechanism.cs index ad5c2ac3e..03acd3910 100644 --- a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/4_TextLine_ArrangeAndResizingMechanism.cs +++ b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/4_TextLine_ArrangeAndResizingMechanism.cs @@ -2,11 +2,11 @@ using System; using System.Collections.Generic; -namespace LayoutFarm.TextEditing +namespace LayoutFarm.TextFlow { partial class TextLineBox { - public void RefreshInlineArrange() + internal void RefreshInlineArrange() { Run r = this.FirstRun; int lastestX = 0; @@ -16,21 +16,18 @@ public void RefreshInlineArrange() r, lastestX, r.Top); + //no inter-space between each run lastestX += r.Width; + r = r.NextRun; } } - internal void SetPostArrangeLineSize(int lineWidth, int lineHeight) - { - _actualLineWidth = lineWidth; - _actualLineHeight = lineHeight; - - } - public void LocalSuspendLineReArrange() + + internal void LocalSuspendLineReArrange() { _lineFlags |= LOCAL_SUSPEND_LINE_REARRANGE; } - public void LocalResumeLineReArrange() + internal void LocalResumeLineReArrange() { _lineFlags &= ~LOCAL_SUSPEND_LINE_REARRANGE; LinkedListNode curNode = this.First; @@ -39,6 +36,7 @@ public void LocalResumeLineReArrange() { Run r = curNode.Value; Run.DirectSetLocation(r, cx, 0); + //no inter-space between each run cx += r.Width; curNode = curNode.Next; } diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/5_TextLine_Advanced.cs b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/5_TextLine_Advanced.cs index 5e00fdd11..a4293591b 100644 --- a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/5_TextLine_Advanced.cs +++ b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/5_TextLine_Advanced.cs @@ -2,716 +2,11 @@ using System; using System.Collections.Generic; -using PixelFarm.Drawing; -using Typography.TextLayout; - -namespace LayoutFarm.TextEditing +using Typography.Text; +namespace LayoutFarm.TextFlow { - - partial class TextLineBox { - public static void InnerDoJoinWithNextLine(TextLineBox line) - { - line.JoinWithNextLine(); - } - void JoinWithNextLine() - { - if (IsLastLine) { return; } - // - - TextLineBox lowerLine = _textFlowLayer.GetTextLine(_currentLineNumber + 1); - this.LocalSuspendLineReArrange(); - int cx = 0; - Run lastTextRun = this.LastRun; - if (lastTextRun != null) - { - cx = lastTextRun.Right; - } - - foreach (Run r in lowerLine._runs) - { - this.AddLast(r); - Run.DirectSetLocation(r, cx, 0); - cx += r.Width; - } - this.LocalResumeLineReArrange(); - this.EndWithLineBreak = lowerLine.EndWithLineBreak; - _textFlowLayer.Remove(lowerLine._currentLineNumber); - - } - - public void Copy(TextRangeCopy output) - { - LinkedListNode curNode = this.First; - while (curNode != null) - { - output.AppendRun(curNode.Value); - curNode = curNode.Next; - } - } - - void GetStartAndStopLine(EditableVisualPointInfo startPoint, EditableVisualPointInfo endPoint, out TextLineBox startLine, out TextLineBox stopLine) - { - startLine = (startPoint.LineId == _currentLineNumber) ? this : _textFlowLayer.GetTextLine(startPoint.LineId); - stopLine = (endPoint.LineId == _currentLineNumber) ? this : _textFlowLayer.GetTextLine(endPoint.LineId); - } - public void Copy(VisualSelectionRange selectionRange, TextRangeCopy output) - { - EditableVisualPointInfo startPoint = selectionRange.StartPoint; - EditableVisualPointInfo endPoint = selectionRange.EndPoint; - if (startPoint.Run != null) - { - if (startPoint.Run == endPoint.Run) - { - CopyRun elem = - startPoint.Run.Copy( - startPoint.RunLocalSelectedIndex, - endPoint.LineCharIndex - startPoint.LineCharIndex); - if (elem != null) - { - output.AppendRun(elem); - } - } - else - { - - GetStartAndStopLine(startPoint, endPoint, out TextLineBox startLine, out TextLineBox stopLine); - - if (startLine == stopLine) - { - CopyRun rightPart = startPoint.Run.Copy(startPoint.RunLocalSelectedIndex); - if (rightPart != null) - { - output.AppendRun(rightPart); - } - if (startPoint.Run.NextRun != endPoint.Run) - { - foreach (Run run in _textFlowLayer.TextRunForward( - startPoint.Run.NextRun, - endPoint.Run.PrevRun)) - { - output.AppendRun(run); - } - } - - CopyRun leftPart = endPoint.Run.LeftCopy(endPoint.RunLocalSelectedIndex); - if (leftPart != null) - { - output.AppendRun(leftPart); - } - } - else - { - int startLineId = startPoint.LineId; - int stopLineId = endPoint.LineId; - startLine.RightCopy(startPoint, output); - for (int i = startLineId + 1; i < stopLineId; i++) - { - //begine new line - output.AppendNewLine(); - TextLineBox line = _textFlowLayer.GetTextLine(i); - line.Copy(output); - } - if (endPoint.LineCharIndex > -1) - { - output.AppendNewLine(); - stopLine.LeftCopy(endPoint, output); - } - } - } - } - else - { - GetStartAndStopLine(startPoint, endPoint, out TextLineBox startLine, out TextLineBox stopLine); - - if (startLine == stopLine) - { - if (startPoint.LineCharIndex == -1) - { - foreach (Run t in _textFlowLayer.TextRunForward( - startPoint.Run, - endPoint.Run.PrevRun)) - { - output.AppendRun(t); - } - CopyRun postCutTextRun = endPoint.Run.Copy(endPoint.RunLocalSelectedIndex + 1); - if (postCutTextRun != null) - { - output.AppendRun(postCutTextRun); - } - } - else - { - CopyRun rightPart = startPoint.Run.Copy(startPoint.RunLocalSelectedIndex + 1); - if (rightPart != null) - { - output.AppendRun(rightPart); - } - - foreach (Run t in _textFlowLayer.TextRunForward( - startPoint.Run.NextRun, - endPoint.Run.PrevRun)) - { - output.AppendRun(t.CreateCopy()); - } - - CopyRun leftPart = endPoint.Run.LeftCopy(startPoint.RunLocalSelectedIndex); - if (leftPart != null) - { - output.AppendRun(leftPart); - } - } - } - else - { - int startLineId = startPoint.LineId; - int stopLineId = endPoint.LineId; - startLine.RightCopy(startPoint, output); - for (int i = startLineId + 1; i < stopLineId; i++) - { - output.AppendNewLine(); - TextLineBox line = _textFlowLayer.GetTextLine(i); - line.Copy(output); - } - stopLine.LeftCopy(endPoint, output); - } - } - } - - internal void Remove(VisualSelectionRange selectionRange) - { - EditableVisualPointInfo startPoint = selectionRange.StartPoint; - EditableVisualPointInfo endPoint = selectionRange.EndPoint; - if (startPoint.Run != null) - { - if (startPoint.Run == endPoint.Run) - { - Run removedRun = startPoint.Run; - Run.InnerRemove(removedRun, - startPoint.RunLocalSelectedIndex, - endPoint.LineCharIndex - startPoint.LineCharIndex, false); - if (removedRun.CharacterCount == 0) - { - if (startPoint.LineId == _currentLineNumber) - { - this.Remove(removedRun); - } - else - { - TextLineBox line = _textFlowLayer.GetTextLine(startPoint.LineId); - line.Remove(removedRun); - } - } - } - else - { - - GetStartAndStopLine(startPoint, endPoint, out TextLineBox startLine, out TextLineBox stopLine); - - EditableVisualPointInfo newStartPoint = startLine.Split(startPoint); - EditableVisualPointInfo newStopPoint = stopLine.Split(endPoint); - - if (startLine == stopLine) - { - if (newStartPoint.Run != null) - { - LinkedList tobeRemoveRuns = new LinkedList(); - if (newStartPoint.LineCharIndex == 0) - { - foreach (Run t in _textFlowLayer.TextRunForward( - newStartPoint.Run, - newStopPoint.Run)) - { - tobeRemoveRuns.AddLast(t); - } - } - else - { - foreach (Run t in _textFlowLayer.TextRunForward( - newStartPoint.Run.NextRun, - newStopPoint.Run)) - { - tobeRemoveRuns.AddLast(t); - } - } - startLine.LocalSuspendLineReArrange(); - foreach (Run t in tobeRemoveRuns) - { - startLine.Remove(t); - } - startLine.LocalResumeLineReArrange(); - } - else - { - //this may be the blank line - startLine.Clear(); -#if DEBUG - //TODO: review here again - //System.Diagnostics.Debug.WriteLine("EditableTextLine_adv1"); -#endif - } - } - else - { - int startLineId = newStartPoint.LineId; - int stopLineId = newStopPoint.LineId; - if (newStopPoint.LineCharIndex > 0) - { - stopLine.RemoveLeft(newStopPoint.Run); - } - for (int i = stopLineId - 1; i > startLineId; i--) - { - TextLineBox line = _textFlowLayer.GetTextLine(i); - line.Clear(); - line.JoinWithNextLine(); - } - if (newStartPoint.LineCharIndex == 0) - { - startLine.RemoveRight(newStartPoint.Run); - } - else - { - Run nextRun = (newStartPoint.Run).NextRun; - if (nextRun != null) - { - startLine.RemoveRight(nextRun); - } - } - startLine.JoinWithNextLine(); - } - } - } - else - { - GetStartAndStopLine(startPoint, endPoint, out TextLineBox startLine, out TextLineBox stopLine); - EditableVisualPointInfo newStartPoint = startLine.Split(startPoint); - EditableVisualPointInfo newStopPoint = stopLine.Split(endPoint); - if (startLine == stopLine) - { - if (newStartPoint.Run != null) - { - LinkedList tobeRemoveRuns = new LinkedList(); - if (newStartPoint.LineCharIndex == -1) - { - foreach (Run t in _textFlowLayer.TextRunForward( - newStartPoint.Run, - newStopPoint.Run)) - { - tobeRemoveRuns.AddLast(t); - } - } - else - { - foreach (Run t in _textFlowLayer.TextRunForward( - newStartPoint.Run.NextRun, - newStopPoint.Run)) - { - tobeRemoveRuns.AddLast(t); - } - } - foreach (Run t in tobeRemoveRuns) - { - startLine.Remove(t); - } - } - else - { - throw new NotSupportedException(); - } - } - else - { - int startLineId = newStartPoint.LineId; - int stopLineId = newStopPoint.LineId; - if (newStopPoint.LineCharIndex > -1) - { - stopLine.RemoveLeft(newStopPoint.Run); - } - for (int i = stopLineId - 1; i > startLineId; i--) - { - TextLineBox line = _textFlowLayer.GetTextLine(i); - line.Clear(); - line.JoinWithNextLine(); - } - if (newStartPoint.LineCharIndex == -1) - { - //TODO: review here again - //at this point newStartPoint.TextRun should always null - if (newStartPoint.Run != null) - { - startLine.RemoveRight(newStartPoint.Run); - } - } - else - { - //at this point newStartPoint.TextRun should always null - //TODO newStartPoint.TextRun == null??? - if (newStartPoint.Run != null) - { - Run nextRun = newStartPoint.Run.NextRun; - if (nextRun != null) - { - startLine.RemoveRight(nextRun); - } - } - - } - startLine.JoinWithNextLine(); - } - } - } - - //use pool? - readonly TextPrinterWordVisitor _wordVisitor = new TextPrinterWordVisitor(); - readonly TextPrinterLineSegmentList _lineSegs = new TextPrinterLineSegmentList(); - - Size MeasureCopyRunLength(CopyRun copyRun) - { - - //IAdvanceTextService txServices = GlobalTextService.AdvanceTextService; - - char[] mybuffer = copyRun.RawContent; - //if (txServices.SupportsWordBreak) - //{ - var textBufferSpan = new Typography.Text.TextBufferSpan(mybuffer); - - _lineSegs.Clear(); - _wordVisitor.SetLineSegmentList(_lineSegs); - Typography.Text.GlobalTextService.TxtClient.BreakToLineSegments(textBufferSpan, _wordVisitor); - - var result = new TextSpanMeasureResult(); - result.outputXAdvances = new int[mybuffer.Length]; - - Typography.Text.GlobalTextService.TxtClient.CalculateUserCharGlyphAdvancePos(textBufferSpan, _lineSegs, - DefaultRunStyle.ReqFont, - ref result); - - return new Size(result.outputTotalW, result.lineHeight); - //} - //else - //{ - - - // var textBufferSpan = new Typography.Text.TextBufferSpan(mybuffer); - - // var result = new TextSpanMeasureResult(); - // result.outputXAdvances = new int[mybuffer.Length]; - - // txServices.CalculateUserCharGlyphAdvancePos(textBufferSpan, - // DefaultRunStyle.ReqFont, - // ref result); - - // return new Size(result.outputTotalW, result.lineHeight); - //} - - } - internal SelectionRangeInfo Split(VisualSelectionRange selectionRange) - { - selectionRange.SwapIfUnOrder(); - - EditableVisualPointInfo startPoint = selectionRange.StartPoint; - EditableVisualPointInfo endPoint = selectionRange.EndPoint; - - if (startPoint.Run == endPoint.Run) - { - Run toBeCutTextRun = startPoint.Run; - - CopyRun leftPart = toBeCutTextRun.LeftCopy(startPoint.RunLocalSelectedIndex); - CopyRun middlePart = toBeCutTextRun.Copy(startPoint.RunLocalSelectedIndex, endPoint.LineCharIndex - startPoint.LineCharIndex); - CopyRun rightPart = toBeCutTextRun.Copy(endPoint.RunLocalSelectedIndex); - - EditableVisualPointInfo newStartRangePointInfo = null; - EditableVisualPointInfo newEndRangePointInfo = null; - TextLineBox line = this; - - if (startPoint.LineId != _currentLineNumber) - { - line = _textFlowLayer.GetTextLine(startPoint.LineId); - } - - line.LocalSuspendLineReArrange(); - - if (leftPart != null) - { - Run leftRun = line.AddBefore(toBeCutTextRun, leftPart); - newStartRangePointInfo = CreateTextPointInfo( - startPoint.LineId, startPoint.LineCharIndex, startPoint.X, - leftRun, - startPoint.TextRunCharOffset, startPoint.TextRunPixelOffset); - } - else - { - //no left part, - //so we connect to prev text run - - Run prevTxtRun = startPoint.Run.PrevRun; - if (prevTxtRun != null) - { - newStartRangePointInfo = CreateTextPointInfo( - startPoint.LineId, startPoint.LineCharIndex, startPoint.X, - prevTxtRun, - startPoint.TextRunCharOffset - leftPart.CharacterCount, - startPoint.TextRunPixelOffset - prevTxtRun.Width); - } - else - { - //no prev run, we are at the begining of the line - newStartRangePointInfo = CreateTextPointInfo( - startPoint.LineId, - startPoint.LineCharIndex, - 0, - null, - 0, 0); - } - } - - if (rightPart != null) - { - Run rightRun = line.AddAfter(toBeCutTextRun, rightPart); - newEndRangePointInfo = - CreateTextPointInfo( - endPoint.LineId, - endPoint.LineCharIndex, - endPoint.X, - null,///?? - startPoint.TextRunCharOffset + middlePart.CharacterCount, - startPoint.TextRunPixelOffset + MeasureCopyRunLength(middlePart).Width); - } - else - { - Run nextTxtRun = endPoint.Run.NextRun; - if (nextTxtRun != null) - { - newEndRangePointInfo = CreateTextPointInfo( - endPoint.LineId, - endPoint.LineCharIndex, - endPoint.X, - null,///?? - endPoint.TextRunPixelOffset + endPoint.Run.CharacterCount, - endPoint.TextRunPixelOffset + endPoint.Run.Width); - } - else - { - newEndRangePointInfo = CreateTextPointInfo( - endPoint.LineId, - endPoint.LineCharIndex, - endPoint.X, - null, - endPoint.TextRunCharOffset, - endPoint.TextRunPixelOffset); - } - } - - if (middlePart != null) - { - line.AddAfter(toBeCutTextRun, middlePart); - } - else - { - throw new NotSupportedException(); - } - line.Remove(toBeCutTextRun); - line.LocalResumeLineReArrange(); - return new SelectionRangeInfo(newStartRangePointInfo, newEndRangePointInfo); - } - else - { - TextLineBox workingLine = this; - if (startPoint.LineId != _currentLineNumber) - { - workingLine = _textFlowLayer.GetTextLine(startPoint.LineId); - } - EditableVisualPointInfo newStartPoint = workingLine.Split(startPoint); - workingLine = this; - if (endPoint.LineId != _currentLineNumber) - { - workingLine = _textFlowLayer.GetTextLine(endPoint.LineId); - } - - EditableVisualPointInfo newEndPoint = workingLine.Split(endPoint); - return new SelectionRangeInfo(newStartPoint, newEndPoint); - } - } - - internal EditableVisualPointInfo Split(EditableVisualPointInfo pointInfo) - { - if (pointInfo.LineId != _currentLineNumber) - { - throw new NotSupportedException(); - } - - Run tobeCutRun = pointInfo.Run; - if (tobeCutRun == null) - { - return CreateTextPointInfo( - pointInfo.LineId, - pointInfo.LineCharIndex, - pointInfo.X, - null, - pointInfo.TextRunCharOffset, - pointInfo.TextRunPixelOffset); - } - - this.LocalSuspendLineReArrange(); - EditableVisualPointInfo result = null; - - CopyRun leftPart = tobeCutRun.LeftCopy(pointInfo.RunLocalSelectedIndex); - CopyRun rightPart = tobeCutRun.Copy(pointInfo.RunLocalSelectedIndex); - - if (leftPart != null) - { - Run leftRun = AddBefore(tobeCutRun, leftPart); - if (rightPart != null) - { - this.AddAfter(tobeCutRun, rightPart); - } - - result = CreateTextPointInfo( - pointInfo.LineId, - pointInfo.LineCharIndex, - pointInfo.X, - leftRun, - pointInfo.TextRunCharOffset, - pointInfo.TextRunPixelOffset); - } - else - { - if (rightPart != null) - { - this.AddAfter(tobeCutRun, rightPart); - } - - - Run infoTextRun = null; - if (IsSingleLine) - { - if (tobeCutRun.PrevRun != null) - { - infoTextRun = tobeCutRun.PrevRun; - } - else - { - infoTextRun = tobeCutRun.NextRun; - } - } - else - { - if (IsFirstLine) - { - if (tobeCutRun.PrevRun != null) - { - infoTextRun = tobeCutRun.PrevRun; - } - else - { - if (tobeCutRun.NextRun == null) - { - infoTextRun = null; - } - else - { - infoTextRun = tobeCutRun.NextRun; - } - } - } - else if (IsLastLine) - { - if (tobeCutRun.PrevRun != null) - { - infoTextRun = tobeCutRun.PrevRun; - } - else - { - - } - } - else - { - if (tobeCutRun.NextRun != null) - { - infoTextRun = tobeCutRun.NextRun; - } - else - { - infoTextRun = null; - } - } - } - result = CreateTextPointInfo( - pointInfo.LineId, - pointInfo.LineCharIndex, - pointInfo.X, - infoTextRun, - pointInfo.TextRunCharOffset, - pointInfo.TextRunPixelOffset); - } - - this.Remove(tobeCutRun); - this.LocalResumeLineReArrange(); - return result; - } - void RightCopy(VisualPointInfo pointInfo, TextRangeCopy output) - { - if (pointInfo.LineId != _currentLineNumber) - { - throw new NotSupportedException(); - } - Run tobeCutRun = pointInfo.Run; - if (tobeCutRun == null) - { - return; - } - CopyRun rightPart = tobeCutRun.Copy(pointInfo.RunLocalSelectedIndex); - if (rightPart != null) - { - output.AppendRun(rightPart); - } - foreach (Run run in GetRunIterForward(tobeCutRun.NextRun, this.LastRun)) - { - output.AppendRun(run); - } - } - - void LeftCopy(VisualPointInfo pointInfo, TextRangeCopy output) - { - if (pointInfo.LineId != _currentLineNumber) - { - throw new NotSupportedException(); - } - Run tobeCutRun = pointInfo.Run; - if (tobeCutRun == null) - { - return; - } - - foreach (Run run in _runs) - { - if (run != tobeCutRun) - { - output.AppendRun(run); - } - else - { - break; - } - } - CopyRun leftPart = tobeCutRun.LeftCopy(pointInfo.RunLocalSelectedIndex); - if (leftPart != null) - { - output.AppendRun(leftPart); - } - } - - EditableVisualPointInfo CreateTextPointInfo( - int lineId, int lineCharIndex, int caretPixelX, - Run onRun, - int textRunCharOffset, int textRunPixelOffset) - { - EditableVisualPointInfo textPointInfo = new EditableVisualPointInfo(this, lineCharIndex, onRun); - textPointInfo.SetAdditionVisualInfo(textRunCharOffset, caretPixelX, textRunPixelOffset); - return textPointInfo; - } public VisualPointInfo GetTextPointInfoFromCaretPoint(int caretX) { @@ -725,7 +20,7 @@ public VisualPointInfo GetTextPointInfoFromCaretPoint(int caretX) if (accTextRunWidth + thisTextRunWidth > caretX) { CharLocation localPointInfo = t.GetCharacterFromPixelOffset(caretX - thisTextRunWidth); - var pointInfo = new EditableVisualPointInfo(this, accTextRunCharCount + localPointInfo.RunCharIndex, t); + var pointInfo = new EditableVisualPointInfo(this, accTextRunCharCount + localPointInfo.RunCharIndex); pointInfo.SetAdditionVisualInfo(accTextRunCharCount, caretX, accTextRunWidth); return pointInfo; } @@ -742,7 +37,7 @@ public VisualPointInfo GetTextPointInfoFromCaretPoint(int caretX) else { - EditableVisualPointInfo pInfo = new EditableVisualPointInfo(this, -1, null); + EditableVisualPointInfo pInfo = new EditableVisualPointInfo(this, -1); pInfo.SetAdditionVisualInfo(accTextRunCharCount, caretX, accTextRunWidth); return pInfo; } @@ -770,7 +65,7 @@ public EditableVisualPointInfo GetTextPointInfoFromCharIndex(int charIndex) { int localCharOffset = charIndex - rCharOffset; int pixelOffset = lastestRun.GetRunWidth(localCharOffset); - textPointInfo = new EditableVisualPointInfo(this, charIndex, lastestRun); + textPointInfo = new EditableVisualPointInfo(this, charIndex); textPointInfo.SetAdditionVisualInfo(localCharOffset, rPixelOffset + pixelOffset, rPixelOffset); return textPointInfo; } @@ -782,7 +77,7 @@ public EditableVisualPointInfo GetTextPointInfoFromCharIndex(int charIndex) } - textPointInfo = new EditableVisualPointInfo(this, charIndex, lastestRun); + textPointInfo = new EditableVisualPointInfo(this, charIndex); textPointInfo.SetAdditionVisualInfo(rCharOffset - lastestRun.CharacterCount, rPixelOffset, rPixelOffset - lastestRun.Width); return textPointInfo; } diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/RunListPool.cs b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/RunListPool.cs new file mode 100644 index 000000000..9c6c41837 --- /dev/null +++ b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/RunListPool.cs @@ -0,0 +1,96 @@ +//Apache2, 2014-present, WinterDev + +using System; +using System.Collections.Generic; +namespace LayoutFarm.TextFlow +{ + static class Temp + { + public readonly struct TempContext : IDisposable + { + internal readonly T _tool; + internal TempContext(out T tool) + { + Temp.GetFreeItem(out _tool); + tool = _tool; + } + public void Dispose() + { + Temp.Release(_tool); + } + } + + public delegate T CreateNewItemDelegate(); + public delegate void ReleaseItemDelegate(T item); + + + [System.ThreadStatic] + static Stack s_pool; + [System.ThreadStatic] + static CreateNewItemDelegate s_newHandler; + [System.ThreadStatic] + static ReleaseItemDelegate s_releaseCleanUp; + + public static TempContext Borrow(out T freeItem) + { + return new TempContext(out freeItem); + } + + public static void SetNewHandler(CreateNewItemDelegate newHandler, ReleaseItemDelegate releaseCleanUp = null) + { + //set new instance here, must set this first*** + if (s_pool == null) + { + s_pool = new Stack(); + } + s_newHandler = newHandler; + s_releaseCleanUp = releaseCleanUp; + } + internal static void GetFreeItem(out T freeItem) + { + if (s_pool.Count > 0) + { + freeItem = s_pool.Pop(); + } + else + { + freeItem = s_newHandler(); + } + } + internal static void Release(T item) + { + s_releaseCleanUp?.Invoke(item); + s_pool.Push(item); + //... + } + public static bool IsInit() + { + return s_pool != null; + } + } + + + static class RunListPool + { + public static Temp>.TempContext Borrow(out List runList) + { + if (!Temp>.IsInit()) + { + Temp>.SetNewHandler(() => new List(), + s => s.Clear() + ); + } + return Temp>.Borrow(out runList); + } + public static Temp>.TempContext Borrow(out LinkedList runList) + { + if (!Temp>.IsInit()) + { + Temp>.SetNewHandler(() => new LinkedList(), + s => s.Clear() + ); + } + return Temp>.Borrow(out runList); + } + } +} \ No newline at end of file diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/TextLineWalker.cs b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/TextLineWalker.cs index 839f72c70..05dcb2756 100644 --- a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/TextLineWalker.cs +++ b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/TextLineWalker.cs @@ -1,12 +1,11 @@ //Apache2, 2014-present, WinterDev using System; -using System.Collections.Generic; -using System.Text; using PixelFarm.Drawing; +using Typography.Text; using Typography.TextLayout; -namespace LayoutFarm.TextEditing +namespace LayoutFarm.TextFlow { public readonly struct SelectionRangeInfo { @@ -19,318 +18,11 @@ public SelectionRangeInfo(EditableVisualPointInfo start, EditableVisualPointInfo } } - class TextFlowEditWalker : TextFlowWalkerBase - { - //TODO: review this class again - public TextFlowEditWalker(TextFlowLayer textLayer) : base(textLayer) - { - - } - - public RunStyle CurrentSpanStyle => TextLayer.DefaultRunStyle; - - public void Clear() - { - //clear all - this.MoveToLine(0); - ClearCurrentLine(); - EnsureCurrentTextRun(); - } - - public void EnsureCurrentTextRun(int index) - { - Run run = CurrentTextRun; - if (run != null && run.HasParent) - { - SetCurrentCharIndex(index); - } - else - { - if (_needUpdateCurrentRun) - { - SetCurrentCharIndex2(index); - _needUpdateCurrentRun = false; - } - else - { - SetCurrentCharIndexToBegin(); - if (index != -1) - { - int limit = CurrentLine.CharCount(); - if (index > limit) - { - index = limit; - } - SetCurrentCharIndex(index); - } - } - - } - } - - public void EnsureCurrentTextRun() => EnsureCurrentTextRun(CharIndex); - - public void RemoveSelectedTextRuns(VisualSelectionRange selectionRange) - { -#if DEBUG - //if (!CurrentLine.dbugHasOwner) - //{ - - //} -#endif - int precutIndex = selectionRange.StartPoint.LineCharIndex; - CurrentLine.Remove(selectionRange); - InvalidateCurrentRun(); - - CurrentLine.TextLineReCalculateActualLineSize(); - CurrentLine.RefreshInlineArrange(); - SetCurrentCharIndex2(precutIndex); - } - public void ClearCurrentLine() - { - int currentCharIndex = CharIndex; - CurrentLine.ReplaceAll(null); - CurrentLine.TextLineReCalculateActualLineSize(); - CurrentLine.RefreshInlineArrange(); - EnsureCurrentTextRun(currentCharIndex); - } - public void ReplaceCurrentLine(IEnumerable textRuns) - { - int currentCharIndex = CharIndex; - CurrentLine.ReplaceAll(textRuns); - CurrentLine.TextLineReCalculateActualLineSize(); - CurrentLine.RefreshInlineArrange(); - EnsureCurrentTextRun(currentCharIndex); - } - public void JoinWithNextLine() - { - TextLineBox.InnerDoJoinWithNextLine(this.CurrentLine); - EnsureCurrentTextRun(); - } - char BackSpaceOneChar() - { - if (CurrentTextRun == null) - { - return '\0'; - } - else - { - if (CharIndex == 0) - { - return '\0'; - } - - //move back 1 char and do delete - Run removingTextRun = CurrentTextRun; - int removeIndex = CurrentTextRunCharIndex; - SetCurrentCharStepLeft(); - char toBeRemovedChar = CurrentChar; - - Run.InnerRemove(removingTextRun, removeIndex, 1, false); - if (removingTextRun.CharacterCount == 0) - { - Run nextRun = removingTextRun.NextRun; - CurrentLine.Remove(removingTextRun); - SetCurrentTextRun(nextRun); - EnsureCurrentTextRun(); - - } - CurrentLine.TextLineReCalculateActualLineSize(); - CurrentLine.RefreshInlineArrange(); - return toBeRemovedChar; - } - } - - public Run GetCurrentTextRun() => CurrentLine.IsBlankLine ? null : CurrentTextRun; - - public bool CanAcceptThisChar(char c) - { - //TODO: review here, enable this feature or not - //some char can't be a start char on blank line - if (CurrentLine.IsBlankLine && - !TextFlowEditSession.CanCaretStopOnThisChar(c)) - { - return false; - } - return true; - } - public void AddCharacter(char c) - { - if (CurrentLine.IsBlankLine) - { - //TODO: review here, enable this feature or not - //some char can't be a start char on blank line - - if (!TextFlowEditSession.CanCaretStopOnThisChar(c)) - { - return; - } - // - - //1. new - var run = new TextRun(this.CurrentSpanStyle, new char[] { c }); - CurrentLine.AddLast(run); - SetCurrentTextRun(run); - } - else - { - Run run = CurrentTextRun; - if (run != null) - { - if (run.IsInsertable) - { - run.InsertAfter(CurrentTextRunCharIndex, c); - } - else - { - AddTextSpan(new TextRun(CurrentSpanStyle, new char[] { c })); - return; - } - } - else - { - throw new NotSupportedException(); - } - } - - CurrentLine.TextLineReCalculateActualLineSize(); - CurrentLine.RefreshInlineArrange(); - SetCurrentCharStepRight(); - } - public void AddTextSpan(string textspan) - { - AddTextSpan(new TextRun(CurrentSpanStyle, textspan.ToCharArray())); - } - public void AddTextSpan(char[] textspan) - { - - AddTextSpan(new TextRun(CurrentSpanStyle, textspan)); - } - public void AddTextSpan(Run textRun) - { - if (CurrentLine.IsBlankLine) - { - CurrentLine.AddLast(textRun); - SetCurrentTextRun(textRun); - CurrentLine.TextLineReCalculateActualLineSize(); - CurrentLine.RefreshInlineArrange(); - - SetCurrentCharIndex(CharIndex + textRun.CharacterCount); - } - else - { - if (CurrentTextRun != null) - { - VisualPointInfo newPointInfo = CurrentLine.Split(GetCurrentPointInfo()); - if (newPointInfo.IsOnTheBeginOfLine) - { - if (newPointInfo.Run == null) - { - CurrentLine.AddFirst(textRun); - } - else - { - CurrentLine.AddBefore(newPointInfo.Run, textRun); - } - } - else - { - if (newPointInfo.Run == null) - { - CurrentLine.AddFirst(textRun); - } - else - { - CurrentLine.AddAfter(newPointInfo.Run, textRun); - } - - } - CurrentLine.TextLineReCalculateActualLineSize(); - CurrentLine.RefreshInlineArrange(); - EnsureCurrentTextRun(CharIndex + textRun.CharacterCount); - } - else - { - throw new NotSupportedException(); - } - } - } - public void ReplaceAllLineContent(Run[] runs) - { - int charIndex = CharIndex; - CurrentLine.Clear(); - int j = runs.Length; - for (int i = 0; i < j; ++i) - { - CurrentLine.AddLast(runs[i]); - } - - EnsureCurrentTextRun(charIndex); - } - - public char DoBackspaceOneChar() => BackSpaceOneChar(); - - public char DoDeleteOneChar() - { - if (CharIndex < CurrentLine.CharCount()) - { - //simulate backspace keystroke - SetCurrentCharStepRight(); - return BackSpaceOneChar(); - } - else - { - return '\0'; - } - } - - public void SplitToNewLine() - { - Run currentRun = CurrentTextRun; - if (CurrentLine.IsBlankLine) - { - CurrentLine.AddLineBreakAfterLastRun(); - } - else - { - if (CharIndex == -1) - { - CurrentLine.AddLineBreakBeforeFirstRun(); - SetCurrentTextRun(null); - } - else - { - CopyRun rightSplitedPart = Run.InnerRemove(currentRun, - CurrentTextRunCharIndex + 1, true); - if (rightSplitedPart != null) - { - CurrentLine.AddAfter(currentRun, rightSplitedPart); - } - - CurrentLine.AddLineBreakAfter(currentRun); - if (currentRun.CharacterCount == 0) - { - CurrentLine.Remove(currentRun); - } - } - } - - - this.TextLayer.TopDownReCalculateContentSize(); - EnsureCurrentTextRun(); - } - public SelectionRangeInfo SplitSelectedText(VisualSelectionRange selectionRange) - { - SelectionRangeInfo newPoints = CurrentLine.Split(selectionRange); - EnsureCurrentTextRun(); - return newPoints; - } - } /// - /// read only text flow walker + /// visual line walker /// - abstract class TextFlowWalkerBase + sealed class VisualTextLineWalker { #if DEBUG @@ -339,9 +31,9 @@ abstract class TextFlowWalkerBase public debugActivityRecorder dbugTextManRecorder; #endif - TextFlowLayer _textFlowLayer; + TextLineBox _currentLine; - int _currentLineY = 0; + //Run _run1_x; Run _currentTextRun; //{ @@ -374,53 +66,112 @@ abstract class TextFlowWalkerBase /// pixel offset of this run, start from the begin of this line, this value is reset for every current run /// int _rPixelOffset = 0; - public TextFlowWalkerBase(TextFlowLayer flowlayer) + public VisualTextLineWalker() { #if DEBUG this.dbug_MyId = dbugTotalId; dbugTotalId++; -#endif +#endif + } + + public Run GetCurrentTextRun() => CurrentLine.IsBlankLine ? null : CurrentTextRun; + public void CollectAffectedRuns(int charIndex, int count, System.Collections.Generic.List outputs) + { + //find affected run + System.Collections.Generic.LinkedListNode node = _currentLine.First; + + int total = 0; + bool foundBegin = false; + int end = charIndex + count; - _textFlowLayer = flowlayer; - //flowlayer.Reflow += flowlayer_Reflow; - _currentLine = flowlayer.GetTextLine(0); - if (_currentLine.FirstRun != null) + while (node != null) { - _currentTextRun = _currentLine.FirstRun; + Run v = node.Value; + if (!foundBegin) + { + if (charIndex >= total && charIndex < total + v.CharacterCount) + { + foundBegin = true; + outputs.Add(v); + if (end <= total + v.CharacterCount) + { + return; + } + } + } + else + { + //find end + outputs.Add(v); + if (end <= total + v.CharacterCount) + { + return; + } + } + + total += v.CharacterCount;//next + node = node.Next; } } #if DEBUG int _i_charIndex; - int caret_char_index + int _caret_NewCharIndex { - get { return _i_charIndex; } + get => _i_charIndex; set { + if ((value % 2) != 0) + { + + } _i_charIndex = value; } } #else - int caret_char_index; + int _caret_NewCharIndex; #endif + public void EnsureCurrentTextRun(int index) + { + Run run = CurrentTextRun; + if (run != null && run.HasParent) + { + SetCurrentCharIndex(index); + } + else + { + if (_needUpdateCurrentRun) + { + SetCurrentCharIndex2(index); + _needUpdateCurrentRun = false; + } + else + { + SetCurrentCharIndexToBegin(); + if (index != -1) + { + int limit = CurrentLine.CharCount(); + if (index > limit) + { + index = limit; + } + SetCurrentCharIndex(index); + } + } - //void flowlayer_Reflow(object sender, EventArgs e) - //{ - // int prevCharIndex = caret_char_index; - // this.SetCurrentCharIndexToBegin(); - // this.SetCurrentCharIndex(prevCharIndex); - //} - // - // - // - protected TextLineBox CurrentLine => _currentLine; - // - protected Run CurrentTextRun => _currentTextRun; + } + } + + public void EnsureCurrentTextRun() => EnsureCurrentTextRun(NewCharIndex); + + + public TextLineBox CurrentLine => _currentLine; // - protected void SetCurrentTextRun(Run r) => _currentTextRun = r; + Run CurrentTextRun => _currentTextRun; + + bool _needUpdateCurrentRun; - protected bool _needUpdateCurrentRun; public void InvalidateCurrentRun() { _currentTextRun = null; @@ -428,8 +179,10 @@ public void InvalidateCurrentRun() } - readonly TextPrinterWordVisitor _wordVisitor = new TextPrinterWordVisitor(); - readonly TextPrinterLineSegmentList _lineSegs = new TextPrinterLineSegmentList(); + readonly LayoutWordVisitor _wordVisitor = new LayoutWordVisitor(); + readonly LineSegmentList _lineSegs = new LineSegmentList(); + + readonly TextBuilder _utf32ArrList = new TextBuilder(); public void FindCurrentHitWord(out int startAt, out int len) { @@ -440,11 +193,25 @@ public void FindCurrentHitWord(out int startAt, out int len) return; } - using (var copyContext = new TempTextLineCopyContext(_currentLine, out Typography.Text.TextBufferSpan textBufferSpan)) + using (new TextUtf32RangeCopyPoolContext(out TextCopyBufferUtf32 output)) { + //copy to int32 arr list + + _currentLine.CopyLineContent(output); + _lineSegs.Clear(); _wordVisitor.SetLineSegmentList(_lineSegs); - Typography.Text.GlobalTextService.TxtClient.BreakToLineSegments(textBufferSpan, _wordVisitor); + + int content_len = output.Length; + + _utf32ArrList.Clear(content_len); + + output.CopyTo(_utf32ArrList); + + Typography.Text.GlobalTextService.TxtClient.BreakToLineSegments( + new Typography.Text.TextBufferSpan(TextBuilder.UnsafeGetInternalArray(_utf32ArrList), + 0, _utf32ArrList.Count), + _wordVisitor); if (_lineSegs.Count == 0) { @@ -456,8 +223,8 @@ public void FindCurrentHitWord(out int startAt, out int len) int segcount = _lineSegs.Count; for (int i = 0; i < segcount; ++i) { - TextPrinterLineSegment seg = _lineSegs.GetLineSegment(i); - if (seg.StartAt + seg.Length >= caret_char_index) + LineSegment seg = _lineSegs.GetLineSegment(i); + if (seg.StartAt + seg.Length >= _caret_NewCharIndex) { //stop at this segment startAt = seg.StartAt; @@ -468,6 +235,7 @@ public void FindCurrentHitWord(out int startAt, out int len) } + //? startAt = 0; len = 0; @@ -486,7 +254,7 @@ bool MoveToPreviousTextRun() _currentTextRun = _currentTextRun.PrevRun; _rCharOffset -= _currentTextRun.CharacterCount; _rPixelOffset -= _currentTextRun.Width; - caret_char_index = _rCharOffset + _currentTextRun.CharacterCount; + _caret_NewCharIndex = _rCharOffset + _currentTextRun.CharacterCount; _caretXPos = _rPixelOffset + _currentTextRun.Width; return true; } @@ -509,45 +277,50 @@ bool MoveToNextTextRun() _rCharOffset += _currentTextRun.CharacterCount; _rPixelOffset += _currentTextRun.Width; _currentTextRun = nextTextRun; - caret_char_index = _rCharOffset; + _caret_NewCharIndex = _rCharOffset; _caretXPos = _rPixelOffset + _currentTextRun.GetRunWidth(0); return true; } return false; } - - - public void MoveToLine(int lineNumber) + public Point CaretPos => new Point(_caretXPos, _currentLine.LineTop); + public void LoadLine(TextLineBox linebox) { - _currentLine = _textFlowLayer.GetTextLine(lineNumber); - _currentLineY = _currentLine.Top; - - //if current line is a blank line - //not first run => currentTextRun= null - _currentTextRun = _currentLine.FirstRun; - _rCharOffset = 0; _rPixelOffset = 0; - caret_char_index = 0; + _caret_NewCharIndex = 0; _caretXPos = 0; + + //move to specific line box + if (linebox != null) + { + _currentLine = linebox; + //if current line is a blank line + //not first run => currentTextRun= null + _currentTextRun = linebox.FirstRun; + } + else + { + _currentLine = null; + + _currentTextRun = null; + } + } - public void CopyContentToStrignBuilder(StringBuilder stBuilder) - { - _textFlowLayer.CopyContentToStringBuilder(stBuilder); - } - public char PrevChar + + public int PrevChar { get { if (_currentTextRun != null) { - if (caret_char_index == 0 && CharCount == 0) + if (_caret_NewCharIndex == 0 && CharCount == 0) { return '\0'; } - if (caret_char_index == _rCharOffset) + if (_caret_NewCharIndex == _rCharOffset) { if (_currentTextRun.PrevRun != null) { @@ -560,7 +333,7 @@ public char PrevChar } else { - return _currentTextRun.GetChar(caret_char_index - _rCharOffset); + return _currentTextRun.GetChar(_caret_NewCharIndex - _rCharOffset); } } else @@ -569,18 +342,18 @@ public char PrevChar } } } - public char NextChar + public int NextChar { get { if (_currentTextRun != null) { - if (caret_char_index == 0 && CharCount == 0) + if (_caret_NewCharIndex == 0 && CharCount == 0) { return '\0'; } - if (caret_char_index == _rCharOffset + _currentTextRun.CharacterCount) + if (_caret_NewCharIndex == _rCharOffset + _currentTextRun.CharacterCount) { if (_currentTextRun.NextRun != null) { @@ -593,7 +366,7 @@ public char NextChar } else { - return _currentTextRun.GetChar(caret_char_index - _rCharOffset); + return _currentTextRun.GetChar(_caret_NewCharIndex - _rCharOffset); } } else @@ -616,7 +389,7 @@ public int NextCharWidth //no text in this line return 0; } - if (caret_char_index == _rCharOffset + _currentTextRun.CharacterCount) + if (_caret_NewCharIndex == _rCharOffset + _currentTextRun.CharacterCount) { //----- //this is on the last of current run @@ -636,8 +409,8 @@ public int NextCharWidth { //in some line - return _currentTextRun.GetRunWidth(caret_char_index - _rCharOffset + 1) - - _currentTextRun.GetRunWidth(caret_char_index - _rCharOffset); + return _currentTextRun.GetRunWidth(_caret_NewCharIndex - _rCharOffset + 1) - + _currentTextRun.GetRunWidth(_caret_NewCharIndex - _rCharOffset); } } else @@ -650,24 +423,23 @@ public int NextCharWidth public EditableVisualPointInfo GetCurrentPointInfo() { #if DEBUG - if (_currentTextRun != null && !_currentTextRun.HasParent) - { - throw new NotSupportedException(); - } - if (_currentTextRun == null) - { - } -#endif + //if (_currentTextRun != null && !_currentTextRun.HasParent) + //{ + // throw new NotSupportedException(); + //} + //if (_currentTextRun == null) + //{ + //} +#endif EditableVisualPointInfo textPointInfo = - new EditableVisualPointInfo(_currentLine, caret_char_index, _currentTextRun); + new EditableVisualPointInfo(_currentLine, _caret_NewCharIndex); textPointInfo.SetAdditionVisualInfo( _rCharOffset, _caretXPos, _rPixelOffset); return textPointInfo; } - public Point CaretPosition => new Point(_caretXPos, _currentLineY); - public char CurrentChar + public int CurrentChar { get { @@ -679,13 +451,13 @@ public char CurrentChar else { //2. - if (_currentTextRun.CharacterCount == caret_char_index - _rCharOffset) + if (_currentTextRun.CharacterCount == _caret_NewCharIndex - _rCharOffset) { //end of this run return '\0'; } - return _currentTextRun.GetChar(caret_char_index - _rCharOffset); + return _currentTextRun.GetChar(_caret_NewCharIndex - _rCharOffset); } } } @@ -694,22 +466,22 @@ public char CurrentChar // public int CurrentTextRunPixelOffset => _rPixelOffset; // - public int CurrentTextRunCharIndex => caret_char_index - _rCharOffset - 1; + // /// /// try set caret x pos to nearest request value /// /// - public void TrySetCaretPos(int xpos, int ypos) + public void TrySetCaretPos(int xpos) { //-------- - _textFlowLayer.LatestHitRun = null; + //_textFlowLayer.LatestHitRun = null; //-------- if (_currentTextRun == null) { - caret_char_index = 0; + _caret_NewCharIndex = 0; _caretXPos = 0; _rCharOffset = 0; _rPixelOffset = 0; @@ -724,12 +496,18 @@ public void TrySetCaretPos(int xpos, int ypos) if (_rPixelOffset + thisTextRunPixelLength > xpos) { CharLocation foundLocation = Run.InnerGetCharacterFromPixelOffset(_currentTextRun, xpos - _rPixelOffset); +#if DEBUG + if ((foundLocation.RunCharIndex % 2) != 0) + { + + } +#endif _caretXPos = _rPixelOffset + foundLocation.pixelOffset; - caret_char_index = _rCharOffset + foundLocation.RunCharIndex; + _caret_NewCharIndex = _rCharOffset + foundLocation.RunCharIndex; //for solid text run //we can send some event to it - _textFlowLayer.LatestHitRun = _currentTextRun; + //_textFlowLayer.LatestHitRun = _currentTextRun; //if (foundLocation.charIndex == -1) //{ // if (!(MoveToPreviousTextRun())) @@ -748,7 +526,7 @@ public void TrySetCaretPos(int xpos, int ypos) } while (MoveToNextTextRun()); //to the last _caretXPos = _rPixelOffset + _currentTextRun.Width; - caret_char_index = _rCharOffset + _currentTextRun.CharacterCount; + _caret_NewCharIndex = _rCharOffset + _currentTextRun.CharacterCount; return; } else if (pixDiff < 0) @@ -759,13 +537,13 @@ public void TrySetCaretPos(int xpos, int ypos) { CharLocation foundLocation = Run.InnerGetCharacterFromPixelOffset(_currentTextRun, xpos - _rPixelOffset); _caretXPos = _rPixelOffset + foundLocation.pixelOffset; - caret_char_index = _rCharOffset + foundLocation.RunCharIndex; + _caret_NewCharIndex = _rCharOffset + foundLocation.RunCharIndex; //for solid text run //we can send some event to it - _textFlowLayer.LatestHitRun = _currentTextRun; + //_textFlowLayer.LatestHitRun = _currentTextRun; //if (foundLocation.charIndex == -1) //{ // if (!MoveToPreviousTextRun()) @@ -783,25 +561,22 @@ public void TrySetCaretPos(int xpos, int ypos) } } while (MoveToPreviousTextRun());// _caretXPos = 0; - caret_char_index = 0; + _caret_NewCharIndex = 0; return; } } // public int CaretXPos => _caretXPos; // - public int CharIndex => caret_char_index; - // - int InternalCharIndex => caret_char_index; - // - public void SetCurrentCharStepRight() => SetCurrentCharIndex(InternalCharIndex + 1); - - public void SetCurrentCharStepLeft() => SetCurrentCharIndex(InternalCharIndex - 1); + public int NewCharIndex => _caret_NewCharIndex; public void SetCurrentCharIndexToEnd() => SetCurrentCharIndex(this.CharCount); public void SetCurrentCharIndexToBegin() => SetCurrentCharIndex(0); - + public void SetCurrentTextRunToLast() + { + _currentTextRun = _currentLine.LastRun; + } public void SetCurrentCharIndex2(int newCharIndexPointTo) { @@ -817,29 +592,23 @@ public void SetCurrentCharIndex2(int newCharIndexPointTo) throw new NotSupportedException("index out of range"); } + _caret_NewCharIndex = 0; + _caretXPos = 0; + _rCharOffset = 0; + _rPixelOffset = 0; + _currentTextRun = _currentLine.FirstRun; - if (newCharIndexPointTo == 0) - { - caret_char_index = 0; - _caretXPos = 0; - _rCharOffset = 0; - _rPixelOffset = 0; - _currentTextRun = _currentLine.FirstRun; - } - else + + if (newCharIndexPointTo > 0) { - caret_char_index = 0; - _caretXPos = 0; - _rCharOffset = 0; - _rPixelOffset = 0; - _currentTextRun = _currentLine.FirstRun; + //always search from begin do { if (_rCharOffset + _currentTextRun.CharacterCount >= newCharIndexPointTo) { - caret_char_index = newCharIndexPointTo; - _caretXPos = _rPixelOffset + _currentTextRun.GetRunWidth(caret_char_index - _rCharOffset); + _caret_NewCharIndex = newCharIndexPointTo; + _caretXPos = _rPixelOffset + _currentTextRun.GetRunWidth(_caret_NewCharIndex - _rCharOffset); #if DEBUG if (dbugTextManRecorder != null) { @@ -851,66 +620,9 @@ public void SetCurrentCharIndex2(int newCharIndexPointTo) } // } while (MoveToNextTextRun()); - caret_char_index = _rCharOffset + _currentTextRun.CharacterCount; + _caret_NewCharIndex = _rCharOffset + _currentTextRun.CharacterCount; _caretXPos = _rPixelOffset + _currentTextRun.Width; return; - - // int diff = newCharIndexPointTo - caret_char_index; - // switch (diff) - // { - // case 0: - // { - // return; - // } - - // default: - // { - // if (diff > 0) - // { - // do - // { - // if (_rCharOffset + _currentTextRun.CharacterCount >= newCharIndexPointTo) - // { - // caret_char_index = newCharIndexPointTo; - // _caretXPos = _rPixelOffset + _currentTextRun.GetRunWidth(caret_char_index - _rCharOffset); - //#if DEBUG - // if (dbugTextManRecorder != null) - // { - // dbugTextManRecorder.EndContext(); - // } - //#endif - - // return; - // } - // // - // } while (MoveToNextTextRun()); - // caret_char_index = _rCharOffset + _currentTextRun.CharacterCount; - // _caretXPos = _rPixelOffset + _currentTextRun.Width; - // return; - // } - // else - // { - // do - // { - // if (_rCharOffset - 1 < newCharIndexPointTo) - // { - // caret_char_index = newCharIndexPointTo; - // _caretXPos = _rPixelOffset + _currentTextRun.GetRunWidth(caret_char_index - _rCharOffset); - //#if DEBUG - // if (dbugTextManRecorder != null) - // { - // dbugTextManRecorder.EndContext(); - // } - //#endif - // return; - // } - // } while (MoveToPreviousTextRun()); - // caret_char_index = 0; - // _caretXPos = 0; - // } - // } - // break; - // } } #if DEBUG if (dbugTextManRecorder != null) @@ -920,6 +632,7 @@ public void SetCurrentCharIndex2(int newCharIndexPointTo) #endif } + public void SetCurrentCharIndex(int newCharIndexPointTo) { @@ -932,13 +645,15 @@ public void SetCurrentCharIndex(int newCharIndexPointTo) #endif if (newCharIndexPointTo < 0 || newCharIndexPointTo > _currentLine.CharCount()) { - throw new NotSupportedException("index out of range"); + System.Diagnostics.Debugger.Break(); + return; + // throw new NotSupportedException("index out of range"); } if (newCharIndexPointTo == 0) { - caret_char_index = 0; + _caret_NewCharIndex = 0; _caretXPos = 0; _rCharOffset = 0; _rPixelOffset = 0; @@ -946,14 +661,11 @@ public void SetCurrentCharIndex(int newCharIndexPointTo) } else { - int diff = newCharIndexPointTo - caret_char_index; + int diff = newCharIndexPointTo - _caret_NewCharIndex; switch (diff) { case 0: - { - return; - } - + return; default: { if (diff > 0) @@ -962,8 +674,8 @@ public void SetCurrentCharIndex(int newCharIndexPointTo) { if (_rCharOffset + _currentTextRun.CharacterCount >= newCharIndexPointTo) { - caret_char_index = newCharIndexPointTo; - _caretXPos = _rPixelOffset + _currentTextRun.GetRunWidth(caret_char_index - _rCharOffset); + _caret_NewCharIndex = newCharIndexPointTo; + _caretXPos = _rPixelOffset + _currentTextRun.GetRunWidth(_caret_NewCharIndex - _rCharOffset); #if DEBUG if (dbugTextManRecorder != null) { @@ -975,7 +687,7 @@ public void SetCurrentCharIndex(int newCharIndexPointTo) } // } while (MoveToNextTextRun()); - caret_char_index = _rCharOffset + _currentTextRun.CharacterCount; + _caret_NewCharIndex = _rCharOffset + _currentTextRun.CharacterCount; _caretXPos = _rPixelOffset + _currentTextRun.Width; return; } @@ -985,8 +697,8 @@ public void SetCurrentCharIndex(int newCharIndexPointTo) { if (_rCharOffset - 1 < newCharIndexPointTo) { - caret_char_index = newCharIndexPointTo; - _caretXPos = _rPixelOffset + _currentTextRun.GetRunWidth(caret_char_index - _rCharOffset); + _caret_NewCharIndex = newCharIndexPointTo; + _caretXPos = _rPixelOffset + _currentTextRun.GetRunWidth(_caret_NewCharIndex - _rCharOffset); #if DEBUG if (dbugTextManRecorder != null) { @@ -996,7 +708,7 @@ public void SetCurrentCharIndex(int newCharIndexPointTo) return; } } while (MoveToPreviousTextRun()); - caret_char_index = 0; + _caret_NewCharIndex = 0; _caretXPos = 0; } } @@ -1013,37 +725,18 @@ public void SetCurrentCharIndex(int newCharIndexPointTo) } // - public bool IsOnEndOfLine => caret_char_index == _currentLine.CharCount(); - // - internal TextLineBox GetTextLine(int lineId) => TextLayer.GetTextLine(lineId); - // - internal TextLineBox GetTextLineAtPos(int y) => TextLayer.GetTextLineAtPos(y); - // - public int LineCount => TextLayer.LineCount; - // + public bool IsOnEndOfLine => _caret_NewCharIndex == _currentLine.CharCount(); + public bool HasNextLine => _currentLine.Next != null; - // + public bool HasPrevLine => _currentLine.Prev != null; - // - public bool IsOnStartOfLine => InternalCharIndex == 0; - // - public int CharCount => _currentLine.CharCount(); - // - public void CopyLineContent(StringBuilder stBuilder) => _currentLine.CopyLineContent(stBuilder); - // - public void CopySelectedTextRuns(VisualSelectionRange selectionRange, TextRangeCopy output) => _currentLine.Copy(selectionRange, output); + public bool IsOnStartOfLine => _caret_NewCharIndex == 0; - // - public int LineNumber => _currentLine.LineNumber; - // - public void MoveToNextLine() => MoveToLine(_currentLine.LineNumber + 1); + public int CharCount => _currentLine.CharCount(); - public void MoveToPrevLine() => MoveToLine(_currentLine.LineNumber - 1); + public int LineNumber => _currentLine.LineNumber; - // public Rectangle LineArea => _currentLine.ActualLineArea; - - internal TextFlowLayer TextLayer => _currentLine.OwnerFlowLayer; } } \ No newline at end of file diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/TextRangeCopy.cs b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/TextRangeCopy.cs deleted file mode 100644 index cbfb28563..000000000 --- a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/TextRangeCopy.cs +++ /dev/null @@ -1,90 +0,0 @@ -//Apache2, 2014-present, WinterDev - -using System; -using System.Collections.Generic; -using System.Text; - -namespace LayoutFarm.TextEditing -{ - public enum RunKind : byte - { - Text, - Image, - Solid - } - - public class CopyRun - { - public RunKind RunKind { get; set; } - public char[] RawContent { get; set; } - - public CopyRun(char[] rawContent) - { - RawContent = rawContent; - } - - public int CharacterCount - { - get - { - switch (RunKind) - { - case RunKind.Image: - case RunKind.Solid: return 1; - case RunKind.Text: - return RawContent.Length; - default: throw new NotSupportedException(); - } - } - } - } - - public class TextRangeCopy - { - - //TODO: review this again - //use PlainTextDocument - StringBuilder _stbuilder = new StringBuilder(); - public void AppendNewLine() - { - //push content of current line - //into plain doc - _stbuilder.AppendLine(); - } - public IEnumerable GetLineIter() - { - //TODO: review this again - using (System.IO.StringReader reader = new System.IO.StringReader(_stbuilder.ToString())) - { - string line = reader.ReadLine(); - while (line != null) - { - yield return line; - line = reader.ReadLine(); - } - } - } - public void CopyContentToStringBuilder(StringBuilder stbuilder) - { - char[] buff = new char[_stbuilder.Length]; - _stbuilder.CopyTo(0, buff, 0, buff.Length); - stbuilder.Append(buff); - } - - public bool HasSomeRuns => _stbuilder.Length > 0; - - /// - /// this will copy content of this run - /// - /// - public void AppendRun(Run run) - { - run.WriteTo(_stbuilder); - } - public void AppendRun(CopyRun run) - { - _stbuilder.Append(run.RawContent); - } - - } -} \ No newline at end of file diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/debugActivityRecorder.cs b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/debugActivityRecorder.cs index c743ad795..1f3e7b249 100644 --- a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/debugActivityRecorder.cs +++ b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.2_Lines/debugActivityRecorder.cs @@ -2,7 +2,7 @@ using System; using System.IO; -namespace LayoutFarm.TextEditing +namespace LayoutFarm.TextFlow { #if DEBUG class dbugCoreConst diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.3_Layer/ITextFlowOwner.cs b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.3_Layer/ITextFlowOwner.cs index 9242ff3ba..005039995 100644 --- a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.3_Layer/ITextFlowOwner.cs +++ b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.3_Layer/ITextFlowOwner.cs @@ -2,11 +2,12 @@ using System; using PixelFarm.Drawing; -namespace LayoutFarm.TextEditing +namespace LayoutFarm.TextFlow { public interface ITextFlowLayerOwner { int Width { get; } + int Height { get; } void ClientLayerBubbleUpInvalidateArea(Rectangle clientInvalidatedArea); } diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.3_Layer/RunVisitor.cs b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.3_Layer/RunVisitor.cs index 615b1ffdb..06e1b2c15 100644 --- a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.3_Layer/RunVisitor.cs +++ b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.3_Layer/RunVisitor.cs @@ -2,7 +2,7 @@ using System; using PixelFarm.Drawing; -namespace LayoutFarm.TextEditing +namespace LayoutFarm.TextFlow { public class RunVisitor { diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.3_Layer/TextFlowLayer.cs b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.3_Layer/TextFlowLayer.cs index 96c312892..16acb47e9 100644 --- a/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.3_Layer/TextFlowLayer.cs +++ b/src/PixelFarm/PaintLab.RenderTree.TextSurface/1.3_Layer/TextFlowLayer.cs @@ -2,10 +2,11 @@ using System; using System.Collections.Generic; -using System.Text; using PixelFarm.Drawing; using LayoutFarm.RenderBoxes; -namespace LayoutFarm.TextEditing +using Typography.Text; +using LayoutFarm.TextFlow; +namespace LayoutFarm.TextFlow { class TextMarkerLayer { @@ -35,30 +36,36 @@ public enum LineHeightHint : byte VaryLineHeight } + /// + /// visual multi-line text layer (presentation) + /// sealed class TextFlowLayer { - //TextFlowLayer: contains and manages collection of TextLineBox - //public event EventHandler Reflow; //TODO: review this field - public event EventHandler ContentSizeChanged;//TODO: review this field - //TODO: use linked-list or tree for lines?? - List _lines = new List(); - ITextFlowLayerOwner _owner; + //TODO: use tree for lines + readonly List _lines = new List(); + readonly ITextFlowLayerOwner _owner; + internal PlainTextDocument _plainText; + + int _posCalContentW; + int _posCalContentH; public TextFlowLayer(ITextFlowLayerOwner owner, RunStyle defaultSpanStyle) { _owner = owner; + _plainText = new PlainTextDocument(""); //start with single line per layer //and can be changed to multiline DefaultRunStyle = defaultSpanStyle; - - //add default lines - _lines.Add(new TextLineBox(this)); - VisualLineOverlapped = true; + //add default lines } + + + public ForwardOnlyCharSource CharSource => _plainText.CharSource; + public LineHeightHint LineHeightHint { get; set; } //help on hit test, find line from y pos /// @@ -66,6 +73,7 @@ public TextFlowLayer(ITextFlowLayerOwner owner, RunStyle defaultSpanStyle) /// public bool VisualLineOverlapped { get; set; } public int OwnerWidth => _owner.Width; + public int OwnerHeight => _owner.Height; public RunStyle DefaultRunStyle { get; private set; } @@ -78,6 +86,18 @@ internal void ClientLineBubbleupInvalidateArea(Rectangle clientInvalidatedArea) _owner.ClientLayerBubbleUpInvalidateArea(clientInvalidatedArea); } + public void AppendNewLine(TextLineBox linebox) + { + int ypos = 0; + if (_lines.Count > 0) + { + ypos = _lines[_lines.Count - 1].LineBottom; + } + + linebox.SetLineNumber(_lines.Count); + linebox.SetTop(ypos); + _lines.Add(linebox); + } public int DefaultLineHeight => DefaultRunStyle.ResolvedFont.LineSpacingInPixels; internal void NotifyContentSizeChanged() => ContentSizeChanged?.Invoke(this, EventArgs.Empty); @@ -251,7 +271,6 @@ internal void DrawChildContentLcdEffectText(DrawBoard d, UpdateArea updateArea, { if (linetop > renderAreaBottom) { - if (VisualLineOverlapped) { //more check @@ -277,11 +296,39 @@ internal void DrawChildContentLcdEffectText(DrawBoard d, UpdateArea updateArea, switch (selRange.GetLineClip(i, out int clipLeft, out int clipWidth)) { default: throw new NotSupportedException(); - case VisualSelectionRange.ClipRectKind.No: break; + case VisualSelectionRange.ClipRectKind.No: + { + ////[A]: normal line + d.SetCanvasOrigin(enter_canvasX, enter_canvasY + linetop);//restore + d.SetClipRect(new Rectangle(0, 0, OwnerWidth, line.ActualLineHeight));//set clip relative to latest canvas origin + d.TextBackgroundColorHint = prev_colorHint;//normal bg + + LinkedListNode curLineNode = line.First; + while (curLineNode != null) + { + Run run = curLineNode.Value; + if (run.HitTest(updateArea)) + { + int x = run.Left; + + d.SetCanvasOrigin(enter_canvasX + x, enter_canvasY + linetop); + updateArea.OffsetX(-x); + + run.Draw(d, updateArea); + //----------- + updateArea.OffsetX(x); + } + curLineNode = curLineNode.Next; + } + d.SetCanvasOrigin(enter_canvasX, enter_canvasY + linetop);//restore + } + break; case VisualSelectionRange.ClipRectKind.SameLine: case VisualSelectionRange.ClipRectKind.StartLine: { - + d.SetCanvasOrigin(enter_canvasX, enter_canvasY + linetop);//restore + d.SetClipRect(new Rectangle(0, 0, OwnerWidth, line.ActualLineHeight));//set clip relative to latest canvas origin + d.TextBackgroundColorHint = prev_colorHint;//normal bg //[A]: normal line LinkedListNode curLineNode = line.First; while (curLineNode != null) @@ -532,8 +579,7 @@ public bool HitTestCore(HitChain hitChain) return false; } - int _posCalContentW; - int _posCalContentH; + public void TopDownReCalculateContentSize() { #if DEBUG @@ -562,10 +608,20 @@ public int Bottom } } - internal TextLineBox GetTextLine(int lineId) => (lineId < _lines.Count) ? _lines[lineId] : null; + internal TextLineBox GetTextLine(int lineId) + { + if (lineId < 0) + { + //WHY? + throw new NotSupportedException(); + } + + return (lineId < _lines.Count) ? _lines[lineId] : null; + } internal TextLineBox GetTextLineAtPos(int y) { + //TODO: review this again List lines = _lines; if (lines != null) { @@ -593,8 +649,8 @@ internal TextLineBox GetTextLineAtPos(int y) } else { - //vary, - //TODO: use HeightTree? + //TODO: if lines is not overlapped + //we can use binary search int j = lines.Count; for (int i = 0; i < j; ++i) @@ -669,19 +725,10 @@ void InsertLine(int insertAt, TextLineBox textLine) } } - public void CopyContentToStringBuilder(StringBuilder stBuilder) + public void CopyContent(TextCopyBufferUtf32 output) { - List lines = _lines; - int j = lines.Count; - for (int i = 0; i < j; ++i) - { - if (i > 0) - { - //TODO: review => preserve line ending char or not - stBuilder.AppendLine(); - } - lines[i].CopyLineContent(stBuilder); - } + //throw new + throw new NotSupportedException(); } internal IEnumerable TextRunForward(Run startRun, Run stopRun) @@ -730,8 +777,11 @@ internal IEnumerable TextRunForward(Run startRun, Run stopRun) } } } + public void Clear() { + + //clear all -visual presentation List lines = _lines; for (int i = lines.Count - 1; i > -1; --i) { @@ -741,8 +791,8 @@ public void Clear() } lines.Clear(); - //auto add first line - _lines.Add(new TextLineBox(this)); + lines.Add(new TextLineBox(this)); + } internal void Remove(int lineId) @@ -753,16 +803,52 @@ internal void Remove(int lineId) throw new NotSupportedException(); } #endif - //if ((_layerFlags & FLOWLAYER_HAS_MULTILINE) == 0) - //{ - // return; - //} + + List lines = _lines; + if (lines.Count < 2) + { + return;//only 1 line + } + + TextLineBox removedLine = lines[lineId]; + int cy = removedLine.Top; + // + lines.RemoveAt(lineId); + removedLine.RemoveOwnerFlowLayer(); + + //arrange + int j = lines.Count; + for (int i = lineId; i < j; ++i) + { + TextLineBox line = lines[i]; + line.SetTop(cy); + line.SetLineNumber(i); + cy += line.ActualLineHeight; + } + } + internal void Remove(int lineId, int count) + { +#if DEBUG + if (lineId < 0) + { + throw new NotSupportedException(); + } +#endif + if (count < 1) { return; } + List lines = _lines; if (lines.Count < 2) { - return; + return;//only 1 line + } + + for (int i = lineId + count; i >= lineId; --i) + { + TextLineBox selectedLine = lines[lineId]; + lines.RemoveAt(i); } + TextLineBox removedLine = lines[lineId]; int cy = removedLine.Top; // diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.1_MultiLineController/DocumentActions.cs b/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.1_MultiLineController/DocumentActions.cs deleted file mode 100644 index 5936f9597..000000000 --- a/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.1_MultiLineController/DocumentActions.cs +++ /dev/null @@ -1,385 +0,0 @@ -//Apache2, 2014-present, WinterDev - -using System; -using System.Collections.Generic; - -namespace LayoutFarm.TextEditing.Commands -{ - public enum DocumentActionName - { - CharTyping, - SplitToNewLine, - JointWithNextLine, - DeleteChar, - DeleteRange, - InsertRuns, - FormatDocument - } - public interface ITextFlowSelectSession - { - int CurrentLineNumber { get; set; } - void StartSelect(); - void EndSelect(); - void CancelSelect(); - } - public interface ITextFlowEditSession : ITextFlowSelectSession - { - - void TryMoveCaretTo(int charIndex, bool backward = false); - bool DoBackspace(); - void AddCharToCurrentLine(char c); - VisualSelectionRangeSnapShot DoDelete(); - void DoEnd(); - void DoHome(); - void SplitCurrentLineIntoNewLine(); - void AddTextRunsToCurrentLine(TextRangeCopy copy); - void AddTextRunToCurrentLine(CopyRun copy); - } - - public enum ChangeRegion - { - Line, - LineRange, - AllLines, - } - public abstract class DocumentAction - { - public abstract DocumentActionName Name { get; } - protected int _startLineNumber; - protected int _startCharIndex; - public DocumentAction(int lineNumber, int charIndex) - { - _startLineNumber = lineNumber; - _startCharIndex = charIndex; - EndLineNumber = _startLineNumber;//default - } - public abstract ChangeRegion ChangeRegion { get; } - public int StartLineNumber => _startLineNumber; - public int StartCharIndex => _startCharIndex; - public int EndLineNumber { get; protected set; } - public abstract void InvokeUndo(ITextFlowEditSession editSess); - public abstract void InvokeRedo(ITextFlowEditSession editSess); - } - - public class DocActionCharTyping : DocumentAction - { - readonly char _c; - public DocActionCharTyping(char c, int lineNumber, int charIndex) - : base(lineNumber, charIndex) - { - _c = c; - } - public override ChangeRegion ChangeRegion => ChangeRegion.Line; - public char Char => _c; - public override DocumentActionName Name => DocumentActionName.CharTyping; - public override void InvokeUndo(ITextFlowEditSession editSess) - { - editSess.CurrentLineNumber = _startLineNumber; - editSess.TryMoveCaretTo(_startCharIndex); - editSess.DoBackspace(); - } - public override void InvokeRedo(ITextFlowEditSession editSess) - { - editSess.CurrentLineNumber = _startLineNumber; - editSess.TryMoveCaretTo(_startCharIndex); - editSess.AddCharToCurrentLine(_c); - } - } - - public class DocActionSplitToNewLine : DocumentAction - { - public DocActionSplitToNewLine(int lineNumber, int charIndex) - : base(lineNumber, charIndex) - { - } - public override ChangeRegion ChangeRegion => ChangeRegion.LineRange; - public override DocumentActionName Name => DocumentActionName.SplitToNewLine; - public override void InvokeUndo(ITextFlowEditSession editSess) - { - editSess.CurrentLineNumber = _startLineNumber; - editSess.DoEnd(); - editSess.DoDelete(); - } - public override void InvokeRedo(ITextFlowEditSession editSess) - { - editSess.CurrentLineNumber = _startLineNumber; - editSess.TryMoveCaretTo(_startCharIndex); - editSess.SplitCurrentLineIntoNewLine(); - } - } - public class DocActionJoinWithNextLine : DocumentAction - { - public DocActionJoinWithNextLine(int lineNumber, int charIndex) - : base(lineNumber, charIndex) - { - } - public override ChangeRegion ChangeRegion => ChangeRegion.LineRange; - public override DocumentActionName Name => DocumentActionName.JointWithNextLine; - public override void InvokeUndo(ITextFlowEditSession editSess) - { - editSess.CurrentLineNumber = _startLineNumber; - editSess.TryMoveCaretTo(_startCharIndex); - editSess.SplitCurrentLineIntoNewLine(); - } - public override void InvokeRedo(ITextFlowEditSession editSess) - { - editSess.CurrentLineNumber = _startLineNumber; - editSess.TryMoveCaretTo(_startCharIndex); - editSess.DoDelete(); - } - } - - - public class DocActionDeleteChar : DocumentAction - { - readonly char _c; - public DocActionDeleteChar(char c, int lineNumber, int editSess) - : base(lineNumber, editSess) - { - _c = c; - } - public char Char => _c; - public override ChangeRegion ChangeRegion => ChangeRegion.Line; - public override DocumentActionName Name => DocumentActionName.DeleteChar; - public override void InvokeUndo(ITextFlowEditSession editSess) - { - editSess.CurrentLineNumber = _startLineNumber; - editSess.TryMoveCaretTo(_startCharIndex); - editSess.AddCharToCurrentLine(_c); - } - public override void InvokeRedo(ITextFlowEditSession editSess) - { - editSess.CurrentLineNumber = _startLineNumber; - editSess.TryMoveCaretTo(_startCharIndex); - editSess.DoDelete(); - } - } - public class DocActionDeleteRange : DocumentAction - { - TextRangeCopy _deletedTextRuns; - readonly int _endCharIndex; - public DocActionDeleteRange(TextRangeCopy deletedTextRuns, int startLineNum, int startColumnNum, - int endLineNum, int endColumnNum) - : base(startLineNum, startColumnNum) - { - _deletedTextRuns = deletedTextRuns; - _endCharIndex = endColumnNum; - EndLineNumber = endLineNum; - } - public override ChangeRegion ChangeRegion => ChangeRegion.LineRange; - public int EndCharIndex => _endCharIndex; - public override DocumentActionName Name => DocumentActionName.DeleteRange; - public override void InvokeUndo(ITextFlowEditSession editSess) - { - editSess.CancelSelect(); - //add text to lines... - //TODO: check if we need to preserve format or not? - editSess.AddTextRunsToCurrentLine(_deletedTextRuns); - } - public override void InvokeRedo(ITextFlowEditSession editSess) - { - editSess.CurrentLineNumber = _startLineNumber; - editSess.TryMoveCaretTo(_startCharIndex); - editSess.StartSelect(); - editSess.CurrentLineNumber = EndLineNumber; - editSess.TryMoveCaretTo(_endCharIndex); - editSess.EndSelect(); - editSess.DoDelete(); - } - } - - public class DocActionInsertRuns : DocumentAction - { - CopyRun _singleInsertTextRun; - TextRangeCopy _insertingTextRuns; - - int _endCharIndex; - public DocActionInsertRuns(TextRangeCopy insertingTextRuns, - int startLineNumber, int startCharIndex, int endLineNumber, int endCharIndex) - : base(startLineNumber, startCharIndex) - { - _insertingTextRuns = insertingTextRuns; - _endCharIndex = endCharIndex; - EndLineNumber = endLineNumber; - } - public DocActionInsertRuns(CopyRun insertingTextRun, - int startLineNumber, int startCharIndex, int endLineNumber, int endCharIndex) - : base(startLineNumber, startCharIndex) - { - _singleInsertTextRun = insertingTextRun; - EndLineNumber = endLineNumber; - _endCharIndex = endCharIndex; - } - public void CopyContent(System.Text.StringBuilder output) - { - if (_singleInsertTextRun != null) - { - output.Append(_singleInsertTextRun.RawContent); - } - else - { - _insertingTextRuns.CopyContentToStringBuilder(output); - } - } - - public int EndCharIndex => _endCharIndex; - public override ChangeRegion ChangeRegion => ChangeRegion.LineRange; - public override DocumentActionName Name => DocumentActionName.InsertRuns; - public override void InvokeUndo(ITextFlowEditSession editSess) - { - editSess.CurrentLineNumber = _startLineNumber; - editSess.TryMoveCaretTo(_startCharIndex); - editSess.StartSelect(); - editSess.CurrentLineNumber = EndLineNumber; - editSess.TryMoveCaretTo(_endCharIndex); - editSess.EndSelect(); - editSess.DoDelete(); - } - public override void InvokeRedo(ITextFlowEditSession editSess) - { - editSess.CurrentLineNumber = _startLineNumber; - editSess.TryMoveCaretTo(_startCharIndex); - if (_singleInsertTextRun != null) - { - editSess.AddTextRunToCurrentLine(_singleInsertTextRun); - } - else - { - editSess.AddTextRunsToCurrentLine(_insertingTextRuns); - } - } - } - public class DocActionFormatting : DocumentAction - { - - int _endCharIndex; - TextSpanStyle _textStyle; - public DocActionFormatting(TextSpanStyle textStyle, int startLineNumber, int startCharIndex, int endLineNumber, int endCharIndex) - : base(startLineNumber, startCharIndex) - { - _textStyle = textStyle; - _endCharIndex = endCharIndex; - EndLineNumber = endLineNumber; - } - public int EndCharIndex => _endCharIndex; - public override ChangeRegion ChangeRegion => ChangeRegion.LineRange; - public override DocumentActionName Name => DocumentActionName.FormatDocument; - public override void InvokeUndo(ITextFlowEditSession editSess) - { - editSess.CurrentLineNumber = _startLineNumber; - editSess.TryMoveCaretTo(_startCharIndex); - editSess.StartSelect(); - editSess.CurrentLineNumber = EndLineNumber; - editSess.TryMoveCaretTo(_endCharIndex); - editSess.EndSelect(); - } - public override void InvokeRedo(ITextFlowEditSession editSess) - { - } - } - - class DocumentCommandCollection - { - LinkedList _undoList = new LinkedList(); - Stack _reverseUndoAction = new Stack(); - int _maxCommandsCount = 20; - TextFlowEditSession _editSession; - - public DocumentCommandCollection(TextFlowEditSession textEditSession) - { - _editSession = textEditSession; - } - public void Clear() - { - _undoList.Clear(); - _reverseUndoAction.Clear(); - } - - public int MaxCommandCount - { - get - { - return _maxCommandsCount; - } - set - { - _maxCommandsCount = value; - if (_undoList.Count > _maxCommandsCount) - { - int diff = _undoList.Count - _maxCommandsCount; - for (int i = 0; i < diff; i++) - { - _undoList.RemoveFirst(); - } - } - } - } - - public void AddDocAction(DocumentAction docAct) - { - if (_editSession.EnableUndoHistoryRecording) - { - _undoList.AddLast(docAct); - EnsureCapacity(); - } - } - - void EnsureCapacity() - { - if (_undoList.Count > _maxCommandsCount) - { - _undoList.RemoveFirst(); - } - } - public void UndoLastAction() - { - DocumentAction docAction = PopUndoCommand(); - if (docAction != null) - { - _editSession.EnableUndoHistoryRecording = false; - _editSession.UndoMode = true; - - docAction.InvokeUndo(_editSession); - //sync content ... - _editSession.EnableUndoHistoryRecording = true; - _editSession.UndoMode = false; - _reverseUndoAction.Push(docAction); - } - } - public void ReverseLastUndoAction() - { - if (_reverseUndoAction.Count > 0) - { - - _editSession.EnableUndoHistoryRecording = false; - _editSession.UndoMode = true; - - DocumentAction docAction = _reverseUndoAction.Pop(); - - _editSession.UndoMode = false; - _editSession.EnableUndoHistoryRecording = true; - - docAction.InvokeRedo(_editSession); - _undoList.AddLast(docAction); - } - } - - public DocumentAction PeekCommand => _undoList.Last.Value; - - public int Count => _undoList.Count; - - public DocumentAction PopUndoCommand() - { - if (_undoList.Count > 0) - { - DocumentAction lastCmd = _undoList.Last.Value; - _undoList.RemoveLast(); - return lastCmd; - } - else - { - return null; - } - } - } -} \ No newline at end of file diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.1_MultiLineController/TextFlowEditSession.cs b/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.1_MultiLineController/TextFlowEditSession.cs deleted file mode 100644 index 8e12c2858..000000000 --- a/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.1_MultiLineController/TextFlowEditSession.cs +++ /dev/null @@ -1,717 +0,0 @@ -//Apache2, 2014-present, WinterDev - -using System; -using System.Collections.Generic; -using System.Text; - -using PixelFarm.Drawing; -using LayoutFarm.TextEditing.Commands; - -namespace LayoutFarm.TextEditing -{ - public class TextFlowEditSessionListener - { - public TextFlowEditSessionListener() - { - } - internal void AddCharacterToCurrentLine(char c, int lineNumber, int charIndex) - { - AddDocAction(new DocActionCharTyping(c, lineNumber, charIndex)); - } - public virtual void AddDocAction(DocumentAction docAction) - { - } - public virtual void UpdateLineContent(int lineNumber) - { - } - } - - public class TextFlowEditSession : TextFlowSelectSession, ITextFlowEditSession - { - - internal bool _updateJustCurrentLine = true; - bool _enableUndoHistoryRecording = true; - TextMarkerLayer _textMarkerLayer; - DocumentCommandCollection _commandHistoryList; - TextFlowEditSessionListener _sessionListener; - - internal TextFlowEditSession(TextFlowLayer textLayer) : base(textLayer) - { - //and record editing hx, support undo-redo - _commandHistoryList = new DocumentCommandCollection(this); -#if DEBUG - if (dbugEnableTextManRecorder) - { - _dbugActivityRecorder = new debugActivityRecorder(); - _lineEditor.dbugTextManRecorder = _dbugActivityRecorder; - throw new NotSupportedException(); - _dbugActivityRecorder.Start(null); - } -#endif - - } - protected void NotifyContentSizeChanged() - { - _textLayer.NotifyContentSizeChanged(); - } - public TextFlowEditSessionListener EditSessionListener - { - get => _sessionListener; - set => _sessionListener = value; - } - - internal void SetMarkerLayer(TextMarkerLayer textMarkerLayer) - { - _textMarkerLayer = textMarkerLayer; - } - - internal bool UndoMode { get; set; } - // - public bool EnableUndoHistoryRecording - { - get => _enableUndoHistoryRecording; - set => _enableUndoHistoryRecording = value; - } - // - public void AddCharToCurrentLine(char c) - { - _updateJustCurrentLine = true; - bool passRemoveSelectedText = false; -#if DEBUG - if (dbugEnableTextManRecorder) - { - _dbugActivityRecorder.WriteInfo("TxLMan::AddCharToCurrentLine " + c); - _dbugActivityRecorder.BeginContext(); - } -#endif - if (SelectionRange != null) - { -#if DEBUG - if (dbugEnableTextManRecorder) - { - _dbugActivityRecorder.WriteInfo(SelectionRange); - } -#endif - VisualSelectionRangeSnapShot removedRange = RemoveSelectedText(); - passRemoveSelectedText = true; - } - - int pre_lineNumber = _lineEditor.LineNumber; - int pre_charIndex = _lineEditor.CharIndex; - - - if (passRemoveSelectedText && c == ' ') - { - - } - else - { - if (!_lineEditor.CanAcceptThisChar(c)) - { - return; - } - //recrod - _commandHistoryList.AddDocAction( - new DocActionCharTyping(c, pre_lineNumber, pre_charIndex)); - } - - _lineEditor.AddCharacter(c); - - _sessionListener?.AddCharacterToCurrentLine(c, pre_lineNumber, pre_charIndex); - -#if DEBUG - if (dbugEnableTextManRecorder) - { - _dbugActivityRecorder.EndContext(); - } -#endif - } - - VisualSelectionRangeSnapShot RemoveSelectedText() - { -#if DEBUG - if (dbugEnableTextManRecorder) - { - _dbugActivityRecorder.WriteInfo("TxLMan::RemoveSelectedText"); - _dbugActivityRecorder.BeginContext(); - } -#endif - - if (_selectionRange == null) - { -#if DEBUG - if (dbugEnableTextManRecorder) - { - _dbugActivityRecorder.WriteInfo("NO_SEL_RANGE"); - _dbugActivityRecorder.EndContext(); - } -#endif - return VisualSelectionRangeSnapShot.Empty; - } - else if (!_selectionRange.IsValid) - { -#if DEBUG - if (dbugEnableTextManRecorder) - { - _dbugActivityRecorder.WriteInfo("!RANGE_ON_SAME_POINT"); - } -#endif - CancelSelect(); -#if DEBUG - if (dbugEnableTextManRecorder) - { - _dbugActivityRecorder.EndContext(); - } -#endif - return VisualSelectionRangeSnapShot.Empty; - } - _selectionRange.SwapIfUnOrder(); - - VisualSelectionRangeSnapShot selSnapshot = _selectionRange.GetSelectionRangeSnapshot(); - VisualPointInfo startPoint = _selectionRange.StartPoint; - CurrentLineNumber = startPoint.LineId; - int preCutIndex = startPoint.LineCharIndex; - _lineEditor.SetCurrentCharIndex(startPoint.LineCharIndex); - - if (_selectionRange.IsOnTheSameLine) - { - var tobeDeleteTextRuns = new TextRangeCopy(); - _lineEditor.CopySelectedTextRuns(_selectionRange, tobeDeleteTextRuns); - - if (tobeDeleteTextRuns.HasSomeRuns) - { - var cmd = new DocActionDeleteRange(tobeDeleteTextRuns, - selSnapshot.startLineNum, - selSnapshot.startColumnNum, - selSnapshot.endLineNum, - selSnapshot.endColumnNum); - - _commandHistoryList.AddDocAction(cmd); - _sessionListener?.AddDocAction(cmd); - - _lineEditor.RemoveSelectedTextRuns(_selectionRange); - _updateJustCurrentLine = true; - } - } - else - { - int startPointLindId = startPoint.LineId; - int startPointCharIndex = startPoint.LineCharIndex; - - var tobeDeleteTextRuns = new TextRangeCopy(); - _lineEditor.CopySelectedTextRuns(_selectionRange, tobeDeleteTextRuns); - - if (tobeDeleteTextRuns != null && tobeDeleteTextRuns.HasSomeRuns) - { - var cmd = new DocActionDeleteRange(tobeDeleteTextRuns, - selSnapshot.startLineNum, - selSnapshot.startColumnNum, - selSnapshot.endLineNum, - selSnapshot.endColumnNum); - - _commandHistoryList.AddDocAction(cmd); - _sessionListener?.AddDocAction(cmd); - - _lineEditor.RemoveSelectedTextRuns(_selectionRange); - _updateJustCurrentLine = false; - - _lineEditor.MoveToLine(startPointLindId); - _lineEditor.SetCurrentCharIndex(startPointCharIndex); - } - } - - CancelSelect(); - //NotifyContentSizeChanged(); -#if DEBUG - if (dbugEnableTextManRecorder) - { - _dbugActivityRecorder.EndContext(); - } -#endif - return selSnapshot; - } - - - - public Run LatestHitRun => _textLayer.LatestHitRun; - void SplitSelectedText() - { - - if (_selectionRange == null) return; - // - SelectionRangeInfo selRangeInfo = _lineEditor.SplitSelectedText(_selectionRange); - //add startPointInfo and EndPoint info to current selection range - _selectionRange.StartPoint = selRangeInfo.start; - _selectionRange.EndPoint = selRangeInfo.end; - } - - public void DoTabOverSelectedRange() - { - //eg. user press 'Tab' key over selected range - VisualSelectionRange selRange = SelectionRange; - if (selRange == null) return; - // - - EditableVisualPointInfo startPoint = selRange.StartPoint; - EditableVisualPointInfo endPoint = selRange.EndPoint; - // - if (!selRange.IsOnTheSameLine) - { - TextLineBox line = startPoint.Line; - TextLineBox end_line = endPoint.Line; - - RunStyle runstyle = _lineEditor.CurrentSpanStyle; - - while (line.LineNumber <= end_line.LineNumber) - { - //TODO, review here... - var whitespace = new TextRun(runstyle, " ".ToCharArray()); - line.AddFirst(whitespace); - line.TextLineReCalculateActualLineSize(); - line.RefreshInlineArrange(); - line = line.Next;//move to next line - } - - return;//finish here - } - - } - public void SplitCurrentLineIntoNewLine() - { - VisualSelectionRangeSnapShot removedRange = RemoveSelectedText(); - - var cmd = new DocActionSplitToNewLine(_lineEditor.LineNumber, _lineEditor.CharIndex); - _commandHistoryList.AddDocAction(cmd); - _sessionListener?.AddDocAction(cmd); - - - _lineEditor.SplitToNewLine(); - CurrentLineNumber++; - _updateJustCurrentLine = false; - // - NotifyContentSizeChanged(); - } - public void AddTextLine(PlainTextLine textline) - { - - //TODO: replace 1 tab with 4 blank spaces? - _updateJustCurrentLine = true; - VisualSelectionRangeSnapShot removedRange = RemoveSelectedText(); - int startLineNum = _lineEditor.LineNumber; - int startCharIndex = _lineEditor.CharIndex; - bool isRecordingHx = EnableUndoHistoryRecording; - EnableUndoHistoryRecording = false; - - //--------------------- - - char[] textbuffer = new char[textline.CharCount]; - textline.CopyText(textbuffer, 0, textbuffer.Length, 0); - - _lineEditor.AddTextSpan(textbuffer); - - CopyRun copyRun = new CopyRun(textbuffer); - EnableUndoHistoryRecording = isRecordingHx; - - var cmd = new DocActionInsertRuns(copyRun, startLineNum, startCharIndex, - _lineEditor.LineNumber, _lineEditor.CharIndex); - _commandHistoryList.AddDocAction(cmd); - _sessionListener?.AddDocAction(cmd); - - _updateJustCurrentLine = false; - // - NotifyContentSizeChanged(); - - } - //public TextSpanStyle GetFirstTextStyleInSelectedRange() - //{ - // //TODO: review here again - // throw new NotSupportedException(); - // //VisualSelectionRange selRange = SelectionRange; - // //if (selRange != null) - // //{ - // // if (_selectionRange.StartPoint.Run != null) - // // { - // // return _selectionRange.StartPoint.Run.SpanStyle; - // // } - // // else - // // { - // // return TextSpanStyle.Empty; - // // } - // //} - // //else - // //{ - // // return TextSpanStyle.Empty; - // //} - //} - public void DoFormatSelection(TextSpanStyle textStyle) - { - //int startLineNum = _textLineWriter.LineNumber; - //int startCharIndex = _textLineWriter.CharIndex; - SplitSelectedText(); - VisualSelectionRange selRange = SelectionRange; - if (selRange != null) - { - RunStyle runstyle = new RunStyle() - { - ReqFont = textStyle.ReqFont, - FontColor = textStyle.FontColor, - ContentHAlign = textStyle.ContentHAlign - }; - - foreach (Run r in selRange.GetPrintableTextRunIter()) - { - r.SetStyle(runstyle); - } - - _updateJustCurrentLine = _selectionRange.IsOnTheSameLine; - CancelSelect(); - //? - //CharIndex++; - //CharIndex--; - } - } - public void DoFormatSelection(TextSpanStyle textStyle, RequestFontStyle toggleFontStyle) - { - ////int startLineNum = _textLineWriter.LineNumber; - ////int startCharIndex = _textLineWriter.CharIndex; - //SplitSelectedText(); - //VisualSelectionRange selRange = SelectionRange; - //if (selRange != null) - //{ - // foreach (EditableRun r in selRange.GetPrintableTextRunIter()) - // { - // RunStyle existingStyle = r.SpanStyle; - // switch (toggleFontStyle) - // { - // case FontStyle.Bold: - // if ((existingStyle.ReqFont.Style & FontStyle.Bold) != 0) - // { - // //change to normal - // RequestFont existingFont = existingStyle.ReqFont; - // RequestFont newReqFont = new RequestFont( - // existingFont.Name, existingFont.SizeInPoints, - // existingStyle.ReqFont.Style & ~FontStyle.Bold); //clear bold - - // RunStyle textStyle2 = new RunStyle(); - // textStyle2.ReqFont = newReqFont; - // textStyle2.ContentHAlign = textStyle.ContentHAlign; - // textStyle2.FontColor = textStyle.FontColor; - // r.SetStyle(textStyle2); - // continue;//go next*** - // } - // break; - // case FontStyle.Italic: - // if ((existingStyle.ReqFont.Style & FontStyle.Italic) != 0) - // { - // //change to normal - // RequestFont existingFont = existingStyle.ReqFont; - // RequestFont newReqFont = new RequestFont( - // existingFont.Name, existingFont.SizeInPoints, - // existingStyle.ReqFont.Style & ~FontStyle.Italic); //clear italic - - // TextSpanStyle textStyle2 = new TextSpanStyle(); - // textStyle2.ReqFont = newReqFont; - // textStyle2.ContentHAlign = textStyle.ContentHAlign; - // textStyle2.FontColor = textStyle.FontColor; - // r.SetStyle(textStyle2); - // continue;//go next*** - // } - // break; - // } - // r.SetStyle(textStyle); - // } - // _updateJustCurrentLine = _selectionRange.IsOnTheSameLine; - // CancelSelect(); - // //? - // //CharIndex++; - // //CharIndex--; - //} - } - - public void AddMarkerSpan(VisualMarkerSelectionRange markerRange) - { - markerRange.BindToTextLayer(_textLayer); - _textMarkerLayer.AddMarker(markerRange); - } - - /// - /// clear all marker - /// - public void ClearMarkers() => _textMarkerLayer?.Clear(); - public void RemoveMarkers(VisualMarkerSelectionRange marker) - { - _textMarkerLayer?.Remove(marker); - } - - void JoinWithNextLine() - { - _lineEditor.JoinWithNextLine(); - // - NotifyContentSizeChanged(); - } - public void UndoLastAction() => _commandHistoryList.UndoLastAction(); - - public void ReverseLastUndoAction() => _commandHistoryList.ReverseLastUndoAction(); - -#if DEBUG - int dbug_BackSpaceCount = 0; -#endif - public VisualSelectionRangeSnapShot DoDelete() - { - //recursive -#if DEBUG - if (dbugEnableTextManRecorder) - { - _dbugActivityRecorder.WriteInfo("TxLMan::DoDelete"); - _dbugActivityRecorder.BeginContext(); - } -#endif - - VisualSelectionRangeSnapShot removedRange = this.RemoveSelectedText(); - if (removedRange.IsEmpty()) - { - _updateJustCurrentLine = true; - - char deletedChar = _lineEditor.DoDeleteOneChar(); - if (deletedChar == '\0') - { - //end of this line - - var cmd = new DocActionJoinWithNextLine( - _lineEditor.LineNumber, _lineEditor.CharIndex); - _commandHistoryList.AddDocAction(cmd); - _sessionListener?.AddDocAction(cmd); - // - JoinWithNextLine(); - _updateJustCurrentLine = false; - } - else - { - var cmd = new DocActionDeleteChar( - deletedChar, _lineEditor.LineNumber, _lineEditor.CharIndex); - _commandHistoryList.AddDocAction(cmd); - _sessionListener?.AddDocAction(cmd); - - char nextChar = _lineEditor.NextChar; - - if (nextChar != '\0') - { - if (!CanCaretStopOnThisChar(nextChar)) - { - //TODO: review return range here again - return DoDelete(); - } - } - } - } -#if DEBUG - if (dbugEnableTextManRecorder) _dbugActivityRecorder.EndContext(); -#endif - NotifyContentSizeChanged(); - return removedRange; - } - public bool DoBackspace() - { -#if DEBUG - - if (dbugEnableTextManRecorder) - { - dbug_BackSpaceCount++; - _dbugActivityRecorder.WriteInfo("TxLMan::DoBackSpace"); - _dbugActivityRecorder.BeginContext(); - } -#endif - - VisualSelectionRangeSnapShot removeSelRange = this.RemoveSelectedText(); - if (!removeSelRange.IsEmpty()) - { - CancelSelect(); - NotifyContentSizeChanged(); -#if DEBUG - if (dbugEnableTextManRecorder) _dbugActivityRecorder.EndContext(); -#endif - return true; - } - else - { - _updateJustCurrentLine = true; - - char deletedChar = _lineEditor.DoBackspaceOneChar(); - if (deletedChar == '\0') - { - //end of current line - if (!IsOnFirstLine) - { - CurrentLineNumber--; - DoEnd(); - - var cmd = new DocActionJoinWithNextLine( - _lineEditor.LineNumber, _lineEditor.CharIndex); - - _commandHistoryList.AddDocAction(cmd); - _sessionListener?.AddDocAction(cmd); - - JoinWithNextLine(); - } - NotifyContentSizeChanged(); -#if DEBUG - if (dbugEnableTextManRecorder) _dbugActivityRecorder.EndContext(); -#endif - return false; - } - else - { - // - var cmd = new DocActionDeleteChar( - deletedChar, _lineEditor.LineNumber, _lineEditor.CharIndex); - _commandHistoryList.AddDocAction(cmd); - _sessionListener?.AddDocAction(cmd); - // - NotifyContentSizeChanged(); -#if DEBUG - if (dbugEnableTextManRecorder) _dbugActivityRecorder.EndContext(); -#endif - return true; - } - } - } - - public void ReplaceCurrentLineTextRun(IEnumerable runs) - { - _lineEditor.ReplaceCurrentLine(runs); - } - public void ReplaceCurrentLine(string singleLine) - { - var textrun = new TextRun(_lineEditor.CurrentSpanStyle, singleLine.ToCharArray()); - _lineEditor.ReplaceCurrentLine(new Run[] { textrun }); - } - public void ReplaceLocalContent(int nBackSpace, string content) - { - if (content != null) - { - for (int i = 0; i < nBackSpace; i++) - { - DoBackspace(); - } - //------------------ - int j = content.Length; - if (j > 0) - { - - for (int i = 0; i < j; i++) - { - char c = content[i]; - _lineEditor.AddCharacter(c); - - //TODO:... review this again! - - var cmd = new DocActionCharTyping(c, _lineEditor.LineNumber, _lineEditor.CharIndex); - _commandHistoryList.AddDocAction(cmd); - _sessionListener?.AddDocAction(cmd); - } - } - } - } - public void AddTextToCurrentLine(IEnumerable doc) - { - int lineCount = 0; - foreach (PlainTextLine line in doc) - { - if (lineCount > 0) - { - SplitCurrentLineIntoNewLine(); - } - AddTextLine(line); - lineCount++; - } - } - public void AddTextRunsToCurrentLine(TextRangeCopy copyRange) - { - VisualSelectionRangeSnapShot removedRange = RemoveSelectedText(); - int startLineNum = _lineEditor.LineNumber; - int startCharIndex = _lineEditor.CharIndex; - bool isRecordingHx = EnableUndoHistoryRecording; - EnableUndoHistoryRecording = false; - - if (copyRange.HasSomeRuns) - { - bool hasFirstLine = false; - foreach (string line in copyRange.GetLineIter()) - { - if (hasFirstLine) - { - _lineEditor.SplitToNewLine(); - CurrentLineNumber++; - } - _lineEditor.AddTextSpan(line); - hasFirstLine = true; - } - } - - EnableUndoHistoryRecording = isRecordingHx; - var cmd = new DocActionInsertRuns(copyRange, startLineNum, startCharIndex, - _lineEditor.LineNumber, _lineEditor.CharIndex); - _commandHistoryList.AddDocAction(cmd); - _sessionListener?.AddDocAction(cmd); - - _updateJustCurrentLine = false; - // - NotifyContentSizeChanged(); - } - public void AddTextRunToCurrentLine(CopyRun copyRun) - { - AddTextRunToCurrentLine(copyRun.RawContent); - } - public void AddTextRunToCurrentLine(char[] textbuffer) - { - _updateJustCurrentLine = true; - VisualSelectionRangeSnapShot removedRange = RemoveSelectedText(); - int startLineNum = _lineEditor.LineNumber; - int startCharIndex = _lineEditor.CharIndex; - bool isRecordingHx = EnableUndoHistoryRecording; - EnableUndoHistoryRecording = false; - _lineEditor.AddTextSpan(textbuffer); - - CopyRun copyRun = new CopyRun(textbuffer); - EnableUndoHistoryRecording = isRecordingHx; - var cmd = new DocActionInsertRuns(copyRun, startLineNum, startCharIndex, - _lineEditor.LineNumber, _lineEditor.CharIndex); - _commandHistoryList.AddDocAction(cmd); - _sessionListener?.AddDocAction(cmd); - - _updateJustCurrentLine = false; - // - NotifyContentSizeChanged(); - } - public void AddTextRunToCurrentLine(Run run) - { - _updateJustCurrentLine = true; - VisualSelectionRangeSnapShot removedRange = RemoveSelectedText(); - int startLineNum = _lineEditor.LineNumber; - int startCharIndex = _lineEditor.CharIndex; - bool isRecordingHx = EnableUndoHistoryRecording; - EnableUndoHistoryRecording = false; - _lineEditor.AddTextSpan(run); - - - EnableUndoHistoryRecording = isRecordingHx; - var cmd = new DocActionInsertRuns(run.CreateCopy(), startLineNum, startCharIndex, - _lineEditor.LineNumber, _lineEditor.CharIndex); - _commandHistoryList.AddDocAction(cmd); - _sessionListener?.AddDocAction(cmd); - - _updateJustCurrentLine = false; - // - NotifyContentSizeChanged(); - } - public void Clear() - { - //1. - CancelSelect(); - _textLayer.Clear(); - _lineEditor.Clear(); - // - NotifyContentSizeChanged(); - } - } -} \ No newline at end of file diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.1_MultiLineController/TextFlowSelectSession.cs b/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.1_MultiLineController/TextFlowSelectSession.cs deleted file mode 100644 index f24497d8f..000000000 --- a/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.1_MultiLineController/TextFlowSelectSession.cs +++ /dev/null @@ -1,594 +0,0 @@ -//MIT, 2019-present, WinterDev - -using System; -using System.Collections.Generic; -using System.Globalization; - -using PixelFarm.Drawing; -using LayoutFarm.TextEditing.Commands; -using System.Text; - -namespace LayoutFarm.TextEditing -{ - public class TextFlowSelectSession : ITextFlowSelectSession - { - internal TextFlowEditWalker _lineEditor; -#if DEBUG - internal debugActivityRecorder _dbugActivityRecorder; - internal bool dbugEnableTextManRecorder = false; -#endif - - protected VisualSelectionRange _selectionRange;//primary visual selection - internal TextFlowLayer _textLayer; - public event EventHandler SelectionCanceled; - - internal TextFlowSelectSession(TextFlowLayer textLayer) - { - //this controller control the editaible-textflow-layer - _textLayer = textLayer; - //write to textflow-layer with text-line-writer (handle the writing line) - _lineEditor = new TextFlowEditWalker(textLayer); - } - - public Run CurrentTextRun => _lineEditor.GetCurrentTextRun(); - public void CopyAllToPlainText(StringBuilder output) - { - _lineEditor.CopyContentToStrignBuilder(output); - } - - public void CopySelectedTextToPlainText(StringBuilder stBuilder) - { - if (_selectionRange != null) - { - _selectionRange.SwapIfUnOrder(); - if (_selectionRange.IsOnTheSameLine) - { - var copyRuns = new TextRangeCopy(); - _lineEditor.CopySelectedTextRuns(_selectionRange, copyRuns); - copyRuns.CopyContentToStringBuilder(stBuilder); - - } - else - { - VisualPointInfo startPoint = _selectionRange.StartPoint; - CurrentLineNumber = startPoint.LineId; - _lineEditor.SetCurrentCharIndex(startPoint.LineCharIndex); - var copyRuns = new TextRangeCopy(); - _lineEditor.CopySelectedTextRuns(_selectionRange, copyRuns); - copyRuns.CopyContentToStringBuilder(stBuilder); - } - } - } - public void CopyCurrentLine(StringBuilder output) - { - _lineEditor.CopyLineContent(output); - } - public void CopyLine(int lineNum, StringBuilder output) - { - if (_lineEditor.LineNumber == lineNum) - { - //on the sameline - _lineEditor.CopyLineContent(output); - } - else - { - int cur_line = _lineEditor.LineNumber; - _lineEditor.MoveToLine(lineNum); - _lineEditor.CopyLineContent(output); - _lineEditor.MoveToLine(cur_line); - } - //backGroundTextLineWriter.MoveToLine(lineNum); - //backGroundTextLineWriter.CopyLineContent(output); - } - public void SelectAll() - { - CurrentLineNumber = 0; - SetCaretPos(0, 0); - StartSelect(); - CurrentLineNumber = LineCount - 1; - _lineEditor.SetCurrentCharIndexToEnd(); - EndSelect(); - } - - public void StartSelect() - { - if (_lineEditor != null) - { - _selectionRange = new VisualSelectionRange(_textLayer, GetCurrentPointInfo(), GetCurrentPointInfo()); - } -#if DEBUG - if (dbugEnableTextManRecorder) - { - _dbugActivityRecorder.WriteInfo("TxLMan::StartSelect"); - } -#endif - } - public void EndSelect() - { - if (_lineEditor != null) - { -#if DEBUG - if (dbugEnableTextManRecorder) - { - _dbugActivityRecorder.WriteInfo("TxLMan::EndSelect"); - } -#endif - - Rectangle before = _selectionRange.GetSelectionUpdateArea(); - _selectionRange.EndPoint = GetCurrentPointInfo(); - Rectangle after = _selectionRange.GetSelectionUpdateArea(); - _textLayer.ClientLineBubbleupInvalidateArea(Rectangle.Union(before, after)); - } - } - - public void CancelSelect() - { -#if DEBUG - if (dbugEnableTextManRecorder) - { - _dbugActivityRecorder.WriteInfo("TxLMan::CancelSelect"); - } -#endif - if (_selectionRange != null) - { - //invalidate graphic area? - - _textLayer.ClientLineBubbleupInvalidateArea(_selectionRange.GetSelectionUpdateArea()); - } - _selectionRange = null; - SelectionCanceled?.Invoke(this, EventArgs.Empty); - } - public void StartSelectIfNoSelection() - { - if (_selectionRange == null) - { - this.StartSelect(); - } - } - public void EndSelectIfNoSelection() - { - if (_selectionRange == null) - { - this.StartSelect(); - } - this.EndSelect(); - } - - public VisualPointInfo FindTextRunOnPosition(int x, int y) - { - if (y < 0) - { - return null; - } - else - { - int j = _lineEditor.LineCount; - if (j > 0) - { - TextLineBox textLine = _lineEditor.GetTextLineAtPos(y); - if (textLine != null) - { - return textLine.GetTextPointInfoFromCaretPoint(x); - } - } - return null; - } - } - - - // - public int CurrentLineCharCount => _lineEditor.CharCount; - // - public int LineCount => _lineEditor.LineCount; - // - public int CurrentLineCharIndex => _lineEditor.CharIndex; - // - public int CurrentTextRunCharIndex => _lineEditor.CurrentTextRunCharIndex; - // - public int CurrentLineNumber - { - get => _lineEditor.LineNumber; - set - { - int diff = value - _lineEditor.LineNumber; - switch (diff) - { - case 0: - { - return; - } - case 1: - { - if (_lineEditor.HasNextLine) - { - _lineEditor.MoveToNextLine(); - DoHome(); - } - } - break; - case -1: - { - if (_lineEditor.HasPrevLine) - { - _lineEditor.MoveToPrevLine(); - DoEnd(); - } - } - break; - default: - { - if (diff > 1) - { - _lineEditor.MoveToLine(value); - } - else - { - if (value < -1) - { - _lineEditor.MoveToLine(value); - } - else - { - _lineEditor.MoveToLine(value); - } - } - } - break; - } - } - } - - public VisualSelectionRange SelectionRange => _selectionRange; - - public void UpdateSelectionRange() - { - _selectionRange?.UpdateSelectionRange(); - } - - public EditableVisualPointInfo GetCurrentPointInfo() => _lineEditor.GetCurrentPointInfo(); - - /// - /// find underlying word at current caret pos - /// - public void FindUnderlyingWord(out int startAt, out int len) - { - _lineEditor.FindCurrentHitWord(out startAt, out len); - } - - public void TryMoveCaretTo(int charIndex, bool backward = false) - { - if (_lineEditor.CharIndex < 1 && charIndex < 0) - { - if (backward) - { - if (_lineEditor.HasPrevLine) - { - _lineEditor.MoveToPrevLine(); - DoEnd(); - } - } - } - else - { - int lineLength = _lineEditor.CharCount; - if (_lineEditor.CharIndex >= lineLength && charIndex > lineLength) - { - if (_lineEditor.HasNextLine) - { - _lineEditor.MoveToNextLine(); - } - } - else - { - _lineEditor.SetCurrentCharIndex(charIndex); - //check if we can stop at this char or not - if (backward) - { - //move caret backward - char prevChar = _lineEditor.PrevChar; - int tmp_index = charIndex; -#if DEBUG - UnicodeCategory unicodeCat = char.GetUnicodeCategory(prevChar); - bool is_highSurrogate = char.IsHighSurrogate(prevChar); - bool is_lowSurrogate = char.IsLowSurrogate(prevChar); -#endif - - - while (prevChar != '\0' && tmp_index > 0 && (char.IsLowSurrogate(prevChar) || !CanCaretStopOnThisChar(prevChar))) - { - _lineEditor.SetCurrentCharStepLeft(); - prevChar = _lineEditor.PrevChar; - tmp_index--; - } - } - else - { - char nextChar = _lineEditor.NextChar; - -#if DEBUG - UnicodeCategory unicodeCat = char.GetUnicodeCategory(nextChar); - bool is_highSurrogate = char.IsHighSurrogate(nextChar); - bool is_lowSurrogate = char.IsLowSurrogate(nextChar); -#endif - int lineCharCount = _lineEditor.CharCount; - int tmp_index = charIndex + 1; - while (nextChar != '\0' && tmp_index <= lineCharCount && (char.IsLowSurrogate(nextChar) || !CanCaretStopOnThisChar(nextChar))) - { - _lineEditor.SetCurrentCharStepRight(); - nextChar = _lineEditor.NextChar; - tmp_index++; - } - } - - } - } - } - public void DoEnd() - { -#if DEBUG - if (dbugEnableTextManRecorder) - { - _dbugActivityRecorder.WriteInfo("TxLMan::DoEnd"); - _dbugActivityRecorder.BeginContext(); - } -#endif - _lineEditor.SetCurrentCharIndexToEnd(); -#if DEBUG - if (dbugEnableTextManRecorder) - { - _dbugActivityRecorder.EndContext(); - } -#endif - } - public void DoHome() - { -#if DEBUG - if (dbugEnableTextManRecorder) - { - _dbugActivityRecorder.WriteInfo("TxLMan::DoHome"); - _dbugActivityRecorder.BeginContext(); - } -#endif - - _lineEditor.SetCurrentCharIndexToBegin(); -#if DEBUG - if (dbugEnableTextManRecorder) - { - _dbugActivityRecorder.EndContext(); - } -#endif - } - - public void TryMoveCaretForward() - { - //move caret forward 1 key stroke - TryMoveCaretTo(_lineEditor.CharIndex + 1); - } - public void TryMoveCaretBackward() - { - TryMoveCaretTo(_lineEditor.CharIndex - 1, true); - } - // - public int CharIndex => _lineEditor.CharIndex; - // - public bool IsOnEndOfLine => _lineEditor.IsOnEndOfLine; - public bool IsOnStartOfLine => _lineEditor.IsOnStartOfLine; - public int CurrentCaretHeight - { - get - { - Run currentRun = this.CurrentTextRun; - return (currentRun != null) ? currentRun.Height : 17; //TODO: review this... - } - } - public Point CaretPos - { - get => _lineEditor.CaretPosition; - set - { - if (_lineEditor.LineCount > 0) - { - TextLineBox line = _lineEditor.GetTextLineAtPos(value.Y); - int calculatedLineId = 0; - int lineTop = 0; - if (line != null) - { - calculatedLineId = line.LineNumber; - lineTop = line.Top; - } - this.CurrentLineNumber = calculatedLineId; - _lineEditor.TrySetCaretPos(value.X, value.Y - lineTop); - } - } - } - // - public int GetNextCharacterWidth() => _lineEditor.NextCharWidth; - // - public void SetCaretPos(int x, int y) - { - if (_lineEditor.LineCount > 0) - { - TextLineBox line = _lineEditor.GetTextLineAtPos(y); - int lineNo = 0; - int lineTop = 0; - if (line != null) - { - lineNo = line.LineNumber; - lineTop = line.Top; - } - - this.CurrentLineNumber = lineNo; - _lineEditor.TrySetCaretPos(x, y - lineTop); - } - } - public Rectangle CurrentLineArea => _lineEditor.LineArea; - - - public bool IsOnFirstLine => !_lineEditor.HasPrevLine; - - - static Func s_CaretCanStopOnThisChar; - - public static void SetCaretCanStopOnThisChar(Func caretCanStopOnThisCharDel) - { - s_CaretCanStopOnThisChar = caretCanStopOnThisCharDel; - } - internal static bool CanCaretStopOnThisChar(char c) - { - UnicodeCategory unicodeCatg = char.GetUnicodeCategory(c); - switch (unicodeCatg) - { - - case UnicodeCategory.SpaceSeparator: - case UnicodeCategory.LineSeparator: - case UnicodeCategory.ParagraphSeparator: - case UnicodeCategory.Control: - break; - case UnicodeCategory.UppercaseLetter: - case UnicodeCategory.LowercaseLetter: - case UnicodeCategory.TitlecaseLetter: - case UnicodeCategory.ModifierLetter: - case UnicodeCategory.DecimalDigitNumber: - break; - case UnicodeCategory.OtherLetter: - - if (s_CaretCanStopOnThisChar != null) - { - return s_CaretCanStopOnThisChar(c); - } - break; - case UnicodeCategory.NonSpacingMark: - case UnicodeCategory.SpacingCombiningMark: - case UnicodeCategory.EnclosingMark: - //recursive - return false; - default: - break; - } - return true; - - - //ref: https://docs.microsoft.com/en-us/dotnet/api/system.globalization.unicodecategory?view=netcore-3.1 - //ClosePunctuation 21 - //Closing character of one of the paired punctuation marks, such as parentheses, square brackets, and braces. - //Signified by the Unicode designation "Pe" (punctuation, close). The value is 21. - - //ConnectorPunctuation 18 - //Connector punctuation character that connects two characters. - //Signified by the Unicode designation "Pc" (punctuation, connector). The value is 18. - - //Control 14 - //Control code character, with a Unicode value of U+007F or in the range U+0000 through U+001F or U+0080 through U+009F. - //Signified by the Unicode designation "Cc" (other, control). The value is 14. - - //CurrencySymbol 26 - //Currency symbol character. - //Signified by the Unicode designation "Sc" (symbol, currency). The value is 26. - - //DashPunctuation 19 - //Dash or hyphen character. - //Signified by the Unicode designation "Pd" (punctuation, dash). The value is 19. - - //DecimalDigitNumber 8 - //Decimal digit character, that is, a character in the range 0 through 9. - //Signified by the Unicode designation "Nd" (number, decimal digit). The value is 8. - - //EnclosingMark 7 - //Enclosing mark character, which is a nonspacing combining character that surrounds all previous characters up to and including a base character. - //Signified by the Unicode designation "Me" (mark, enclosing). The value is 7. - - //FinalQuotePunctuation 23 - //Closing or final quotation mark character. - //Signified by the Unicode designation "Pf" (punctuation, final quote). The value is 23. - - //Format 15 - //Format character that affects the layout of text or the operation of text processes, but is not normally rendered. - //Signified by the Unicode designation "Cf" (other, format). The value is 15. - - //InitialQuotePunctuation 22 - //Opening or initial quotation mark character. - //Signified by the Unicode designation "Pi" (punctuation, initial quote). The value is 22. - - //LetterNumber 9 - //Number represented by a letter, instead of a decimal digit, for example, the Roman numeral for five, which is "V". - //The indicator is signified by the Unicode designation "Nl" (number, letter). The value is 9. - - //LineSeparator 12 - //Character that is used to separate lines of text. - //Signified by the Unicode designation "Zl" (separator, line). The value is 12. - - //LowercaseLetter 1 - //Lowercase letter. - //Signified by the Unicode designation "Ll" (letter, lowercase). The value is 1. - - //MathSymbol 25 - //Mathematical symbol character, such as "+" or "= ". - //Signified by the Unicode designation "Sm" (symbol, math). The value is 25. - - //ModifierLetter 3 - //Modifier letter character, which is free-standing spacing character that indicates modifications of a preceding letter. - //Signified by the Unicode designation "Lm" (letter, modifier). The value is 3. - - //ModifierSymbol 27 - //Modifier symbol character, which indicates modifications of surrounding characters. - //For example, the fraction slash indicates that the number to the left is the numerator and the number to the right is the denominator. - //The indicator is signified by the Unicode designation "Sk" (symbol, modifier). The value is 27. - - //NonSpacingMark 5 - //Nonspacing character that indicates modifications of a base character. - //Signified by the Unicode designation "Mn" (mark, nonspacing). The value is 5. - - //OpenPunctuation 20 - //Opening character of one of the paired punctuation marks, such as parentheses, square brackets, and braces. - //Signified by the Unicode designation "Ps" (punctuation, open). The value is 20. - - //OtherLetter 4 - //Letter that is not an uppercase letter, a lowercase letter, a titlecase letter, or a modifier letter. - //Signified by the Unicode designation "Lo" (letter, other). The value is 4. - - //OtherNotAssigned 29 - //Character that is not assigned to any Unicode category. - //Signified by the Unicode designation "Cn" (other, not assigned). The value is 29. - - //OtherNumber 10 - //Number that is neither a decimal digit nor a letter number, for example, the fraction 1/2. The indicator is signified by the Unicode designation "No" (number, other). The value is 10. - - //OtherPunctuation 24 - //Punctuation character that is not a connector, a dash, open punctuation, close punctuation, an initial quote, or a final quote. - //Signified by the Unicode designation "Po" (punctuation, other). The value is 24. - - //OtherSymbol 28 - //Symbol character that is not a mathematical symbol, a currency symbol or a modifier symbol. - //Signified by the Unicode designation "So" (symbol, other). The value is 28. - - //ParagraphSeparator 13 - //Character used to separate paragraphs. - //Signified by the Unicode designation "Zp" (separator, paragraph). The value is 13. - - //PrivateUse 17 - //Private-use character, with a Unicode value in the range U+E000 through U+F8FF. - //Signified by the Unicode designation "Co" (other, private use). The value is 17. - - //SpaceSeparator 11 - //Space character, which has no glyph but is not a control or format character. - //Signified by the Unicode designation "Zs" (separator, space). The value is 11. - - //SpacingCombiningMark 6 - //Spacing character that indicates modifications of a base character and affects the width of the glyph for that base character. - //Signified by the Unicode designation "Mc" (mark, spacing combining). The value is 6. - - //Surrogate 16 - //High surrogate or a low surrogate character. - //Surrogate code values are in the range U+D800 through U+DFFF. Signified by the Unicode designation "Cs" (other, surrogate). The value is 16. - - //TitlecaseLetter 2 - //Titlecase letter. - //Signified by the Unicode designation "Lt" (letter, titlecase). The value is 2. - - //UppercaseLetter 0 - //Uppercase letter. - //Signified by the Unicode designation "Lu" (letter, uppercase). The value is 0. - } - - } -} \ No newline at end of file diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.1_MultiLineController/TextSurfaceEventListener.cs b/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.1_MultiLineController/TextSurfaceEventListener.cs index d8678edf9..dd06203ef 100644 --- a/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.1_MultiLineController/TextSurfaceEventListener.cs +++ b/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.1_MultiLineController/TextSurfaceEventListener.cs @@ -2,7 +2,9 @@ using System; using LayoutFarm.UI; -namespace LayoutFarm.TextEditing +using Typography.Text; + +namespace LayoutFarm.TextFlow { public class TextDomEventArgs : EventArgs { @@ -29,12 +31,12 @@ public TextDomEventArgs(bool updateJustCurrentLine) { this.UpdateJustCurrentLine = updateJustCurrentLine; } - public TextDomEventArgs(bool updateJustCurrentLine, VisualSelectionRangeSnapShot changedSnapShot) + public TextDomEventArgs(bool updateJustCurrentLine, SelectionRangeSnapShot changedSnapShot) { this.UpdateJustCurrentLine = updateJustCurrentLine; this.SelectionSnapShot = changedSnapShot; } - public VisualSelectionRangeSnapShot SelectionSnapShot { get; private set; } + public SelectionRangeSnapShot SelectionSnapShot { get; private set; } public bool Shift { get; set; } public bool Control { get; set; } public bool Alt { get; set; } @@ -62,9 +64,9 @@ public sealed class TextSurfaceEventListener public event EventHandler PreviewEnterKeyDown; public event EventHandler PreviewDialogKeyDown; public event EventHandler PreviewMouseWheel; - public event EventHandler PreviewBackSpaceKeyDown; public event EventHandler PreviewRegisteredKeyPress; + public event EventHandler CharacterAdded; public event EventHandler CharacterRemoved; public event EventHandler CharacterReplaced; @@ -257,4 +259,68 @@ internal static void NotifyFunctionKeyDown(TextSurfaceEventListener listener, UI //TODO:??? } } + + public abstract class TextFlowEditSessionListener + { + int _currentLineNo; + int _currentLineCharIndex; + + public TextFlowEditSessionListener() + { + + } + + public int CurrentLineNewCharIndex => _currentLineCharIndex; + public int CurrentLineNo => _currentLineNo; + public bool HasSelection { get; private set; } + // + public int SelectionStartLineNo { get; private set; } + public int SelectionStartLineCharIndex { get; private set; } + public int SelectionEndLineNo { get; private set; } + public int SelectionEndLineCharIndexNo { get; private set; } + // + + public virtual void AddChar(int c) + { + + } + public virtual void AddText(TextCopyBuffer buffer) + { + + } + public virtual void SetCurrentPos(int lineNumber, int charIndex) + { + _currentLineNo = lineNumber; + _currentLineCharIndex = charIndex; + } + public virtual void SetSelection(int startLineNo, int startLineCharIndex, int endLineNo, int endLineCharIndex) + { + //we need to ensure that the selection is normalized** + SelectionStartLineNo = startLineNo; + SelectionStartLineCharIndex = startLineCharIndex; + SelectionEndLineNo = endLineNo; + SelectionEndLineCharIndexNo = endLineCharIndex; + HasSelection = true; + } + public virtual void CancelSelection() + { + //cancel prev selection + HasSelection = false; + } + public virtual void SplitIntoNewLine() + { + + } + + public virtual void DoDelete() + { + + } + public virtual void DoBackspace() + { + + } + } + + } \ No newline at end of file diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.1_MultiLineController/VisualTextFlowEditSession_part1.cs b/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.1_MultiLineController/VisualTextFlowEditSession_part1.cs new file mode 100644 index 000000000..b2f801933 --- /dev/null +++ b/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.1_MultiLineController/VisualTextFlowEditSession_part1.cs @@ -0,0 +1,770 @@ +//Apache2, 2014-present, WinterDev + +using System; +using System.Collections.Generic; +using Typography.Text; + +namespace LayoutFarm.TextFlow +{ + + public partial class VisualTextFlowEditSession : ITextFlowEditSession + { + + PlainTextEditSession _pte; //text-model edit (for plain text) + HistoryCollector _hx;//history collector + + TextFlowLayer _textLayer;//visual multi textlinebox layer + VisualTextLineWalker _lineWalker; + + internal bool _updateJustCurrentLine = true; + TextMarkerLayer _textMarkerLayer; + + internal VisualTextFlowEditSession(TextFlowLayer textLayer) + { + _textLayer = textLayer; + + _pte = new PlainTextEditSession(); + _pte.LoadPlainText(textLayer._plainText); + // + _hx = new HistoryCollector(this, _pte); //record editing hx, support undo-redo + + + EnableUndoHistoryRecording = true; + + // + //create presentation + int count = _pte.LineCount; + for (int i = 0; i < count; ++i) + { + //create a visual presentation of text line/// + TextLineBox linebox = new TextLineBox(textLayer); + + //add visual line box + textLayer.AppendNewLine(linebox); + } + + _lineWalker = new VisualTextLineWalker(); + _lineWalker.LoadLine(textLayer.GetTextLine(0)); + } + internal PlainTextEditSession GetPlainTextEditSession() => _pte; + + + public Run LatestHitRun => _lineWalker.GetCurrentTextRun(); + public void CopyAllToPlainText(TextCopyBuffer output) + { + if (output is TextCopyBufferUtf32 u32buff) + { + _pte.CopyAll(u32buff); + } + else + { + throw new NotSupportedException(); + } + } + public void CopySelectedTextToPlainText(System.Text.StringBuilder output) + { + //1. copy from model or from presentation? + if (_selectionRange != null) + { + SetSelectionToTextModel(); + using (new TextUtf32RangeCopyPoolContext(out TextCopyBufferUtf32 u32buff)) + { + _pte.CopySelection(u32buff); + u32buff.CopyTo(output); + } + } + } + public void CopySelectedTextToPlainText(TextCopyBuffer output) + { + SetSelectionToTextModel(); + if (output is TextCopyBufferUtf32 u32buff) + { + _pte.CopySelection(u32buff); + } + else + { + throw new NotSupportedException(); + } + } + protected void NotifyContentSizeChanged() + { + _textLayer.NotifyContentSizeChanged(); + } + + internal void SetMarkerLayer(TextMarkerLayer textMarkerLayer) + { + _textMarkerLayer = textMarkerLayer; + } + + internal bool UndoMode { get; set; } + // + public bool EnableUndoHistoryRecording + { + get => _hx.EnableUndoHistoryRecording; + set => _hx.EnableUndoHistoryRecording = value; + } + // + public void AddChar(int c) + { + _hx.IncrementHxStepNumber(); + _updateJustCurrentLine = true; + RemoveSelectedText(); + + int pre_lineNumber = _lineWalker.LineNumber; + int pre_charIndex = _lineWalker.NewCharIndex; + + UpdateCaretPos(); + + _hx.AddChar(c); + _pte.AddChar(c);//text model + + + //then update visual presentation of current line + //TODO: text-span visual formatting ... + UpdateCurrentLinePresentation(pre_lineNumber, _lineWalker.NewCharIndex); + } + /// + /// update caret position from visual layer + /// + void UpdateCaretPos() + { + if (_pte.NewCharIndex != _lineWalker.NewCharIndex) + { + _pte.NewCharIndex = _lineWalker.NewCharIndex; + } + _hx.SetCurrentPos(_lineWalker.LineNumber, _lineWalker.NewCharIndex); + } + + void SetSelectionToTextModel() + { + _selectionRange.Normalize(); + int s0 = _selectionRange.StartPoint.LineNumber; + int s1 = _selectionRange.StartPoint.LineCharIndex; + int e0 = _selectionRange.EndPoint.LineNumber; + int e1 = _selectionRange.EndPoint.LineCharIndex; + + _pte.SetSelection(s0, s1, e0, e1); + _hx.SetSelection(s0, s1, e0, e1); + + } + + bool RemoveSelectedText() + { + if (_selectionRange == null) + { + return false; + } + else if (!_selectionRange.IsValid) + { + CancelSelect();//clear + return false; + } + + // + _selectionRange.Normalize(); + SelectionRangeSnapShot sel = _selectionRange.GetSelectionRangeSnapshot(); + VisualPointInfo startPoint = _selectionRange.StartPoint; + CurrentLineNumber = startPoint.LineId; + _lineWalker.SetCurrentCharIndex(startPoint.LineCharIndex); + + SetSelectionToTextModel(); + + + int startPointLindId = startPoint.LineId; + int startPointCharIndex = startPoint.LineCharIndex; + + UpdateCaretPos(); + + _hx.DoDelete(); + _pte.DoDelete(); //delete text + + if (_selectionRange.IsOnTheSameLine) + { + //2. update presentation + UpdateCurrentLinePresentation(0, -1); + _updateJustCurrentLine = true; + } + else + { + //2. update presentation + + int ss = sel.startLineNum; + int ee = sel.endLineNum; + int diff = ee - ss; + + if (diff > 1) + { + for (int mm = 0; mm < diff; ++mm) + { + //remove difftimes + _textLayer.Remove(ss + 1); + } + } + else + { + _textLayer.Remove(ss + 1); + } + + UpdateLinePresentation2(_textLayer.GetTextLine(ss), 0, -1); + + _updateJustCurrentLine = false; + + MoveToLine(startPointLindId); + + _lineWalker.SetCurrentCharIndex(startPointCharIndex); + + } + + //after + CancelSelect(); + + return true; + } + + static readonly char[] s_tabspaces = " ".ToCharArray(); + + public void DoTabOverSelectedRange() + { + //eg. user press 'Tab' key over selected range + VisualSelectionRange selRange = SelectionRange; + if (selRange == null) return; + // + + //EditableVisualPointInfo startPoint = selRange.StartPoint; + //EditableVisualPointInfo endPoint = selRange.EndPoint; + //// + //if (!selRange.IsOnTheSameLine) + //{ + // //TextLineBox line = startPoint.Line; + // //TextLineBox end_line = endPoint.Line; + // //RunStyle runstyle = _textLayer.DefaultRunStyle;// _editWalker.CurrentSpanStyle; + + // //while (line.LineNumber <= end_line.LineNumber) + // //{ + // // //TODO, review here... + + // // TextRun whitespace = null;// line.CreateTextRun(s_tabspaces); + // // line.AddFirst(whitespace); + // // line.TextLineReCalculateActualLineSize(); + // // line.RefreshInlineArrange(); + // // line = line.Next;//move to next line + // //} + // throw new NotSupportedException(); + // return;//finish here + //} + + } + public void SplitIntoNewLine() + { + _hx.IncrementHxStepNumber(); + RemoveSelectedText(); + + UpdateCaretPos(); + _hx.SplitIntoNewLine(); + + //1. update model + _pte.SplitIntoNewLine(); + //2. update presentation + _textLayer.InsertNewLine(_lineWalker.LineNumber + 1);//add new line + + UpdateLinePresentation2(_textLayer.GetTextLine(CurrentLineNumber), 0, -1); //entire line + CurrentLineNumber++;//move to next + _updateJustCurrentLine = false; + UpdateCurrentLinePresentation(0, -1); + // + NotifyContentSizeChanged(); + } + //public void AddTextLine(PlainTextLine textline) + //{ + // throw new NotSupportedException(); + + // ////TODO: replace 1 tab with 4 blank spaces? + // //_updateJustCurrentLine = true; + // //SelectionRangeSnapShot removedRange = RemoveSelectedText(); + // //int startLineNum = _lineWalker.LineNumber; + // //int startCharIndex = _lineWalker.CharIndex; + // //bool isRecordingHx = EnableUndoHistoryRecording; + // //EnableUndoHistoryRecording = false; + + // ////--------------------- + + // ////copy content from prev line + // ////temp fix! + // ////TODO: review here + // ////char[] textbuffer = textline.ToString().ToCharArray(); + // ////_editWalker.AddTextSpan(textbuffer); + + // //string text_str = textline.ToString(); + // //_tme.AddText(text_str); //add text to + + // //EnableUndoHistoryRecording = isRecordingHx; + + // //var cmd = new DocActionInsertText(new TextCopyBufferUtf16(text_str.ToCharArray()), startLineNum, startCharIndex, + // // _lineWalker.LineNumber, _lineWalker.CharIndex); + // ////_commandHistoryList.AddDocAction(cmd); + // //_sessionListener?.AddDocAction(cmd); + + // //_updateJustCurrentLine = false; + // //// + // //NotifyContentSizeChanged(); + //} + + public void AddMarkerSpan(VisualMarkerSelectionRange markerRange) + { + markerRange.BindToTextLayer(_textLayer); + _textMarkerLayer.AddMarker(markerRange); + } + + /// + /// clear all marker + /// + public void ClearMarkers() => _textMarkerLayer?.Clear(); + public void RemoveMarkers(VisualMarkerSelectionRange marker) + { + _textMarkerLayer?.Remove(marker); + } + public void UndoLastAction() + { + EnableUndoHistoryRecording = false; + UndoMode = true; + + _hx.UndoLastAction(this); + + EnableUndoHistoryRecording = true; + UndoMode = false; + } + + public void ReverseLastUndoAction() + { + //update model and presentation + //_editSession.EnableUndoHistoryRecording = false; + //_editSession.UndoMode = true; + EnableUndoHistoryRecording = false; + UndoMode = true; + + _hx.ReverseLastUndoAction(); + + EnableUndoHistoryRecording = true; + UndoMode = false; + } + +#if DEBUG + int dbug_BackSpaceCount = 0; +#endif + public void DoDelete() + { + //recursive + +#if DEBUG + //if (dbugEnableTextManRecorder) + //{ + // _dbugActivityRecorder.WriteInfo("TxLMan::DoDelete"); + // _dbugActivityRecorder.BeginContext(); + //} +#endif + + //have selected text or not + //if yes=> delete the selected text + //else delete + _hx.IncrementHxStepNumber(); + if (RemoveSelectedText()) + { + //TODO: review here + NotifyContentSizeChanged(); + return; + } + + //no selection range-> noting to delete + _updateJustCurrentLine = true; + //edit session may delete more than 1 char** (since some char can' exist alone)*** + //or it may involve more than 1 line + + if (!_pte.IsOnTheEnd()) + { + //current line + _pte.NewCharIndex = _lineWalker.NewCharIndex; + int numCharAffected = _pte.PreviewSingleCharDelete(); + int before = _pte.NewCharIndex; //before + + if (numCharAffected == 0) + { + //we are on the end of this line + //should not occure because we check this in the upper step + } + else if (numCharAffected == 1) + { + //single char delete + UpdateCaretPos(); + + _pte.TempCopyBuffer.Clear();//reset + _pte.TempCopyBuffer.Append(_pte.GetCharacter(before)); + + _hx.DoDelete();//record delete + //single delete may afffect more than 1 char + _pte.DoDelete(); + //update presentation + UpdateCurrentLinePresentation(before, 1); + } + else + { + //more than 1 char, just do- + UpdateCaretPos(); + _pte.TempCopyBuffer.Clear();//reset + for (int i = 0; i < numCharAffected; ++i) + { + //tobe deleted char + _pte.TempCopyBuffer.Append(_pte.GetCharacter(before + i)); + } + + int s0 = _pte.CurrentLineNumber; + int s1 = before; + int e0 = s0; + int e1 = before + numCharAffected; + + _pte.SetSelection(s0, s1, e0, e1); + _hx.SetSelection(s0, s1, e0, e1); + + + _hx.DoDelete(); + _pte.DoDelete(); //delete text + UpdateCurrentLinePresentation(before, numCharAffected); + } + } + else + { + //we are on the end of this line + if (CurrentLineNumber < _textLayer.LineCount - 1) + { + //has lower line + + int before = _pte.NewCharIndex; //before + UpdateCaretPos(); + _hx.DoDelete(); + _pte.DoDelete(); + + int after = _pte.NewCharIndex; + //update presentation + if (CurrentLineNumber < LineCount - 1) + { + //not the last line + //remove lower + TextLineBox curLine = _textLayer.GetTextLine(CurrentLineNumber); + _textLayer.Remove(CurrentLineNumber + 1); + + UpdateCurrentLinePresentation(before, 1); + NotifyContentSizeChanged(); + _textLayer.ClientLineBubbleupInvalidateArea( + new PixelFarm.Drawing.Rectangle(0, curLine.Top, _textLayer.OwnerWidth, _textLayer.OwnerHeight - curLine.Top)); + } + else + { + UpdateCurrentLinePresentation(before, 1); + + NotifyContentSizeChanged(); + } + } + } + } + + TextCopyBufferUtf32 _copyBuffer = new TextCopyBufferUtf32(); + List _collectedRuns = new List(); + + void UpdateLinePresentation2(TextLineBox linebox, int startAt, int affectedCharCount) + { + + linebox.Clear(); + _copyBuffer.Clear(); + + _pte.CopyLine(linebox.LineNumber, _copyBuffer); + + TextRun run = new TextRun(_textLayer.DefaultRunStyle, _textLayer.CharSource.NewSegment(_copyBuffer)); + linebox.AddLast(run); + linebox.TextLineReCalculateActualLineSize(); + linebox.RefreshInlineArrange(); + + } + void UpdateCurrentLinePresentation(int startAt, int affectedCharCount) + { + //check if we need to create entire line or not + //check if we involve a single run or multiple run + + + //the formatting is up to user + //eg. + //1) replace entire line + //2) edit somepart of the current line + + bool clear_line_and_create = false; + if (clear_line_and_create) + { + _copyBuffer.Clear(); + _pte.ReadCurrentLine(_copyBuffer); //copy current line to temp buffer + //create text runs + //users can parse and format the line content by themself + UpdateLinePresentation2(_lineWalker.CurrentLine, startAt, affectedCharCount); + _lineWalker.SetCurrentCharIndex2(_pte.NewCharIndex); + + } + else + { + + _collectedRuns.Clear(); //collect consecutive runs + _lineWalker.CollectAffectedRuns(startAt, affectedCharCount, _collectedRuns); + _copyBuffer.Clear(); + + if (_collectedRuns.Count == 1) + { + //affect single run + + _pte.ReadCurrentLine(_copyBuffer); //copy current line to temp buffer, create text runs + + TextRun rr = (TextRun)_lineWalker.GetCurrentTextRun(); + rr.SetNewContent(_textLayer.CharSource.NewSegment(_copyBuffer)); + rr.UpdateRunWidth(); + + TextLineBox linebox = _lineWalker.CurrentLine; + linebox.InvalidateCharCount(); + int newcount = linebox.CharCount(); + linebox.TextLineReCalculateActualLineSize(); + linebox.RefreshInlineArrange(); + + _lineWalker.SetCurrentCharIndex2(_pte.NewCharIndex); + } + else if (_collectedRuns.Count > 1) + { + throw new NotSupportedException(); + } + else + { + _pte.ReadCurrentLine(_copyBuffer); //copy current line to temp buffer + //create text runs + TextLineBox linebox = _lineWalker.CurrentLine; + linebox.Clear(); + TextRun run = new TextRun(_textLayer.DefaultRunStyle, _textLayer.CharSource.NewSegment(_copyBuffer)); + linebox.AddLast(run); + linebox.TextLineReCalculateActualLineSize(); + linebox.RefreshInlineArrange(); + _lineWalker.SetCurrentCharIndex2(_pte.NewCharIndex); + } + + } + } + public bool DoBackspace() + { + _hx.IncrementHxStepNumber(); + if (RemoveSelectedText()) + { + //TODO: review here + NotifyContentSizeChanged(); + return true; + } + + _updateJustCurrentLine = true; + + if (_lineWalker.NewCharIndex == 0) + { + + //at the begein of line + if (CurrentLineNumber > 0) + { + _pte.NewCharIndex = _lineWalker.NewCharIndex; + int before1 = _pte.NewCharIndex; //before + _pte.GetCharacter(before1); + + UpdateCaretPos(); + + _hx.DoBackspace(); + _pte.DoBackspace(); + + //move to current line + MoveToPrevLine(); + DoEnd(); + //remove lower line + UpdateLinePresentation2(_textLayer.GetTextLine(CurrentLineNumber), 0, -1); + _textLayer.Remove(CurrentLineNumber + 1); + NotifyContentSizeChanged(); + return true; + } + // throw new NotSupportedException(); + return false; + } + else + { + _pte.NewCharIndex = _lineWalker.NewCharIndex; + int c = _pte.GetCharacter(_pte.NewCharIndex - 1); //tobe deleted char + _pte.TempCopyBuffer.Clear();//reset + _pte.TempCopyBuffer.Append(c);//copy to temp buffer, and shared it between hx-collection and session listener + // + int before1 = _pte.NewCharIndex; //before + + UpdateCaretPos(); + + _hx.DoBackspace(); + _pte.DoBackspace(); + + //update presentation + UpdateCurrentLinePresentation(_pte.NewCharIndex, _pte.NewCharIndex - before1 + 1); + NotifyContentSizeChanged(); + return true; + } + } + + public void CopyCurrentLine(TextCopyBuffer output) + { + if (output is TextCopyBufferUtf32 u32Output) + { + _pte.CopyCurrentLine(u32Output); + } + else + { + //TODO: + throw new NotSupportedException(); + } + + } + public void CopyLine(int lineNum, TextCopyBuffer output) + { + _pte.CopyLine(lineNum, output); + } + + public void ReplaceLocalContent(int nBackSpace, string content) + { + //delete and replace + //1. + int start = _pte.NewCharIndex; + _pte.NewCharIndex -= nBackSpace; + _pte.SetSelection(_pte.CurrentLineNumber, start - nBackSpace, _pte.CurrentLineNumber, start); + _pte.DoDelete();// + //and insert + _pte.AddText(content); + //then update visual presentation + UpdateCurrentLinePresentation(0, -1); + //int dd = _pte.NewCharIndex; + //int dd3 = _lineWalker.CharIndex; + + + + //if (content != null) + //{ + // //replace + // //record hx as once*** + // for (int i = 0; i < nBackSpace; i++) + // { + + // } + // //------------------ + // int j = content.Length; + // if (j > 0) + // { + // //TODO: ! replace with text*** + + // //for (int i = 0; i < j; i++) + // //{ + // // char c = content[i]; + // // _editWalker.AddCharacter(c); + + // // //TODO:... review this again! + + // // var cmd = new DocActionCharTyping(c, _editWalker.LineNumber, _editWalker.CharIndex); + // // _commandHistoryList.AddDocAction(cmd); + // // _sessionListener?.AddDocAction(cmd); + // //} + // } + //} + } + + + readonly TextCopyBufferUtf32 _tmpBuffer = new TextCopyBufferUtf32();//TODO: use pool + public void AddText(string doc) + { + //helper + _tmpBuffer.Clear(); + _tmpBuffer.Append(doc); + AddText(_tmpBuffer); + } + + public void AddText(TextCopyBuffer input) + { + _hx.IncrementHxStepNumber(); + RemoveSelectedText(); + bool isRecordingHx = EnableUndoHistoryRecording; + EnableUndoHistoryRecording = true; + if (input.Length > 0) + { + int prev_lineNo = _pte.CurrentLineNumber; + //add multiline text to the model + UpdateCaretPos(); + + _hx.AddText(input); + + _pte.NewCharIndex = _lineWalker.NewCharIndex; + _pte.AddText(input); + // + + int cur_lineNo = _pte.CurrentLineNumber; + + //then update + //update visual presentation of all lines + + for (int i = prev_lineNo; i <= cur_lineNo; ++i) + { + TextLineBox linebox = _textLayer.GetTextLine(i); + if (linebox != null) + { + UpdateLinePresentation2(linebox, 0, -1); + } + else + { + //not found this line + + if (i == _textLayer.LineCount) + { + linebox = new TextLineBox(_textLayer); + _textLayer.AppendNewLine(linebox); + UpdateLinePresentation2(linebox, 0, -1); + } + else + { + throw new NotSupportedException(); + } + } + } + + int end_LineCharIndex = _pte.NewCharIndex; + CurrentLineNumber = _pte.CurrentLineNumber; + _pte.NewCharIndex = end_LineCharIndex; + TryMoveCaretTo(end_LineCharIndex, true); + } + + EnableUndoHistoryRecording = isRecordingHx; + + _updateJustCurrentLine = false; + // + NotifyContentSizeChanged(); + } + + + internal void Clear() + { + //1. + CancelSelect(); + _textLayer.Clear(); + + //clear all------- + + MoveToLine(0); + //clear current text + int currentCharIndex = _lineWalker.NewCharIndex; + _lineWalker.CurrentLine.Clear(); + _lineWalker.CurrentLine.TextLineReCalculateActualLineSize(); + _lineWalker.CurrentLine.RefreshInlineArrange(); + _lineWalker.EnsureCurrentTextRun(currentCharIndex); + + _lineWalker.EnsureCurrentTextRun(); + //------- + // + NotifyContentSizeChanged(); + } + + } +} \ No newline at end of file diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.1_MultiLineController/VisualTextFlowEditSession_part2.cs b/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.1_MultiLineController/VisualTextFlowEditSession_part2.cs new file mode 100644 index 000000000..b629a7e64 --- /dev/null +++ b/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.1_MultiLineController/VisualTextFlowEditSession_part2.cs @@ -0,0 +1,353 @@ +//MIT, 2019-present, WinterDev + +using System; +using PixelFarm.Drawing; + +namespace LayoutFarm.TextFlow +{ + partial class VisualTextFlowEditSession : ITextFlowSelectSession + { + +#if DEBUG + //internal debugActivityRecorder _dbugActivityRecorder; + //internal bool dbugEnableTextManRecorder = false; +#endif + + protected VisualSelectionRange _selectionRange;//primary visual selection + public event EventHandler SelectionCanceled; + public Run CurrentTextRun => _lineWalker.GetCurrentTextRun(); + + public void SelectAll() + { + //model + CurrentLineNumber = 0; + SetCaretPos(0, 0); + StartSelect(); + CurrentLineNumber = LineCount - 1;//move to last line + _lineWalker.SetCurrentCharIndexToEnd();//move to end + EndSelect(); + } + + public void StartSelect() + { + //active selection + EditableVisualPointInfo currentPoint = GetCurrentPointInfo(); + if (_selectionRange == null) + { + _selectionRange = new VisualSelectionRange(_textLayer, currentPoint, currentPoint); + } + else + { + _selectionRange.StartPoint = _selectionRange.EndPoint = currentPoint; + } + + } + public void EndSelect() + { + if (_selectionRange != null) + { + Rectangle before = _selectionRange.GetSelectionUpdateArea(); + _selectionRange.EndPoint = GetCurrentPointInfo(); + Rectangle after = _selectionRange.GetSelectionUpdateArea(); + _textLayer.ClientLineBubbleupInvalidateArea(Rectangle.Union(before, after)); + } + } + + public void CancelSelect() + { + + if (_selectionRange != null) + { + //invalidate graphic area? + _textLayer.ClientLineBubbleupInvalidateArea(_selectionRange.GetSelectionUpdateArea()); + } + + _selectionRange = null; + _pte.CancelSelect(); + _hx.CancelSelection(); + SelectionCanceled?.Invoke(this, EventArgs.Empty); + } + public void StartSelectIfNoSelection() + { + if (_selectionRange == null) + { + this.StartSelect(); + } + } + public void EndSelectIfNoSelection() + { + if (_selectionRange == null) + { + this.StartSelect(); + } + this.EndSelect(); + } + + void MoveToNextLine() => MoveToLine(_lineWalker.LineNumber + 1); + + void MoveToPrevLine() => MoveToLine(_lineWalker.LineNumber - 1); + + // + public int CurrentLineCharCount => _lineWalker.CharCount; + // + public int LineCount => _textLayer.LineCount; + + /// + /// index of new char on the current line + /// + public int CurrentLineNewCharIndex => _lineWalker.NewCharIndex; + // + public int CurrentLineNumber + { + get => _lineWalker.LineNumber; + set + { + int diff = value - _lineWalker.LineNumber; + switch (diff) + { + case 0: + { + //same line + return; + } + case 1: + { + if (_lineWalker.HasNextLine) + { + MoveToNextLine(); + DoHome(); + } + } + break; + case -1: + { + if (_lineWalker.HasPrevLine) + { + MoveToPrevLine(); + DoEnd(); + } + } + break; + default: + { + //TODO review here + if (diff > 1) + { + MoveToLine(value); + } + else + { + if (value < -1) + { + MoveToLine(value); + //_walker.MoveToLine(value); + } + else + { + MoveToLine(value); + //_walker.MoveToLine(value); + } + } + } + break; + } + } + } + + public VisualSelectionRange SelectionRange => _selectionRange; + + public void UpdateSelectionRange() + { + if (_selectionRange != null) + { + _selectionRange.UpdateSelectionRange(); + } + } + + public EditableVisualPointInfo GetCurrentPointInfo() => _lineWalker.GetCurrentPointInfo(); + + /// + /// find underlying word at current caret pos + /// + public void FindUnderlyingWord(out int startAt, out int len) + { + _lineWalker.FindCurrentHitWord(out startAt, out len); + } + void MoveToLine(int lineNumber) + { + //move to next visual line + TextLineBox linebox = _textLayer.GetTextLine(lineNumber); + if (linebox == null) + { + //error=> line not found + return; + } + _lineWalker.LoadLine(linebox); + _pte.CurrentLineNumber = lineNumber; + } + public void TryMoveCaretTo(int charIndex, bool backward = false) + { + if (charIndex < 0) + { + throw new NotSupportedException(); + } + + if (CurrentLineNewCharIndex == charIndex) { return; } + //---- + + //on tech model + if (_pte.NewCharIndex == 0 && backward) + { + // move to prev line? + if (backward && _lineWalker.LineNumber > 0) + { + //move to prev line + MoveToPrevLine(); + DoEnd(); + } + } + else + { + //move to next line + if (charIndex < _pte.CurrentLineCharCount) + { + //on the same line + _pte.TryMoveCaretTo(charIndex, backward); + //update presentation + _lineWalker.SetCurrentCharIndex2(_pte.NewCharIndex); + } + else + { + if (_pte.IsOnTheEnd() && !backward) + { + if (_lineWalker.HasNextLine) + { + MoveToNextLine(); + } + } + else + { + //on the same line + _pte.TryMoveCaretTo(charIndex, backward); + //update presentation + _lineWalker.SetCurrentCharIndex2(_pte.NewCharIndex); + } + } + } + } + public void DoEnd() + { + _pte.DoEnd(); + _lineWalker.SetCurrentCharIndexToEnd(); + } + + public void ReplaceCurrentLine(string newlineContent) + { + //temp fix + throw new NotSupportedException(); + } + public void DoHome() + { +#if DEBUG + //if (dbugEnableTextManRecorder) + //{ + // _dbugActivityRecorder.WriteInfo("TxLMan::DoHome"); + // _dbugActivityRecorder.BeginContext(); + //} +#endif + + _pte.DoHome();// + _lineWalker.SetCurrentCharIndexToBegin(); +#if DEBUG + //if (dbugEnableTextManRecorder) + //{ + // _dbugActivityRecorder.EndContext(); + //} +#endif + } + + public void TryMoveCaretForward() + { + //move caret forward 1 key stroke + TryMoveCaretTo(_lineWalker.NewCharIndex + 1); + } + public void TryMoveCaretBackward() + { + if (_lineWalker.NewCharIndex == 0) + { + //begin of the line + if (CurrentLineNumber > 0) + { + CurrentLineNumber--; + DoEnd(); + } + } + else + { + TryMoveCaretTo(_lineWalker.NewCharIndex - 1, true); + } + } + // + + // + public bool IsOnEndOfLine => _lineWalker.IsOnEndOfLine; + public bool IsOnStartOfLine => _lineWalker.IsOnStartOfLine; + public int CurrentCaretHeight + { + get + { + Run currentRun = this.CurrentTextRun; + return (currentRun != null) ? currentRun.Height : 17; //TODO: review this... + } + } + public Point CaretPos + { + get => _lineWalker.CaretPos; + set + { + if (_textLayer.LineCount > 0) + { + TextLineBox line = _textLayer.GetTextLineAtPos(value.Y); + int calculatedLineId = 0; + int lineTop = 0; + if (line != null) + { + calculatedLineId = line.LineNumber; + lineTop = line.Top; + } + this.CurrentLineNumber = calculatedLineId; + _lineWalker.TrySetCaretPos(value.X); + //check selected char index + } + } + } + // + public int GetNextCharacterWidth() => _lineWalker.NextCharWidth; + // + public void SetCaretPos(int x, int y) + { + if (_textLayer.LineCount > 0) + { + TextLineBox line = _textLayer.GetTextLineAtPos(y); + int lineNo = 0; + int lineTop = 0; + if (line != null) + { + lineNo = line.LineNumber; + lineTop = line.Top; + } + + this.CurrentLineNumber = lineNo; + + _lineWalker.TrySetCaretPos(x); + } + } + public Rectangle CurrentLineArea => _lineWalker.LineArea; + + + } + + + + +} \ No newline at end of file diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.2_TextRenderBox/EditorCaret.cs b/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.2_TextRenderBox/EditorCaret.cs index c60d93127..cde2abf6d 100644 --- a/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.2_TextRenderBox/EditorCaret.cs +++ b/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.2_TextRenderBox/EditorCaret.cs @@ -1,7 +1,7 @@ //Apache2, 2014-present, WinterDev using PixelFarm.Drawing; -namespace LayoutFarm.TextEditing +namespace LayoutFarm.TextFlow { struct EditorCaret diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.2_TextRenderBox/GlobalCaretController.cs b/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.2_TextRenderBox/GlobalCaretController.cs index d039b0a7c..650d3ddde 100644 --- a/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.2_TextRenderBox/GlobalCaretController.cs +++ b/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.2_TextRenderBox/GlobalCaretController.cs @@ -3,7 +3,7 @@ using System; using LayoutFarm.RenderBoxes; using LayoutFarm.UI; -namespace LayoutFarm.TextEditing +namespace LayoutFarm.TextFlow { static class GlobalCaretController { diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.2_TextRenderBox/TextEditRenderBox.cs b/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.2_TextRenderBox/TextEditRenderBox.cs index 594f5953c..974254f0a 100644 --- a/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.2_TextRenderBox/TextEditRenderBox.cs +++ b/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.2_TextRenderBox/TextEditRenderBox.cs @@ -4,8 +4,7 @@ using LayoutFarm.UI; using PixelFarm.Drawing; - -namespace LayoutFarm.TextEditing +namespace LayoutFarm.TextFlow { public sealed class TextEditRenderBox : TextFlowRenderBox @@ -57,8 +56,8 @@ protected override void RenderClientContent(DrawBoard d, UpdateArea updateArea) if (RenderCaret && _stateShowCaret && _isEditable) { d.SetClipRect(new Rectangle(0, 0, this.Width, this.Height)); - Point textManCaretPos = _editSession.CaretPos; - _myCaret.DrawCaret(d, textManCaretPos.X, textManCaretPos.Y); + Point pos = _visualEditSession.CaretPos; + _myCaret.DrawCaret(d, pos.X, pos.Y); } } @@ -87,12 +86,12 @@ public override void Focus() public override void Blur() { if (_isEditable && !_blurring) - { + { _blurring = true; GlobalCaretController.CurrentTextEditBox = null; this.SetCaretVisible(false); _isFocus = false; - _blurring = false; + _blurring = false; } } @@ -117,7 +116,7 @@ public override void HandleKeyPress(UIKeyEventArgs e) if (_textSurfaceEventListener != null && !(preventDefault = TextSurfaceEventListener.NotifyPreviewKeyPress(_textSurfaceEventListener, e))) { - _editSession.UpdateSelectionRange(); + _visualEditSession.UpdateSelectionRange(); } if (preventDefault) { @@ -126,14 +125,14 @@ public override void HandleKeyPress(UIKeyEventArgs e) if (_isEditable) { - int insertAt = _editSession.CurrentLineCharIndex; + int insertAt = _visualEditSession.CurrentLineNewCharIndex; - _editSession.AddCharToCurrentLine(e.KeyChar); + _visualEditSession.AddChar(e.KeyChar); if (_textSurfaceEventListener != null) { //TODO: review this again *** - if (_editSession.SelectionRange != null) + if (_visualEditSession.SelectionRange != null) { TextSurfaceEventListener.NotifyCharacterReplaced(_textSurfaceEventListener, e.KeyChar); } @@ -185,6 +184,7 @@ public override void HandleKeyUp(UIKeyEventArgs e) } public override void HandleKeyDown(UIKeyEventArgs e) { + this.SetCaretVisible(true); if (!e.HasKeyData) { @@ -207,7 +207,7 @@ public override void HandleKeyDown(UIKeyEventArgs e) { if (_isEditable) { - if (_editSession.SelectionRange != null) + if (_visualEditSession.SelectionRange != null) { InvalidateGraphicOfCurrentSelectionArea(); } @@ -217,15 +217,15 @@ public override void HandleKeyDown(UIKeyEventArgs e) } if (_textSurfaceEventListener == null) { - _editSession.DoBackspace(); + _visualEditSession.DoBackspace(); } else { if (!TextSurfaceEventListener.NotifyPreviewBackSpace(_textSurfaceEventListener, e) && - _editSession.DoBackspace()) + _visualEditSession.DoBackspace()) { TextSurfaceEventListener.NotifyCharactersRemoved(_textSurfaceEventListener, - new TextDomEventArgs(_editSession._updateJustCurrentLine)); + new TextDomEventArgs(_visualEditSession._updateJustCurrentLine)); } } EnsureCaretVisible(); @@ -236,7 +236,7 @@ public override void HandleKeyDown(UIKeyEventArgs e) { if (_isEditable) { - if (_editSession.SelectionRange != null) + if (_visualEditSession.SelectionRange != null) { InvalidateGraphicOfCurrentSelectionArea(); } @@ -246,13 +246,16 @@ public override void HandleKeyDown(UIKeyEventArgs e) } if (_textSurfaceEventListener == null) { - _editSession.DoDelete(); + _visualEditSession.DoDelete(); } else { - VisualSelectionRangeSnapShot delpart = _editSession.DoDelete(); + + _visualEditSession.DoDelete(); + + SelectionRangeSnapShot delpart = new SelectionRangeSnapShot(); TextSurfaceEventListener.NotifyCharactersRemoved(_textSurfaceEventListener, - new TextDomEventArgs(_editSession._updateJustCurrentLine, delpart)); + new TextDomEventArgs(_visualEditSession._updateJustCurrentLine, delpart)); } EnsureCaretVisible(); @@ -292,52 +295,54 @@ public override void HandleKeyDown(UIKeyEventArgs e) DoEnd(true); // } break; - case UIKeys.C: + case UIKeys.V: { - using (StringBuilderPool.GetFreeStringBuilder(out StringBuilder stBuilder)) + if (_isEditable && Clipboard.ContainsUnicodeText()) { - _editSession.CopySelectedTextToPlainText(stBuilder); - if (stBuilder != null) - { - if (stBuilder.Length == 0) - { - Clipboard.Clear(); - } - else - { - Clipboard.SetText(stBuilder.ToString()); - } - } + //1. we need to parse multi-line to single line + //this may need text-break services + _visualEditSession.AddText(Clipboard.GetUnicodeText()); + EnsureCaretVisible(); } } break; - case UIKeys.V: + case UIKeys.C: { - if (_isEditable && Clipboard.ContainsUnicodeText()) + using (new StringBuilderPoolContext(out StringBuilder sb)) { - //1. we need to parse multi-line to single line - //this may need text-break services - - _editSession.AddTextToCurrentLine(PlainTextDocumentHelper.CreatePlainTextDocument(Clipboard.GetUnicodeText())); - - EnsureCaretVisible(); + _visualEditSession.CopySelectedTextToPlainText(sb); + //copy to plain text + if (sb.Length == 0) + { + Clipboard.Clear(); + } + else + { + Clipboard.SetText(sb.ToString()); + } } } break; case UIKeys.X: { - if (_isEditable && _editSession.SelectionRange != null) + if (_isEditable && _visualEditSession.SelectionRange != null) { InvalidateGraphicOfCurrentSelectionArea(); - using (StringBuilderPool.GetFreeStringBuilder(out StringBuilder stBuilder)) + using (new StringBuilderPoolContext(out StringBuilder sb)) { - _editSession.CopySelectedTextToPlainText(stBuilder); - if (stBuilder != null) + _visualEditSession.CopySelectedTextToPlainText(sb); + + if (sb.Length == 0) { - Clipboard.SetText(stBuilder.ToString()); + Clipboard.Clear(); + } + else + { + Clipboard.SetText(sb.ToString()); } - _editSession.DoDelete(); + + _visualEditSession.DoDelete(); EnsureCaretVisible(); } } @@ -347,7 +352,7 @@ public override void HandleKeyDown(UIKeyEventArgs e) { if (_isEditable) { - _editSession.UndoLastAction(); + _visualEditSession.UndoLastAction(); EnsureCaretVisible(); } } @@ -356,7 +361,7 @@ public override void HandleKeyDown(UIKeyEventArgs e) { if (_isEditable) { - _editSession.ReverseLastUndoAction(); + _visualEditSession.ReverseLastUndoAction(); EnsureCaretVisible(); } } @@ -370,8 +375,6 @@ public override void HandleKeyDown(UIKeyEventArgs e) } } - // - public override bool HandleProcessDialogKey(UIKeyEventArgs e) { @@ -384,7 +387,7 @@ public override bool HandleProcessDialogKey(UIKeyEventArgs e) switch (e.KeyCode) { - + default: return false; case UIKeys.Escape: case UIKeys.End: case UIKeys.Home: @@ -418,21 +421,21 @@ public override bool HandleProcessDialogKey(UIKeyEventArgs e) { if (_isMultiLine) { - if (_editSession.SelectionRange != null) + if (_visualEditSession.SelectionRange != null) { InvalidateGraphicOfCurrentSelectionArea(); } - if (_editSession.SelectionRange != null) + if (_visualEditSession.SelectionRange != null) { //this selection range will be remove first } - int lineBeforeSplit = _editSession.CurrentLineNumber; - int lineCharBeforeSplit = _editSession.CurrentLineCharIndex; + int lineBeforeSplit = _visualEditSession.CurrentLineNumber; + int lineCharBeforeSplit = _visualEditSession.CurrentLineNewCharIndex; - _editSession.SplitCurrentLineIntoNewLine(); + _visualEditSession.SplitIntoNewLine(); if (_textSurfaceEventListener != null) { @@ -443,7 +446,7 @@ public override bool HandleProcessDialogKey(UIKeyEventArgs e) TextSurfaceEventListener.NofitySplitNewLine(_textSurfaceEventListener, splitEventE); } - Rectangle lineArea = _editSession.CurrentLineArea; + Rectangle lineArea = _visualEditSession.CurrentLineArea; if (lineArea.Bottom > this.ViewportBottom) { ScrollOffset(0, lineArea.Bottom - this.ViewportBottom); @@ -476,54 +479,42 @@ public override bool HandleProcessDialogKey(UIKeyEventArgs e) } InvalidateGraphicOfCurrentLineArea(); + if (!e.Shift) { - _editSession.CancelSelect(); + _visualEditSession.CancelSelect(); } else { - _editSession.StartSelectIfNoSelection(); + _visualEditSession.StartSelectIfNoSelection(); } - Point currentCaretPos = Point.Empty; + if (!_isMultiLine) { - if (!_editSession.IsOnStartOfLine) + if (!_visualEditSession.IsOnStartOfLine) { #if DEBUG - Point prvCaretPos = _editSession.CaretPos; + Point prvCaretPos = _visualEditSession.CaretPos; #endif - _editSession.TryMoveCaretBackward(); - currentCaretPos = _editSession.CaretPos; + _visualEditSession.TryMoveCaretBackward(); + } } else { - if (_editSession.IsOnStartOfLine) - { - _editSession.TryMoveCaretBackward(); - currentCaretPos = _editSession.CaretPos; - } - else - { - if (!_editSession.IsOnStartOfLine) - { -#if DEBUG - Point prvCaretPos = _editSession.CaretPos; -#endif - _editSession.TryMoveCaretBackward(); - currentCaretPos = _editSession.CaretPos; - } - } + _visualEditSession.TryMoveCaretBackward(); + } //------------------- if (e.Shift) { - _editSession.EndSelectIfNoSelection(); + _visualEditSession.EndSelectIfNoSelection(); } //------------------- EnsureCaretVisible(); + if (_textSurfaceEventListener != null) { TextSurfaceEventListener.NotifyArrowKeyCaretPosChanged(_textSurfaceEventListener, e.KeyCode); @@ -542,11 +533,11 @@ public override bool HandleProcessDialogKey(UIKeyEventArgs e) InvalidateGraphicOfCurrentLineArea(); if (!e.Shift) { - _editSession.CancelSelect(); + _visualEditSession.CancelSelect(); } else { - _editSession.StartSelectIfNoSelection(); + _visualEditSession.StartSelectIfNoSelection(); } @@ -554,31 +545,31 @@ public override bool HandleProcessDialogKey(UIKeyEventArgs e) if (!_isMultiLine) { #if DEBUG - Point prvCaretPos = _editSession.CaretPos; + Point prvCaretPos = _visualEditSession.CaretPos; #endif - _editSession.TryMoveCaretForward(); - currentCaretPos = _editSession.CaretPos; + _visualEditSession.TryMoveCaretForward(); + currentCaretPos = _visualEditSession.CaretPos; } else { - if (_editSession.IsOnEndOfLine) + if (_visualEditSession.IsOnEndOfLine) { - _editSession.TryMoveCaretForward(); - currentCaretPos = _editSession.CaretPos; + _visualEditSession.TryMoveCaretForward(); + currentCaretPos = _visualEditSession.CaretPos; } else { #if DEBUG - Point prvCaretPos = _editSession.CaretPos; + Point prvCaretPos = _visualEditSession.CaretPos; #endif - _editSession.TryMoveCaretForward(); - currentCaretPos = _editSession.CaretPos; + _visualEditSession.TryMoveCaretForward(); + currentCaretPos = _visualEditSession.CaretPos; } } //------------------- if (e.Shift) { - _editSession.EndSelectIfNoSelection(); + _visualEditSession.EndSelectIfNoSelection(); } //------------------- @@ -604,52 +595,52 @@ public override bool HandleProcessDialogKey(UIKeyEventArgs e) if (!_isInVerticalPhase) { _isInVerticalPhase = true; - _verticalExpectedCharIndex = _editSession.CharIndex; + _verticalExpectedCharIndex = _visualEditSession.CurrentLineNewCharIndex; } //---------------------------- if (!e.Shift) { - _editSession.CancelSelect(); + _visualEditSession.CancelSelect(); } else { - _editSession.StartSelectIfNoSelection(); + _visualEditSession.StartSelectIfNoSelection(); } //---------------------------- //approximate line per viewport - int line_per_viewport = Height / _editSession.CurrentLineArea.Height; + int line_per_viewport = Height / _visualEditSession.CurrentLineArea.Height; if (line_per_viewport > 1) { - if (_editSession.CurrentLineNumber - line_per_viewport < 0) + if (_visualEditSession.CurrentLineNumber - line_per_viewport < 0) { //move to first line - _editSession.CurrentLineNumber = 0; + _visualEditSession.CurrentLineNumber = 0; } else { - _editSession.CurrentLineNumber -= line_per_viewport; + _visualEditSession.CurrentLineNumber -= line_per_viewport; } } - if (_verticalExpectedCharIndex > _editSession.CurrentLineCharCount - 1) + if (_verticalExpectedCharIndex > _visualEditSession.CurrentLineCharCount - 1) { - _editSession.TryMoveCaretTo(_editSession.CurrentLineCharCount); + _visualEditSession.TryMoveCaretTo(_visualEditSession.CurrentLineCharCount); } else { - _editSession.TryMoveCaretTo(_verticalExpectedCharIndex); + _visualEditSession.TryMoveCaretTo(_verticalExpectedCharIndex); } //---------------------------- if (e.Shift) { - _editSession.EndSelectIfNoSelection(); + _visualEditSession.EndSelectIfNoSelection(); } - Rectangle lineArea = _editSession.CurrentLineArea; + Rectangle lineArea = _visualEditSession.CurrentLineArea; if (lineArea.Top < ViewportTop) { ScrollOffset(0, lineArea.Top - ViewportTop); @@ -685,49 +676,49 @@ public override bool HandleProcessDialogKey(UIKeyEventArgs e) if (!_isInVerticalPhase) { _isInVerticalPhase = true; - _verticalExpectedCharIndex = _editSession.CharIndex; + _verticalExpectedCharIndex = _visualEditSession.CurrentLineNewCharIndex; } //---------------------------- if (!e.Shift) { - _editSession.CancelSelect(); + _visualEditSession.CancelSelect(); } else { - _editSession.StartSelectIfNoSelection(); + _visualEditSession.StartSelectIfNoSelection(); } //---------------------------- - int line_per_viewport = Height / _editSession.CurrentLineArea.Height; + int line_per_viewport = Height / _visualEditSession.CurrentLineArea.Height; - if (_editSession.CurrentLineNumber + line_per_viewport < _editSession.LineCount) + if (_visualEditSession.CurrentLineNumber + line_per_viewport < _visualEditSession.LineCount) { - _editSession.CurrentLineNumber += line_per_viewport; + _visualEditSession.CurrentLineNumber += line_per_viewport; } else { //move to last line - _editSession.CurrentLineNumber = _editSession.LineCount - 1; + _visualEditSession.CurrentLineNumber = _visualEditSession.LineCount - 1; } - if (_verticalExpectedCharIndex > _editSession.CurrentLineCharCount - 1) + if (_verticalExpectedCharIndex > _visualEditSession.CurrentLineCharCount - 1) { - _editSession.TryMoveCaretTo(_editSession.CurrentLineCharCount); + _visualEditSession.TryMoveCaretTo(_visualEditSession.CurrentLineCharCount); } else { - _editSession.TryMoveCaretTo(_verticalExpectedCharIndex); + _visualEditSession.TryMoveCaretTo(_verticalExpectedCharIndex); } //---------------------------- if (e.Shift) { - _editSession.EndSelectIfNoSelection(); + _visualEditSession.EndSelectIfNoSelection(); } //---------------------------- - Rectangle lineArea = _editSession.CurrentLineArea; + Rectangle lineArea = _visualEditSession.CurrentLineArea; if (lineArea.Bottom > this.ViewportBottom) { ScrollOffset(0, lineArea.Bottom - this.ViewportBottom); @@ -758,48 +749,50 @@ public override bool HandleProcessDialogKey(UIKeyEventArgs e) if (!_isInVerticalPhase) { _isInVerticalPhase = true; - _verticalExpectedCharIndex = _editSession.CharIndex; + _verticalExpectedCharIndex = _visualEditSession.CurrentLineNewCharIndex; } //---------------------------- if (!e.Shift) { - _editSession.CancelSelect(); + _visualEditSession.CancelSelect(); } else { - _editSession.StartSelectIfNoSelection(); + _visualEditSession.StartSelectIfNoSelection(); } //---------------------------- - _editSession.CurrentLineNumber++; - if (_verticalExpectedCharIndex > _editSession.CurrentLineCharCount - 1) + _visualEditSession.CurrentLineNumber++; + + if (_verticalExpectedCharIndex > _visualEditSession.CurrentLineCharCount - 1) { - _editSession.TryMoveCaretTo(_editSession.CurrentLineCharCount); + _visualEditSession.TryMoveCaretTo(_visualEditSession.CurrentLineCharCount); } else { - _editSession.TryMoveCaretTo(_verticalExpectedCharIndex); + _visualEditSession.TryMoveCaretTo(_verticalExpectedCharIndex); } //---------------------------- if (e.Shift) { - _editSession.EndSelectIfNoSelection(); + _visualEditSession.EndSelectIfNoSelection(); } //---------------------------- - Rectangle lineArea = _editSession.CurrentLineArea; + Rectangle lineArea = _visualEditSession.CurrentLineArea; if (lineArea.Bottom > this.ViewportBottom) { ScrollOffset(0, lineArea.Bottom - this.ViewportBottom); } else { - InvalidateGraphicOfCurrentLineArea(); } } + EnsureCaretVisible(); + if (_textSurfaceEventListener != null) { TextSurfaceEventListener.NotifyArrowKeyCaretPosChanged(_textSurfaceEventListener, keyData); @@ -823,37 +816,37 @@ public override bool HandleProcessDialogKey(UIKeyEventArgs e) if (!_isInVerticalPhase) { _isInVerticalPhase = true; - _verticalExpectedCharIndex = _editSession.CharIndex; + _verticalExpectedCharIndex = _visualEditSession.CurrentLineNewCharIndex; } //---------------------------- if (!e.Shift) { - _editSession.CancelSelect(); + _visualEditSession.CancelSelect(); } else { - _editSession.StartSelectIfNoSelection(); + _visualEditSession.StartSelectIfNoSelection(); } //---------------------------- - _editSession.CurrentLineNumber--; - if (_verticalExpectedCharIndex > _editSession.CurrentLineCharCount - 1) + _visualEditSession.CurrentLineNumber--; + if (_verticalExpectedCharIndex > _visualEditSession.CurrentLineCharCount - 1) { - _editSession.TryMoveCaretTo(_editSession.CurrentLineCharCount); + _visualEditSession.TryMoveCaretTo(_visualEditSession.CurrentLineCharCount); } else { - _editSession.TryMoveCaretTo(_verticalExpectedCharIndex); + _visualEditSession.TryMoveCaretTo(_verticalExpectedCharIndex); } //---------------------------- if (e.Shift) { - _editSession.EndSelectIfNoSelection(); + _visualEditSession.EndSelectIfNoSelection(); } - Rectangle lineArea = _editSession.CurrentLineArea; + Rectangle lineArea = _visualEditSession.CurrentLineArea; if (lineArea.Top < ViewportTop) { ScrollOffset(0, lineArea.Top - ViewportTop); @@ -880,10 +873,7 @@ public override bool HandleProcessDialogKey(UIKeyEventArgs e) return true; } - default: - { - return false; - } + } } @@ -905,7 +895,7 @@ protected override void EnsureCaretVisible() if (_isEditable) { - _myCaret.SetHeight(_editSession.CurrentCaretHeight); + _myCaret.SetHeight(_visualEditSession.CurrentCaretHeight); } } @@ -914,25 +904,25 @@ public void DoTab() { if (!_isEditable) return; // - if (_editSession.SelectionRange != null) + if (_visualEditSession.SelectionRange != null) { - VisualSelectionRange visualSelectionRange = _editSession.SelectionRange; - visualSelectionRange.SwapIfUnOrder(); + VisualSelectionRange visualSelectionRange = _visualEditSession.SelectionRange; + visualSelectionRange.Normalize(); if (visualSelectionRange.IsValid && !visualSelectionRange.IsOnTheSameLine) { InvalidateGraphicOfCurrentSelectionArea(); // - _editSession.DoTabOverSelectedRange(); + _visualEditSession.DoTabOverSelectedRange(); return; //finish here } } //------------ //do tab as usuall - int insertAt = _editSession.CurrentLineCharIndex; + int insertAt = _visualEditSession.CurrentLineNewCharIndex; for (int i = NumOfWhitespaceForSingleTab; i >= 0; --i) { - _editSession.AddCharToCurrentLine(' '); + _visualEditSession.AddChar(' '); } if (_textSurfaceEventListener != null) diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.2_TextRenderBox/TextFlowRenderBox.cs b/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.2_TextRenderBox/TextFlowRenderBox.cs index 646effb83..be1112c68 100644 --- a/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.2_TextRenderBox/TextFlowRenderBox.cs +++ b/src/PixelFarm/PaintLab.RenderTree.TextSurface/2.2_TextRenderBox/TextFlowRenderBox.cs @@ -6,14 +6,15 @@ using LayoutFarm.UI; using PixelFarm.Drawing; +using Typography.Text; -namespace LayoutFarm.TextEditing +namespace LayoutFarm.TextFlow { public class TextFlowRenderBox : AbstractRectRenderElement, ITextFlowLayerOwner { internal TextMarkerLayer _markerLayer; internal TextFlowLayer _textLayer; //this is a special layer that render text - internal TextFlowEditSession _editSession; + internal VisualTextFlowEditSession _visualEditSession; internal int _verticalExpectedCharIndex; internal readonly bool _isMultiLine = false; @@ -22,7 +23,7 @@ public class TextFlowRenderBox : AbstractRectRenderElement, ITextFlowLayerOwner internal bool _isInVerticalPhase = false; internal bool _isFocus = false; - internal bool _isDragBegin; + bool _isDragBegin; public TextFlowRenderBox(int width, int height, bool isMultiLine) : base(width, height) @@ -32,22 +33,45 @@ public TextFlowRenderBox(int width, int height, bool isMultiLine) defaultRunStyle.ReqFont = GlobalRootGraphic.CurrentRootGfx.DefaultTextEditFontInfo;//TODO: review here - _textLayer = new TextFlowLayer(this, defaultRunStyle); //presentation + _textLayer = new TextFlowLayer(this, defaultRunStyle); + _textLayer.AppendNewLine(new TextLineBox(_textLayer));// _textLayer.ContentSizeChanged += (s, e) => OnTextContentSizeChanged(); - // - _editSession = new TextFlowEditSession(_textLayer);//controller + //create + _visualEditSession = new VisualTextFlowEditSession(_textLayer);//controller _isMultiLine = isMultiLine; - RenderBackground = RenderSelectionRange = RenderMarkers = true; // MayHasViewport = true; BackgroundColor = Color.White;// Color.Transparent; } + + public static VisualTextFlowEditSession GetEditSession(TextFlowRenderBox textFlowRenderBox) => textFlowRenderBox._visualEditSession; + + public void Reload(PlainTextDocument plainTextDoc) + { + //clear + _visualEditSession.Clear(); + int j = plainTextDoc.LineCount; + using (var temp = new StringBuilderPoolContext(out StringBuilder sb)) + { + for (int i = 0; i < j; ++i) + { + sb.Length = 0;//clear + if (i > 0) + { + _visualEditSession.SplitIntoNewLine(); + } + plainTextDoc.WriteLineTo(i, sb); + _visualEditSession.AddText(sb.ToString()); + } + } + + } public void SelectAll() { - _editSession.SelectAll(); + _visualEditSession.SelectAll(); } public TextDrawingTech TextDrawingTech { get; set; } = TextDrawingTech.LcdSubPix; internal TextFlowLayer TextFlowLayer => _textLayer; @@ -55,7 +79,7 @@ public void SelectAll() public Color SelectionBackgroundColor { get; set; } = Color.Yellow; void ITextFlowLayerOwner.ClientLayerBubbleUpInvalidateArea(Rectangle clientInvalidatedArea) { - ////client line send up + //client line send up clientInvalidatedArea.Offset(this.X, this.Y); InvalidateParentGraphics(clientInvalidatedArea); @@ -67,7 +91,6 @@ void ITextFlowLayerOwner.ClientLayerBubbleUpInvalidateArea(Rectangle clientInval //TODO: we may use a single 'solid-run' for a Tab public byte NumOfWhitespaceForSingleTab { get; set; } - public static TextFlowEditSession GetCurrentEditSession(TextFlowRenderBox textEditRenderBox) => textEditRenderBox._editSession; public TextSpanStyle CurrentTextSpanStyle { @@ -94,10 +117,10 @@ public TextSpanStyle CurrentTextSpanStyle protected Rectangle GetSelectionUpdateArea() { - VisualSelectionRange selectionRange = _editSession.SelectionRange; + VisualSelectionRange selectionRange = _visualEditSession.SelectionRange; if (selectionRange != null && selectionRange.IsValid) { - return _editSession.SelectionRange.GetSelectionUpdateArea(); + return _visualEditSession.SelectionRange.GetSelectionUpdateArea(); } else { @@ -133,7 +156,7 @@ protected void InvalidateGraphicOfCurrentLineArea() #if DEBUG //Rectangle c_lineArea = _internalTextLayerController.CurrentParentLineArea; #endif - Rectangle lineArea = _editSession.CurrentLineArea; + Rectangle lineArea = _visualEditSession.CurrentLineArea; lineArea.Width = this.Width; //change original line area' width to this render element width #if DEBUG //if (lineArea.Height == 31) @@ -147,7 +170,7 @@ protected void InvalidateGraphicOfCurrentSelectionArea() { VisualSelectionRange selectionRange; - if ((selectionRange = _editSession.SelectionRange) != null && selectionRange.IsValid) + if ((selectionRange = _visualEditSession.SelectionRange) != null && selectionRange.IsValid) { InvalidateGraphics(selectionRange.GetSelectionUpdateArea()); } @@ -159,12 +182,12 @@ protected void InvalidateGraphicOfCurrentSelectionArea() public virtual void Blur() => _isFocus = false; - public void CancelSelection() => _editSession.CancelSelect(); + public void CancelSelection() => _visualEditSession.CancelSelect(); public bool IsFocused => _isFocus; - public int InnerContentWidth => IsMultiLine ? this.Width : _editSession.CurrentLineArea.Width; - public int InnerContentHeight => IsMultiLine ? _textLayer.Bottom : _editSession.CurrentLineArea.Height; + public int InnerContentWidth => IsMultiLine ? this.Width : _visualEditSession.CurrentLineArea.Width; + public int InnerContentHeight => IsMultiLine ? _textLayer.Bottom : _visualEditSession.CurrentLineArea.Height; public virtual void HandleMouseDown(UIMouseDownEventArgs e) { @@ -174,11 +197,11 @@ public virtual void HandleMouseDown(UIMouseDownEventArgs e) if (!e.Shift) { - _editSession.SetCaretPos(e.X, e.Y); - if (_editSession.SelectionRange != null) + _visualEditSession.SetCaretPos(e.X, e.Y); + if (_visualEditSession.SelectionRange != null) { Rectangle r = GetSelectionUpdateArea(); - _editSession.CancelSelect(); + _visualEditSession.CancelSelect(); InvalidateGraphics(r); } else @@ -186,7 +209,7 @@ public virtual void HandleMouseDown(UIMouseDownEventArgs e) InvalidateGraphicOfCurrentLineArea(); } - if (_editSession.LatestHitRun is SolidRun latestHitSolidTextRun && + if (_visualEditSession.LatestHitRun is SolidRun latestHitSolidTextRun && latestHitSolidTextRun.ExternalRenderElement?.GetController() is LayoutFarm.UI.IUIEventListener listener) { //we mousedown on the solid text run @@ -195,9 +218,9 @@ public virtual void HandleMouseDown(UIMouseDownEventArgs e) } else { - _editSession.StartSelectIfNoSelection(); - _editSession.SetCaretPos(e.X, e.Y); - _editSession.EndSelect(); + _visualEditSession.StartSelectIfNoSelection(); + _visualEditSession.SetCaretPos(e.X, e.Y); + _visualEditSession.EndSelect(); InvalidateGraphicOfCurrentLineArea(); } } @@ -225,26 +248,26 @@ public virtual void HandleMouseWheel(UIMouseWheelEventArgs e) public virtual void HandleDoubleClick(UIMouseEventArgs e) { - _editSession.CancelSelect(); + _visualEditSession.CancelSelect(); Run textRun = this.CurrentTextRun; if (textRun != null) { #if DEBUG - VisualPointInfo pointInfo = _editSession.GetCurrentPointInfo(); + VisualPointInfo pointInfo = _visualEditSession.GetCurrentPointInfo(); int lineCharacterIndex = pointInfo.LineCharIndex; - int local_sel_Index = pointInfo.RunLocalSelectedIndex; + //int local_sel_Index = pointInfo.RunLocalSelectedIndex; #endif //default behaviour is select only a hit word under the caret //so ask the text layer to find a hit word - _editSession.FindUnderlyingWord(out int startAt, out int len); + _visualEditSession.FindUnderlyingWord(out int startAt, out int len); if (len > 0) { InvalidateGraphicOfCurrentLineArea(); - _editSession.TryMoveCaretTo(startAt, true); - _editSession.StartSelect(); - _editSession.TryMoveCaretTo(startAt + len); - _editSession.EndSelect(); + _visualEditSession.TryMoveCaretTo(startAt, true); + _visualEditSession.StartSelect(); + _visualEditSession.TryMoveCaretTo(startAt + len); + _visualEditSession.EndSelect(); //internalTextLayerController.TryMoveCaretTo(lineCharacterIndex - local_sel_Index, true); @@ -262,13 +285,13 @@ public void FindCurrentUnderlyingWord(out int startAt, out int len) if (textRun != null) { #if DEBUG - VisualPointInfo pointInfo = _editSession.GetCurrentPointInfo(); + VisualPointInfo pointInfo = _visualEditSession.GetCurrentPointInfo(); int lineCharacterIndex = pointInfo.LineCharIndex; - int local_sel_Index = pointInfo.RunLocalSelectedIndex; + //int local_sel_Index = pointInfo.RunLocalSelectedIndex; #endif //default behaviour is select only a hit word under the caret //so ask the text layer to find a hit word - _editSession.FindUnderlyingWord(out startAt, out len); + _visualEditSession.FindUnderlyingWord(out startAt, out len); } else { @@ -284,15 +307,15 @@ public virtual void HandleDrag(UIMouseMoveEventArgs e) //dbugMouseDragBegin++; //first time _isDragBegin = true; - _editSession.SetCaretPos(e.X, e.Y); - _editSession.StartSelect(); - _editSession.EndSelect(); + _visualEditSession.SetCaretPos(e.X, e.Y); + _visualEditSession.StartSelect(); + _visualEditSession.EndSelect(); } else { - _editSession.StartSelectIfNoSelection(); - _editSession.SetCaretPos(e.X, e.Y); - _editSession.EndSelect(); + _visualEditSession.StartSelectIfNoSelection(); + _visualEditSession.SetCaretPos(e.X, e.Y); + _visualEditSession.EndSelect(); } InvalidateGraphicOfCurrentSelectionArea(); @@ -302,9 +325,9 @@ public virtual void HandleDragEnd(UIMouseUpEventArgs e) { _isDragBegin = false; - _editSession.StartSelectIfNoSelection(); - _editSession.SetCaretPos(e.X, e.Y); - _editSession.EndSelect(); + _visualEditSession.StartSelectIfNoSelection(); + _visualEditSession.SetCaretPos(e.X, e.Y); + _visualEditSession.EndSelect(); //this.InvalidateGraphics(); InvalidateGraphicOfCurrentSelectionArea(); } @@ -325,7 +348,7 @@ public virtual void HandleKeyPress(UIKeyEventArgs e) e.CancelBubbling = true; InvalidateGraphicOfCurrentSelectionArea(); - _editSession.UpdateSelectionRange(); + _visualEditSession.UpdateSelectionRange(); EnsureCaretVisible(); } @@ -334,18 +357,19 @@ public virtual void HandleKeyDown(UIKeyEventArgs e) { } + public virtual void DoHome(bool pressShitKey) { if (!pressShitKey) { - _editSession.DoHome(); - _editSession.CancelSelect(); + _visualEditSession.DoHome(); + _visualEditSession.CancelSelect(); } else { - _editSession.StartSelectIfNoSelection(); //start select before move to home - _editSession.DoHome(); //move cursor to default home - _editSession.EndSelect(); //end selection + _visualEditSession.StartSelectIfNoSelection(); //start select before move to home + _visualEditSession.DoHome(); //move cursor to default home + _visualEditSession.EndSelect(); //end selection } EnsureCaretVisible(); @@ -354,14 +378,14 @@ public virtual void DoEnd(bool pressShitKey) { if (!pressShitKey) { - _editSession.DoEnd(); - _editSession.CancelSelect(); + _visualEditSession.DoEnd(); + _visualEditSession.CancelSelect(); } else { - _editSession.StartSelectIfNoSelection(); - _editSession.DoEnd(); - _editSession.EndSelect(); + _visualEditSession.StartSelectIfNoSelection(); + _visualEditSession.DoEnd(); + _visualEditSession.EndSelect(); } EnsureCaretVisible(); @@ -369,21 +393,21 @@ public virtual void DoEnd(bool pressShitKey) public bool IsMultiLine => _isMultiLine; // - public int CurrentLineHeight => _editSession.CurrentLineArea.Height; + public int CurrentLineHeight => _visualEditSession.CurrentLineArea.Height; // - public int CurrentLineCharIndex => _editSession.CurrentLineCharIndex; + public int CurrentLineCharIndex => _visualEditSession.CurrentLineNewCharIndex; // - public int CurrentTextRunCharIndex => _editSession.CurrentTextRunCharIndex; + // public int CurrentLineNumber { - get => _editSession.CurrentLineNumber; - set => _editSession.CurrentLineNumber = value; + get => _visualEditSession.CurrentLineNumber; + set => _visualEditSession.CurrentLineNumber = value; } // public void ScrollToCurrentLine() { - this.ScrollToLocation(0, _editSession.CaretPos.Y); + this.ScrollToLocation(0, _visualEditSession.CaretPos.Y); } protected void RefreshSnapshotCanvas() @@ -395,12 +419,13 @@ public void HandleMouseUp(UIMouseUpEventArgs e) //empty? } // - public Run CurrentTextRun => _editSession.CurrentTextRun; + public Run CurrentTextRun => _visualEditSession.CurrentTextRun; // - public void GetSelectedText(StringBuilder output) - { - _editSession.CopySelectedTextToPlainText(output); - } + //public void GetSelectedText(StringBuilder output) + //{ + // throw new NotSupportedException(); + // //_editSession.CopySelectedTextToPlainText(output); + //} protected void EnsureLocationVisible(int textManCaretPosX, int textManCaretPosY) { @@ -414,7 +439,7 @@ protected void EnsureLocationVisible(int textManCaretPosX, int textManCaretPosY) { if (!_isMultiLine) { - var r = _editSession.CurrentLineArea; + var r = _visualEditSession.CurrentLineArea; //Rectangle r = internalTextLayerController.CurrentParentLineArea; if (r.Width >= this.Width) @@ -452,7 +477,7 @@ protected void EnsureLocationVisible(int textManCaretPosX, int textManCaretPosY) //---------------------- //vertical ?? //---------------------- - if (_editSession._updateJustCurrentLine) + if (_visualEditSession._updateJustCurrentLine) { InvalidateGraphicOfCurrentLineArea(); } @@ -487,7 +512,7 @@ public Color BackgroundColor public void RunVisitor(RunVisitor visitor) { //1. bg, no nothing - visitor.CurrentCaretPos = _editSession.CaretPos; + visitor.CurrentCaretPos = _visualEditSession.CaretPos; //2. markers if (!visitor.SkipMarkerLayer && _markerLayer != null && _markerLayer.VisualMarkerCount > 0) @@ -501,9 +526,9 @@ public void RunVisitor(RunVisitor visitor) } //3. - if (!visitor.SkipSelectionLayer && _editSession.SelectionRange != null) + if (!visitor.SkipSelectionLayer && _visualEditSession.SelectionRange != null) { - visitor.VisitSelectionRange(_editSession.SelectionRange); + visitor.VisitSelectionRange(_visualEditSession.SelectionRange); } //4. text layer @@ -513,13 +538,13 @@ public void RunVisitor(RunVisitor visitor) //5. others? } - public void ClearAllChildren() => _editSession.Clear(); + public void ClearAllChildren() => _visualEditSession.Clear(); protected override void RenderClientContent(DrawBoard d, UpdateArea updateArea) { RequestFont enterFont = d.CurrentFont; TextDrawingTech prev_text_drawing_tech = d.TextDrawingTech;//backup - + d.TextDrawingTech = this.TextDrawingTech; d.CurrentFont = this.CurrentTextSpanStyle.ReqFont; @@ -536,32 +561,32 @@ protected override void RenderClientContent(DrawBoard d, UpdateArea updateArea) } //2.1 markers - if (RenderMarkers && _markerLayer != null && - _markerLayer.VisualMarkerCount > 0) + if (RenderMarkers && _markerLayer != null && _markerLayer.VisualMarkerCount > 0) { - foreach (VisualMarkerSelectionRange marker in _markerLayer.VisualMarkers) + for (int i = 0; i < _markerLayer.VisualMarkerCount; ++i) { - marker.Draw(d, updateArea); + _markerLayer.VisualMarkers[i].Draw(d, updateArea); } + } Color prev_hintColor = d.TextBackgroundColorHint; - if (RenderSelectionRange && _editSession.SelectionRange != null) + if (RenderSelectionRange && _visualEditSession.SelectionRange != null) { //with selection - _editSession.SelectionRange.FontColor = SelectionTextColor; - _editSession.SelectionRange.BackgroundColor = SelectionBackgroundColor; + _visualEditSession.SelectionRange.FontColor = SelectionTextColor; + _visualEditSession.SelectionRange.BackgroundColor = SelectionBackgroundColor; if (d.TextDrawingTech == TextDrawingTech.LcdSubPix) { TextRun.s_currentRenderE = this; - _textLayer.DrawChildContentLcdEffectText(d, updateArea, _editSession.SelectionRange); + _textLayer.DrawChildContentLcdEffectText(d, updateArea, _visualEditSession.SelectionRange); TextRun.s_currentRenderE = null; //temp fix } else { - _editSession.SelectionRange.Draw(d, updateArea); + _visualEditSession.SelectionRange.Draw(d, updateArea); TextRun.s_currentRenderE = this;//temp fix _textLayer.DrawChildContent(d, updateArea); @@ -579,7 +604,6 @@ protected override void RenderClientContent(DrawBoard d, UpdateArea updateArea) #if DEBUG //for debug //canvas.FillRectangle(Color.Red, 0, 0, 5, 5); - #endif d.CurrentFont = enterFont; @@ -592,8 +616,8 @@ internal void OnTextContentSizeChanged() ContentSizeChanged?.Invoke(this, EventArgs.Empty); } - public Run LastestHitSolidTextRun => _textLayer.LatestHitRun as SolidRun; - public Run LastestHitRun => _textLayer.LatestHitRun; + //public Run LastestHitSolidTextRun => _textLayer.LatestHitRun as SolidRun; + //public Run LastestHitRun => _textLayer.LatestHitRun; //----------------------------------------------- @@ -731,47 +755,33 @@ void ScrollOffset_NotRaiseEvent(int dx, int dy, } } - public int LineCount => _editSession.LineCount; + public int LineCount => _visualEditSession.LineCount; public void ReplaceCurrentTextRunContent(int nBackspace, string t) { - _editSession.ReplaceLocalContent(nBackspace, t); - } - public void ReplaceCurrentLineTextRuns(IEnumerable textRuns) - { - _editSession.ReplaceCurrentLineTextRun(textRuns); + _visualEditSession.ReplaceLocalContent(nBackspace, t); } - public void CopyCurrentLine(StringBuilder output) + public void CopyCurrentLine(TextCopyBuffer output) { - _editSession.CopyCurrentLine(output); + _visualEditSession.CopyCurrentLine(output); } - public void CopyLine(int lineNum, StringBuilder output) + public void CopyLine(int lineNum, TextCopyBuffer output) { - _editSession.CopyLine(lineNum, output); + _visualEditSession.CopyLine(lineNum, output); } - public void CopyContentToStringBuilder(StringBuilder stBuilder) + public void CopyContentToStringBuilder(TextCopyBuffer output) { - _editSession.CopyAllToPlainText(stBuilder); + _visualEditSession.CopyAllToPlainText(output); } + public void SplitCurrentLineToNewLine() { - _editSession.SplitCurrentLineIntoNewLine(); - } - public void AddTextRun(Run textspan) - { - _editSession.AddTextRunToCurrentLine(textspan); - } - public void AddTextRun(char[] buffer) - { - _editSession.AddTextRunToCurrentLine(buffer); - } - public void AddTextLine(PlainTextLine textLine) - { - _editSession.AddTextLine(textLine); + _visualEditSession.SplitIntoNewLine(); } + protected virtual void EnsureCaretVisible() { - Point textManCaretPos = _editSession.CaretPos; + Point textManCaretPos = _visualEditSession.CaretPos; EnsureLocationVisible(textManCaretPos.X, textManCaretPos.Y); } @@ -791,48 +801,48 @@ public virtual bool HandleProcessDialogKey(UIKeyEventArgs e) InvalidateGraphicOfCurrentLineArea(); if (!e.Shift) { - _editSession.CancelSelect(); + _visualEditSession.CancelSelect(); } else { - _editSession.StartSelectIfNoSelection(); + _visualEditSession.StartSelectIfNoSelection(); } Point currentCaretPos = Point.Empty; if (!_isMultiLine) { - if (!_editSession.IsOnStartOfLine) + if (!_visualEditSession.IsOnStartOfLine) { #if DEBUG - Point prvCaretPos = _editSession.CaretPos; + Point prvCaretPos = _visualEditSession.CaretPos; #endif - _editSession.TryMoveCaretBackward(); - currentCaretPos = _editSession.CaretPos; + _visualEditSession.TryMoveCaretBackward(); + currentCaretPos = _visualEditSession.CaretPos; } } else { - if (_editSession.IsOnStartOfLine) + if (_visualEditSession.IsOnStartOfLine) { - _editSession.TryMoveCaretBackward(); - currentCaretPos = _editSession.CaretPos; + _visualEditSession.TryMoveCaretBackward(); + currentCaretPos = _visualEditSession.CaretPos; } else { - if (!_editSession.IsOnStartOfLine) + if (!_visualEditSession.IsOnStartOfLine) { #if DEBUG - Point prvCaretPos = _editSession.CaretPos; + Point prvCaretPos = _visualEditSession.CaretPos; #endif - _editSession.TryMoveCaretBackward(); - currentCaretPos = _editSession.CaretPos; + _visualEditSession.TryMoveCaretBackward(); + currentCaretPos = _visualEditSession.CaretPos; } } } //------------------- if (e.Shift) { - _editSession.EndSelectIfNoSelection(); + _visualEditSession.EndSelectIfNoSelection(); } //------------------- @@ -846,11 +856,11 @@ public virtual bool HandleProcessDialogKey(UIKeyEventArgs e) InvalidateGraphicOfCurrentLineArea(); if (!e.Shift) { - _editSession.CancelSelect(); + _visualEditSession.CancelSelect(); } else { - _editSession.StartSelectIfNoSelection(); + _visualEditSession.StartSelectIfNoSelection(); } @@ -858,31 +868,31 @@ public virtual bool HandleProcessDialogKey(UIKeyEventArgs e) if (!_isMultiLine) { #if DEBUG - Point prvCaretPos = _editSession.CaretPos; + Point prvCaretPos = _visualEditSession.CaretPos; #endif - _editSession.TryMoveCaretForward(); - currentCaretPos = _editSession.CaretPos; + _visualEditSession.TryMoveCaretForward(); + currentCaretPos = _visualEditSession.CaretPos; } else { - if (_editSession.IsOnEndOfLine) + if (_visualEditSession.IsOnEndOfLine) { - _editSession.TryMoveCaretForward(); - currentCaretPos = _editSession.CaretPos; + _visualEditSession.TryMoveCaretForward(); + currentCaretPos = _visualEditSession.CaretPos; } else { #if DEBUG - Point prvCaretPos = _editSession.CaretPos; + Point prvCaretPos = _visualEditSession.CaretPos; #endif - _editSession.TryMoveCaretForward(); - currentCaretPos = _editSession.CaretPos; + _visualEditSession.TryMoveCaretForward(); + currentCaretPos = _visualEditSession.CaretPos; } } //------------------- if (e.Shift) { - _editSession.EndSelectIfNoSelection(); + _visualEditSession.EndSelectIfNoSelection(); } //------------------- @@ -899,52 +909,52 @@ public virtual bool HandleProcessDialogKey(UIKeyEventArgs e) if (!_isInVerticalPhase) { _isInVerticalPhase = true; - _verticalExpectedCharIndex = _editSession.CharIndex; + _verticalExpectedCharIndex = _visualEditSession.CurrentLineNewCharIndex; } //---------------------------- if (!e.Shift) { - _editSession.CancelSelect(); + _visualEditSession.CancelSelect(); } else { - _editSession.StartSelectIfNoSelection(); + _visualEditSession.StartSelectIfNoSelection(); } //---------------------------- //approximate line per viewport - int line_per_viewport = Height / _editSession.CurrentLineArea.Height; + int line_per_viewport = Height / _visualEditSession.CurrentLineArea.Height; if (line_per_viewport > 1) { - if (_editSession.CurrentLineNumber - line_per_viewport < 0) + if (_visualEditSession.CurrentLineNumber - line_per_viewport < 0) { //move to first line - _editSession.CurrentLineNumber = 0; + _visualEditSession.CurrentLineNumber = 0; } else { - _editSession.CurrentLineNumber -= line_per_viewport; + _visualEditSession.CurrentLineNumber -= line_per_viewport; } } - if (_verticalExpectedCharIndex > _editSession.CurrentLineCharCount - 1) + if (_verticalExpectedCharIndex > _visualEditSession.CurrentLineCharCount - 1) { - _editSession.TryMoveCaretTo(_editSession.CurrentLineCharCount); + _visualEditSession.TryMoveCaretTo(_visualEditSession.CurrentLineCharCount); } else { - _editSession.TryMoveCaretTo(_verticalExpectedCharIndex); + _visualEditSession.TryMoveCaretTo(_verticalExpectedCharIndex); } //---------------------------- if (e.Shift) { - _editSession.EndSelectIfNoSelection(); + _visualEditSession.EndSelectIfNoSelection(); } - Rectangle lineArea = _editSession.CurrentLineArea; + Rectangle lineArea = _visualEditSession.CurrentLineArea; if (lineArea.Top < ViewportTop) { ScrollOffset(0, lineArea.Top - ViewportTop); @@ -971,49 +981,49 @@ public virtual bool HandleProcessDialogKey(UIKeyEventArgs e) if (!_isInVerticalPhase) { _isInVerticalPhase = true; - _verticalExpectedCharIndex = _editSession.CharIndex; + _verticalExpectedCharIndex = _visualEditSession.CurrentLineNewCharIndex; } //---------------------------- if (!e.Shift) { - _editSession.CancelSelect(); + _visualEditSession.CancelSelect(); } else { - _editSession.StartSelectIfNoSelection(); + _visualEditSession.StartSelectIfNoSelection(); } //---------------------------- - int line_per_viewport = Height / _editSession.CurrentLineArea.Height; + int line_per_viewport = Height / _visualEditSession.CurrentLineArea.Height; - if (_editSession.CurrentLineNumber + line_per_viewport < _editSession.LineCount) + if (_visualEditSession.CurrentLineNumber + line_per_viewport < _visualEditSession.LineCount) { - _editSession.CurrentLineNumber += line_per_viewport; + _visualEditSession.CurrentLineNumber += line_per_viewport; } else { //move to last line - _editSession.CurrentLineNumber = _editSession.LineCount - 1; + _visualEditSession.CurrentLineNumber = _visualEditSession.LineCount - 1; } - if (_verticalExpectedCharIndex > _editSession.CurrentLineCharCount - 1) + if (_verticalExpectedCharIndex > _visualEditSession.CurrentLineCharCount - 1) { - _editSession.TryMoveCaretTo(_editSession.CurrentLineCharCount); + _visualEditSession.TryMoveCaretTo(_visualEditSession.CurrentLineCharCount); } else { - _editSession.TryMoveCaretTo(_verticalExpectedCharIndex); + _visualEditSession.TryMoveCaretTo(_verticalExpectedCharIndex); } //---------------------------- if (e.Shift) { - _editSession.EndSelectIfNoSelection(); + _visualEditSession.EndSelectIfNoSelection(); } //---------------------------- - Rectangle lineArea = _editSession.CurrentLineArea; + Rectangle lineArea = _visualEditSession.CurrentLineArea; if (lineArea.Bottom > this.ViewportBottom) { ScrollOffset(0, lineArea.Bottom - this.ViewportBottom); @@ -1037,37 +1047,37 @@ public virtual bool HandleProcessDialogKey(UIKeyEventArgs e) if (!_isInVerticalPhase) { _isInVerticalPhase = true; - _verticalExpectedCharIndex = _editSession.CharIndex; + _verticalExpectedCharIndex = _visualEditSession.CurrentLineNewCharIndex; } //---------------------------- if (!e.Shift) { - _editSession.CancelSelect(); + _visualEditSession.CancelSelect(); } else { - _editSession.StartSelectIfNoSelection(); + _visualEditSession.StartSelectIfNoSelection(); } //---------------------------- - _editSession.CurrentLineNumber++; - if (_verticalExpectedCharIndex > _editSession.CurrentLineCharCount - 1) + _visualEditSession.CurrentLineNumber++; + if (_verticalExpectedCharIndex > _visualEditSession.CurrentLineCharCount - 1) { - _editSession.TryMoveCaretTo(_editSession.CurrentLineCharCount); + _visualEditSession.TryMoveCaretTo(_visualEditSession.CurrentLineCharCount); } else { - _editSession.TryMoveCaretTo(_verticalExpectedCharIndex); + _visualEditSession.TryMoveCaretTo(_verticalExpectedCharIndex); } //---------------------------- if (e.Shift) { - _editSession.EndSelectIfNoSelection(); + _visualEditSession.EndSelectIfNoSelection(); } //---------------------------- - Rectangle lineArea = _editSession.CurrentLineArea; + Rectangle lineArea = _visualEditSession.CurrentLineArea; if (lineArea.Bottom > this.ViewportBottom) { ScrollOffset(0, lineArea.Bottom - this.ViewportBottom); @@ -1090,37 +1100,37 @@ public virtual bool HandleProcessDialogKey(UIKeyEventArgs e) if (!_isInVerticalPhase) { _isInVerticalPhase = true; - _verticalExpectedCharIndex = _editSession.CharIndex; + _verticalExpectedCharIndex = _visualEditSession.CurrentLineNewCharIndex; } //---------------------------- if (!e.Shift) { - _editSession.CancelSelect(); + _visualEditSession.CancelSelect(); } else { - _editSession.StartSelectIfNoSelection(); + _visualEditSession.StartSelectIfNoSelection(); } //---------------------------- - _editSession.CurrentLineNumber--; - if (_verticalExpectedCharIndex > _editSession.CurrentLineCharCount - 1) + _visualEditSession.CurrentLineNumber--; + if (_verticalExpectedCharIndex > _visualEditSession.CurrentLineCharCount - 1) { - _editSession.TryMoveCaretTo(_editSession.CurrentLineCharCount); + _visualEditSession.TryMoveCaretTo(_visualEditSession.CurrentLineCharCount); } else { - _editSession.TryMoveCaretTo(_verticalExpectedCharIndex); + _visualEditSession.TryMoveCaretTo(_verticalExpectedCharIndex); } //---------------------------- if (e.Shift) { - _editSession.EndSelectIfNoSelection(); + _visualEditSession.EndSelectIfNoSelection(); } - Rectangle lineArea = _editSession.CurrentLineArea; + Rectangle lineArea = _visualEditSession.CurrentLineArea; if (lineArea.Top < ViewportTop) { ScrollOffset(0, lineArea.Top - ViewportTop); @@ -1143,6 +1153,6 @@ public virtual bool HandleProcessDialogKey(UIKeyEventArgs e) } } } - public Point CurrentCaretPos => _editSession.CaretPos; + public Point CurrentCaretPos => _visualEditSession.CaretPos; } } \ No newline at end of file diff --git a/src/PixelFarm/PaintLab.RenderTree.TextSurface/PaintLab.RenderTree.TextSurface.csproj b/src/PixelFarm/PaintLab.RenderTree.TextSurface/PaintLab.RenderTree.TextSurface.csproj index 204af1562..8d6c9d730 100644 --- a/src/PixelFarm/PaintLab.RenderTree.TextSurface/PaintLab.RenderTree.TextSurface.csproj +++ b/src/PixelFarm/PaintLab.RenderTree.TextSurface/PaintLab.RenderTree.TextSurface.csproj @@ -48,25 +48,21 @@ - - + - - - - + + - @@ -97,5 +93,7 @@ Typography.One + + \ No newline at end of file diff --git a/src/PixelFarm/PaintLab.RenderTree/1_Root/1_RootGraphic.cs b/src/PixelFarm/PaintLab.RenderTree/1_Root/1_RootGraphic.cs index 79c90ff83..b8dade401 100644 --- a/src/PixelFarm/PaintLab.RenderTree/1_Root/1_RootGraphic.cs +++ b/src/PixelFarm/PaintLab.RenderTree/1_Root/1_RootGraphic.cs @@ -17,8 +17,8 @@ public interface IRenderElement } public static class GlobalRootGraphic - { - public static RootGraphic CurrentRootGfx; + { + public static RootGraphic CurrentRootGfx; } static class BubbleInvalidater @@ -272,7 +272,7 @@ public RootGraphic(int width, int heigth) this.Width = width; this.Height = heigth; } - + public abstract RequestFont DefaultTextEditFontInfo { get; } public abstract IRenderElement TopWindowRenderBox { get; } public abstract void AddChild(RenderElement renderE); @@ -443,8 +443,6 @@ internal void AddAccumRect(InvalidateGfxArgs args) //--- protected static InvalidateGfxArgs GetInvalidateGfxArgs() => BubbleInvalidater.GetInvalidateGfxArgs(); protected static void ReleaseInvalidateGfxArgs(InvalidateGfxArgs args) => BubbleInvalidater.ReleaseInvalidateGfxArgs(args); - - protected static void InternalBubbleup(InvalidateGfxArgs args) => BubbleInvalidater.InternalBubbleUpInvalidateGraphicArea(args); } diff --git a/src/PixelFarm/PaintLab.RenderTree/2_RenderElement/0_RenderElement.cs b/src/PixelFarm/PaintLab.RenderTree/2_RenderElement/0_RenderElement.cs index e37f56979..c0f2ed243 100644 --- a/src/PixelFarm/PaintLab.RenderTree/2_RenderElement/0_RenderElement.cs +++ b/src/PixelFarm/PaintLab.RenderTree/2_RenderElement/0_RenderElement.cs @@ -183,6 +183,10 @@ protected set _propFlags & ~RenderElementConst.MAY_HAS_VIEWPORT; } } + + /// + /// this element needs pre-render evalution + /// public bool NeedPreRenderEval { get => (_propFlags & RenderElementConst.NEED_PRE_RENDER_EVAL) != 0; @@ -194,7 +198,7 @@ protected set } } - + public virtual void ChildrenHitTestCore(HitChain hitChain) { } diff --git a/src/PixelFarm/PaintLab.RenderTree/2_RenderElement/4_RenderElement.Bubble_Repaint.cs b/src/PixelFarm/PaintLab.RenderTree/2_RenderElement/4_RenderElement.Bubble_Repaint.cs index 37f0b569e..fbc85f19d 100644 --- a/src/PixelFarm/PaintLab.RenderTree/2_RenderElement/4_RenderElement.Bubble_Repaint.cs +++ b/src/PixelFarm/PaintLab.RenderTree/2_RenderElement/4_RenderElement.Bubble_Repaint.cs @@ -30,8 +30,7 @@ internal void InvalidateGraphics(InvalidateGfxArgs args) dbugVRoot.dbug_PushInvalidateMsg(RootGraphic.dbugMsg_BLOCKED, this); #endif - //early exit - //don't use + //early exit BubbleInvalidater.ReleaseInvalidateGfxArgs(args); return; } diff --git a/src/PixelFarm/PaintLab.RenderTree/2_RenderElement/RenderElement_IParentLink.cs b/src/PixelFarm/PaintLab.RenderTree/2_RenderElement/RenderElement_IParentLink.cs index 643aff188..fbe1cc518 100644 --- a/src/PixelFarm/PaintLab.RenderTree/2_RenderElement/RenderElement_IParentLink.cs +++ b/src/PixelFarm/PaintLab.RenderTree/2_RenderElement/RenderElement_IParentLink.cs @@ -1,7 +1,6 @@ //Apache2, 2014-present, WinterDev -using System.Collections.Generic; -using PixelFarm.Drawing; +using System.Collections.Generic; using LayoutFarm.RenderBoxes; namespace LayoutFarm { diff --git a/src/PixelFarm/PaintLab.Svg.One/PaintLab.Svg.One.csproj b/src/PixelFarm/PaintLab.Svg.One/PaintLab.Svg.One.csproj index d30a767fc..1bbfa93a8 100644 --- a/src/PixelFarm/PaintLab.Svg.One/PaintLab.Svg.One.csproj +++ b/src/PixelFarm/PaintLab.Svg.One/PaintLab.Svg.One.csproj @@ -172,11 +172,10 @@ - - {662f2274-d6f8-413a-a908-1b2f10c01348} - PixelFarm.One.HtmlRenderer + + {5b9fe9f1-12ce-4775-bcef-0ad3cb614ee5} + PixelFarm.One - \ No newline at end of file diff --git a/src/PixelFarm/PaintLab.Svg/PaintLab.Svg.csproj b/src/PixelFarm/PaintLab.Svg/PaintLab.Svg.csproj index bfaf67fe3..cf05f6d17 100644 --- a/src/PixelFarm/PaintLab.Svg/PaintLab.Svg.csproj +++ b/src/PixelFarm/PaintLab.Svg/PaintLab.Svg.csproj @@ -147,9 +147,9 @@ - - {662f2274-d6f8-413a-a908-1b2f10c01348} - PixelFarm.One.HtmlRenderer + + {48687c19-8f1a-46a5-8a3a-31c3abd78b5d} + PixelFarm.One diff --git a/src/PixelFarm/PaintLab.Svg/Visuals/VgVisualElements.cs b/src/PixelFarm/PaintLab.Svg/Visuals/VgVisualElements.cs index ca24726c6..33adad052 100644 --- a/src/PixelFarm/PaintLab.Svg/Visuals/VgVisualElements.cs +++ b/src/PixelFarm/PaintLab.Svg/Visuals/VgVisualElements.cs @@ -17,10 +17,7 @@ namespace PaintLab.Svg /// public abstract class VgVisualElementBase { - public virtual void Paint(VgPaintArgs p) - { - //paint with painter interface - } + public virtual void Paint(VgPaintArgs p) { } public abstract WellknownSvgElementName ElemName { get; } public virtual void Accept(VgVisitorArgs p) { } @@ -176,11 +173,11 @@ public override VgVisualElementBase Clone() public override WellknownSvgElementName ElemName => WellknownSvgElementName.ForeignNode; } + + public class VgVisualElement : VgVisualElementBase, IDisposable { - bool _handleBitmapSnapshotAsOwner; - //------------------------- List _childNodes = null; WellknownSvgElementName _wellknownName; //------------------------- @@ -193,10 +190,10 @@ public class VgVisualElement : VgVisualElementBase, IDisposable internal SvgVisualSpec _visualSpec; internal VgPathVisualMarkers _pathMarkers; - ImageBinder _imgBinder; - VgVisualDoc _vgVisualDoc; + VgVisualDoc _vgVisualDoc; //owner doc + bool _handleBitmapSnapshotAsOwner; Image _backimg; Q1RectD _boundRect; bool _needBoundUpdate; @@ -206,12 +203,13 @@ public class VgVisualElement : VgVisualElementBase, IDisposable internal float _imgX; internal float _imgY; - VertexStore _vxsPath; + VertexStore _vxsPath;//filling shape bool _isRenderVxOwner; + RenderVx _renderVx; public VgVisualElement(WellknownSvgElementName wellknownName, - SvgVisualSpec visualSpec, - VgVisualDoc vgVisualDoc) + SvgVisualSpec visualSpec, + VgVisualDoc vgVisualDoc) { //we can create visual element without its DOM _needBoundUpdate = true; @@ -230,9 +228,6 @@ public VgVisualElement(WellknownSvgElementName wellknownName, public object GetController() => _controller; // public ICoordTransformer CoordTx { get; set; } - - - RenderVx _renderVx; public RenderVx RenderVx => _renderVx; public void SetRenderVx(RenderVx renderVx, bool isOwner) { @@ -251,7 +246,8 @@ public VertexStore VxsPath } #endif _vxsPath = value; - ReleaseRenderVx(); + + ReleaseRenderVx();//relrease previus render vx } } void ReleaseRenderVx() @@ -289,27 +285,13 @@ public PixelFarm.Drawing.ImageBinder ImageBinder { _imgH = value.Height; } + value.ImageChanged += (s, e) => _vgVisualDoc.Invalidate(this); } } } - public void HitTest(float x, float y, Action onHitSvg) - { - using (VgVistorArgsPool.Borrow(out VgVisitorArgs visitor)) - { - visitor.VgElemenVisitHandler = (vxs, args) => - { - if (args.Current != null && - PixelFarm.CpuBlit.VertexProcessing.VertexHitTester.IsPointInVxs(vxs, x, y)) - { - //add actual transform vxs ... - onHitSvg(args.Current, x, y, vxs); - } - }; - this.Accept(visitor); - } - } + public bool HitTest(VgHitChain hitChain) { using (VgVistorArgsPool.Borrow(out VgVisitorArgs paintArgs)) @@ -322,9 +304,9 @@ public bool HitTest(VgHitChain hitChain) { //add actual transform vxs ... hitChain.AddHit(args.Current, - hitChain.X, - hitChain.Y, - hitChain.MakeCopyOfHitVxs ? vxs.CreateTrim() : null); + hitChain.X, + hitChain.Y, + hitChain.MakeCopyOfHitVxs ? vxs.CreateTrim() : null); } }; this.Accept(paintArgs); @@ -634,6 +616,10 @@ ICoordTransformer ConvertToICoordTransformer(SvgTransform svgTransform) } } //--------------------------- + + static LineDashGenerator s_lineDashGen; + + public override void Paint(VgPaintArgs vgPainterArgs) { @@ -689,11 +675,6 @@ public override void Paint(VgPaintArgs vgPainterArgs) if (_visualSpec.MaskPathLink != null) { - //apply mask path - if (_visualSpec.ResolvedMask == null) - { - - } if (_visualSpec.ResolvedMask != null) { @@ -786,10 +767,13 @@ public override void Paint(VgPaintArgs vgPainterArgs) else if (vgVisualElem.VisualSpec is SvgLinearGradientSpec) { SvgLinearGradientSpec linearGrSpec = (SvgLinearGradientSpec)vgVisualElem.VisualSpec; + +#if DEBUG if (linearGrSpec.Transform != null) { } +#endif if (linearGrSpec.StopList != null) { int stopListCount = linearGrSpec.StopList.Count; @@ -1173,17 +1157,21 @@ public override void Paint(VgPaintArgs vgPainterArgs) } else if (p.FillColor.A > 0) { - RenderVx renderVx = this.RenderVx; - if (renderVx != null) - { - //has render vx - p.FillRenderVx(renderVx); - } - else + if (ElemName != WellknownSvgElementName.Line && + ElemName != WellknownSvgElementName.Polyline) { - renderVx = p.CreateRenderVx(VxsPath); - SetRenderVx(renderVx, true); - p.FillRenderVx(renderVx); + RenderVx renderVx = this.RenderVx; + if (renderVx != null) + { + //has render vx + p.FillRenderVx(renderVx); + } + else + { + renderVx = p.CreateRenderVx(VxsPath); + SetRenderVx(renderVx, true); + p.FillRenderVx(renderVx); + } } } //to draw stroke @@ -1200,21 +1188,44 @@ public override void Paint(VgPaintArgs vgPainterArgs) //else //{ //check if we need to create a new stroke or not + if (_strokeVxs == null || _latestStrokeW != (float)p.StrokeWidth) { //TODO: review here again*** //vxs caching _latestStrokeW = (float)p.StrokeWidth; - using (Tools.BorrowVxs(out var v1)) - using (Tools.BorrowStroke(out var stroke)) + if (_visualSpec.StrokeDashArray != null) { - stroke.Width = _latestStrokeW; - stroke.MakeVxs(VxsPath, v1); - _strokeVxs = v1.CreateTrim(); + if (s_lineDashGen == null) + { + s_lineDashGen = new LineDashGenerator(); + } + + //set dash generator + s_lineDashGen.SetDashPattern(_visualSpec.StrokeDashArray[0], _visualSpec.StrokeDashArray[1]);//temp ! + + VertexStore vxs = VxsPath; + IDashGenerator tmp = p.LineDashGen; + p.StrokeWidth = 2; //TODO: review here//*** + p.LineDashGen = s_lineDashGen; + p.Draw(vxs);//draw a dash-vxs path + p.LineDashGen = tmp;//restore + + } + else + { + using (Tools.BorrowVxs(out var v1)) + using (Tools.BorrowStroke(out var stroke)) + { + stroke.Width = _latestStrokeW; + stroke.MakeVxs(VxsPath, v1); + _strokeVxs = v1.CreateTrim(); + } + p.Fill(_strokeVxs, p.StrokeColor); } } - p.Fill(_strokeVxs, p.StrokeColor); + } } else @@ -1360,7 +1371,7 @@ public override void Paint(VgPaintArgs vgPainterArgs) } if (_pathMarkers.EndMarker != null) { - //draw this + //draw this*** } @@ -1438,7 +1449,6 @@ public void AddChildElement(VgVisualElementBase vgVisElem) _childNodes = new List(); } _childNodes.Add(vgVisElem); - } public int ChildCount => (_childNodes == null) ? 0 : _childNodes.Count; diff --git a/src/PixelFarm/PaintLab.WebDom/1_Css/CssDocMembers.cs b/src/PixelFarm/PaintLab.WebDom/1_Css/CssDocMembers.cs index 354521b29..f9765d92a 100644 --- a/src/PixelFarm/PaintLab.WebDom/1_Css/CssDocMembers.cs +++ b/src/PixelFarm/PaintLab.WebDom/1_Css/CssDocMembers.cs @@ -105,15 +105,13 @@ public void AddSelector(CssSimpleElementSelector primExpr) } else { - CssCompundElementSelector combinatorExpr = _elementSelector as CssCompundElementSelector; - if (combinatorExpr != null) + if (_elementSelector is CssCompundElementSelector combinatorExpr) { combinatorExpr.RightSelector = primExpr; } else { - CssSimpleElementSelector currentPrimExpr = _elementSelector as CssSimpleElementSelector; - if (currentPrimExpr != null) + if (_elementSelector is CssSimpleElementSelector currentPrimExpr) { combinatorExpr = new CssCompundElementSelector(CssCombinatorOperator.Descendant); combinatorExpr.LeftSelector = _elementSelector; diff --git a/src/PixelFarm/PaintLab.WebDom/2_Svg/SvgPathDataParser.cs b/src/PixelFarm/PaintLab.WebDom/2_Svg/SvgPathDataParser.cs index 40a481638..ebb16937a 100644 --- a/src/PixelFarm/PaintLab.WebDom/2_Svg/SvgPathDataParser.cs +++ b/src/PixelFarm/PaintLab.WebDom/2_Svg/SvgPathDataParser.cs @@ -343,7 +343,7 @@ public void Parse(char[] pathDataBuffer) } - struct NumberLexerAccum + ref struct NumberLexerAccum { int _intgerAccumValue; short _integer_partCount; diff --git a/src/PixelFarm/PaintLab.WebDom/2_Svg/SvgSpec.cs b/src/PixelFarm/PaintLab.WebDom/2_Svg/SvgSpec.cs index 7ba3b508d..80ecaab6c 100644 --- a/src/PixelFarm/PaintLab.WebDom/2_Svg/SvgSpec.cs +++ b/src/PixelFarm/PaintLab.WebDom/2_Svg/SvgSpec.cs @@ -55,6 +55,8 @@ public CssLength StrokeWidth this.HasStrokeWidth = true; } } + + public float[] StrokeDashArray { get; set; } public string Class { get; set; } public float Opacity { @@ -85,6 +87,8 @@ public SvgAttributeLink FillPathLink public object ResolvedMask { get; set; } public object ResolvedFilter { get; set; } + + } public class SvgGroupSpec : SvgVisualSpec { @@ -342,6 +346,7 @@ public class SvgLineSpec : SvgVisualSpec, IMayHaveMarkers public CssLength Y2 { get; set; } // + public SvgAttributeLink MarkerStart { get; set; } public SvgAttributeLink MarkerMid { get; set; } public SvgAttributeLink MarkerEnd { get; set; } diff --git a/src/PixelFarm/PaintLab.YourImplementation/3_RenderTreeRoot/0_MyRootGraphic.cs b/src/PixelFarm/PaintLab.YourImplementation/3_RenderTreeRoot/0_MyRootGraphic.cs index 189e15f7c..1f68e905e 100644 --- a/src/PixelFarm/PaintLab.YourImplementation/3_RenderTreeRoot/0_MyRootGraphic.cs +++ b/src/PixelFarm/PaintLab.YourImplementation/3_RenderTreeRoot/0_MyRootGraphic.cs @@ -15,7 +15,7 @@ public sealed class MyRootGraphic : RootGraphic, ITopWindowEventRootProvider, ID { List _renderRequestList = new List(); GraphicsTimerTaskManager _gfxTimerTaskMx; - static object _normalUpdateTask = new object(); + static readonly object _normalUpdateTask = new object(); readonly TopWindowEventRoot _topWindowEventRoot; readonly TopWindowRenderBox _topWindowRenderBox; @@ -31,11 +31,11 @@ public MyRootGraphic( int width, int height) : base(width, height) { - + _gfxTimerTaskMx = new GraphicsTimerTaskManager(this); _defaultTextEditFont = MyFontSettings.DefaultRootGraphicsFont; - + #if DEBUG dbugCurrentGlobalVRoot = this; dbug_Init(null, null, null); @@ -87,6 +87,10 @@ public override void EnqueueRenderRequest(RenderElementRequest renderReq) _fmtList.Add(fmtStr); fmtStr.State = RenderVxFormattedString.VxState.Waiting; } + else + { + + } } else { @@ -180,15 +184,11 @@ public override void ManageRenderElementRequests() //so we ask for some drawboard to handle these requests PixelFarm.Drawing.GLES2.MyGLDrawBoard drawboard = _getDrawboard(); - + drawboard.PrepareWordStrips(_fmtList); _fmtList.Clear(); - - //all should be ready - //each render element must be update again - j = _fmtStrRenderReqList.Count; for (int i = 0; i < j; ++i) { diff --git a/src/PixelFarm/PixelFarm.BasicVisualElements_SH/Color.cs b/src/PixelFarm/PixelFarm.BasicVisualElements_SH/Color.cs index d2bd45ea1..db087aa9c 100644 --- a/src/PixelFarm/PixelFarm.BasicVisualElements_SH/Color.cs +++ b/src/PixelFarm/PixelFarm.BasicVisualElements_SH/Color.cs @@ -137,7 +137,8 @@ public override bool Equals(object obj) (uint)((c2._a << 24) | (c2._r << 16) | (c2._g << 8) | (c2._b)); } public int ToARGB() => ((_a << 24) | (_r << 16) | (_g << 8) | _b); - + public int ToArgb() => ((_a << 24) | (_r << 16) | (_g << 8) | _b); //temp + public uint ToABGR() => (uint)((_a << 24) | (_b << 16) | (_g << 8) | _r); diff --git a/src/PixelFarm/PixelFarm.BasicVisualElements_SH/RectangleF.cs b/src/PixelFarm/PixelFarm.BasicVisualElements_SH/RectangleF.cs index 700212fb5..53105a667 100644 --- a/src/PixelFarm/PixelFarm.BasicVisualElements_SH/RectangleF.cs +++ b/src/PixelFarm/PixelFarm.BasicVisualElements_SH/RectangleF.cs @@ -81,9 +81,9 @@ public static RectangleF Inflate(in RectangleF rect, float x, float y) /// Inflates the RectangleF by a specified width and height. /// - public void Inflate(float x, float y) + public void Inflate(float dw, float dh) { - Inflate(new SizeF(x, y)); + Inflate(new SizeF(dw, dh)); } /// @@ -288,6 +288,7 @@ public float Height public float Left => _left; + /// /// Location Property @@ -508,6 +509,8 @@ public void Offset(PointF pos) { Offset(pos.X, pos.Y); } + public float X => _left; + public float Y => _top; /// /// ToString Method diff --git a/src/PixelFarm/PixelFarm.CpuBlit_Layer1/02_Rasterization/4.2_CellAARasterizer.cs b/src/PixelFarm/PixelFarm.CpuBlit_Layer1/02_Rasterization/4.2_CellAARasterizer.cs index 29ca26a68..249e00225 100644 --- a/src/PixelFarm/PixelFarm.CpuBlit_Layer1/02_Rasterization/4.2_CellAARasterizer.cs +++ b/src/PixelFarm/PixelFarm.CpuBlit_Layer1/02_Rasterization/4.2_CellAARasterizer.cs @@ -46,7 +46,8 @@ partial class ScanlineRasterizer // A pixel cell. There're no constructors defined and it was done *** // intentionally in order to avoid extra overhead when allocating an **** // array of cells. *** - struct CellAA + + readonly struct CellAA { public readonly int x; public readonly int y; @@ -54,8 +55,8 @@ struct CellAA public readonly int area; #if DEBUG #if !COSMOS - public int dbugLeft; - public int dbugRight; + public readonly int dbugLeft; + public readonly int dbugRight; #endif #endif private CellAA(int x, int y, int cover, int area) @@ -72,6 +73,21 @@ private CellAA(int x, int y, int cover, int area) #endif } +#if DEBUG + private CellAA(int x, int y, int cover, int area, int dbugLeft, int dbugRight) + { + this.x = x; + this.y = y; + this.cover = cover; + this.area = area; +#if DEBUG +#if !COSMOS + this.dbugLeft = dbugLeft; + this.dbugRight = dbugRight; +#endif +#endif + } +#endif public static CellAA Create(int x, int y, int cover, int area) { return new CellAA(x, y, cover, area); @@ -85,16 +101,14 @@ public static CellAA Create(int x, int y, int cover, int area) #if DEBUG public static CellAA dbugCreate(int x, int y, int cover, int area, int left, int right) { - CellAA cell = new CellAA(x, y, cover, area); - //cell.x = x; - //cell.y = y; - //cell.cover = cover; - //cell.area = area; + return new CellAA(x, y, cover, area, left, right); + + //CellAA cell = new CellAA(x, y, cover, area, left, right); #if !COSMOS - cell.dbugLeft = left; - cell.dbugRight = right; + //cell.dbugLeft = left; + //cell.dbugRight = right; #endif - return cell; + //return cell; } #endif #if DEBUG @@ -109,7 +123,9 @@ public override string ToString() } - +#if !DEBUG + readonly +#endif struct CellAABlob { readonly CellAARasterizer _cellAARas; @@ -673,9 +689,10 @@ static int GetPivotPoint(CellAA[] dataToSort, int begPoint, int endPoint) while (m < n) { //swap data between m and n - CellAA temp = dataToSort[m]; + CellAA temp = dataToSort[m];//copy value dataToSort[m] = dataToSort[n]; dataToSort[n] = temp; + while ((m < endPoint) && (x_at_PivotPoint >= dataToSort[m].x)) { m++; diff --git a/src/PixelFarm/PixelFarm.CpuBlit_Layer1/02_Rasterization/5_DestBitmapRasterizer.cs b/src/PixelFarm/PixelFarm.CpuBlit_Layer1/02_Rasterization/5_DestBitmapRasterizer.cs index 8b037533a..e5c5bdbaf 100644 --- a/src/PixelFarm/PixelFarm.CpuBlit_Layer1/02_Rasterization/5_DestBitmapRasterizer.cs +++ b/src/PixelFarm/PixelFarm.CpuBlit_Layer1/02_Rasterization/5_DestBitmapRasterizer.cs @@ -1331,12 +1331,13 @@ public void BlendHL(int x1, int len, int coversIndex) } else { + byte new_v = (byte)((alpha) - ((BASE_MASK) >> (int)CO.BASE_SHIFT)); do { //original //buffer[bufferOffset] = (byte)((alpha + EXISTING_A) - ((alpha * EXISTING_A + BASE_MASK) >> (int)Color.BASE_SHIFT)); //since in this case EXISTING_A is always 0, so we remove it - buffer[bufferOffset] = (byte)((alpha) - ((BASE_MASK) >> (int)CO.BASE_SHIFT)); + buffer[bufferOffset] = new_v;// (byte)((alpha) - ((BASE_MASK) >> (int)CO.BASE_SHIFT)); bufferOffset++; } while (--len != 0); @@ -1347,7 +1348,7 @@ public void BlendHL(int x1, int len, int coversIndex) /// /// temporary (forward write) accum buffer /// - struct TempForwardAccumBuffer + ref struct TempForwardAccumBuffer { //similar to circular queue. diff --git a/src/PixelFarm/PixelFarm.Drawing.GLES/DrawBoard/1_MyGLDrawBoard_Specific.cs b/src/PixelFarm/PixelFarm.Drawing.GLES/DrawBoard/1_MyGLDrawBoard_Specific.cs index 39ffe9967..4bfba7d57 100644 --- a/src/PixelFarm/PixelFarm.Drawing.GLES/DrawBoard/1_MyGLDrawBoard_Specific.cs +++ b/src/PixelFarm/PixelFarm.Drawing.GLES/DrawBoard/1_MyGLDrawBoard_Specific.cs @@ -59,6 +59,8 @@ public Image CopyToNewMemBitmap(int left, int top, int width, int height) return outputBuffer; } } + + } @@ -128,19 +130,20 @@ public override TextDrawingTech TextDrawingTech { //temp fix _textDrawingTechnique = value; + GlyphTexturePrinterDrawingTechnique tech = GlyphTexturePrinterDrawingTechnique.Copy; switch (value) { case TextDrawingTech.LcdSubPix: - ((GLBitmapGlyphTextPrinter)_gpuPainter.TextPrinter).TextDrawingTechnique = GlyphTexturePrinterDrawingTechnique.LcdSubPixelRendering; + tech = GlyphTexturePrinterDrawingTechnique.LcdSubPixelRendering; break; case TextDrawingTech.Stencil: - ((GLBitmapGlyphTextPrinter)_gpuPainter.TextPrinter).TextDrawingTechnique = GlyphTexturePrinterDrawingTechnique.Stencil; + tech = GlyphTexturePrinterDrawingTechnique.Stencil; break; case TextDrawingTech.Copy: - ((GLBitmapGlyphTextPrinter)_gpuPainter.TextPrinter).TextDrawingTechnique = GlyphTexturePrinterDrawingTechnique.Copy; + tech = GlyphTexturePrinterDrawingTechnique.Copy; break; } - + _gpuPainter.TextPrinter.TextDrawingTechnique = tech; } } @@ -159,8 +162,40 @@ class SaveContext public int prevCanvasOrgY; public Rectangle prevClipRect; public GLRenderSurface prevGLRenderSurface; +#if DEBUG + public SaveContext() { } + public bool dbugIsInPool; +#endif } + Stack _saveContextPool = new Stack(); + SaveContext GetFreeSaveContext() + { + if (_saveContextPool.Count == 0) return new SaveContext(); + +#if DEBUG + SaveContext s = _saveContextPool.Pop(); + if (!s.dbugIsInPool) + { + throw new NotSupportedException(); + } + + s.dbugIsInPool = false; + return s; +#else + +return _saveContextPool.Pop(); +#endif + + + } + void ReleaseSaveContext(SaveContext saveContext) + { +#if DEBUG + saveContext.dbugIsInPool = true; +#endif + _saveContextPool.Push(saveContext); + } public override void EnterNewDrawboardBuffer(DrawboardBuffer backbuffer) { #if DEBUG @@ -172,7 +207,7 @@ public override void EnterNewDrawboardBuffer(DrawboardBuffer backbuffer) #endif //save prev context - SaveContext prevContext = new SaveContext(); + SaveContext prevContext = GetFreeSaveContext(); prevContext.prevClipRect = _currentClipRect; prevContext.prevCanvasOrgX = _canvasOriginX; prevContext.prevCanvasOrgY = _canvasOriginY; @@ -213,6 +248,7 @@ public override void ExitCurrentDrawboardBuffer() _currentClipRect = saveContext.prevClipRect; _gpuPainter.Core.AttachToRenderSurface(saveContext.prevGLRenderSurface); + _gpuPainter.Core.OriginKind = RenderSurfaceOriginKind.LeftTop; _gpuPainter.UpdateCore(); @@ -221,9 +257,9 @@ public override void ExitCurrentDrawboardBuffer() _width = _gpuPainter.Width; _height = _gpuPainter.Height; - _gpuPainter.SetOrigin(_canvasOriginX, _canvasOriginY); SetClipRect(_currentClipRect); + ReleaseSaveContext(saveContext); } public override void Dispose() { diff --git a/src/PixelFarm/PixelFarm.Drawing.GLES/DrawBoard/4_MyGLDrawBoard_TextAndFonts.cs b/src/PixelFarm/PixelFarm.Drawing.GLES/DrawBoard/4_MyGLDrawBoard_TextAndFonts.cs index ffe816baa..415ff9c85 100644 --- a/src/PixelFarm/PixelFarm.Drawing.GLES/DrawBoard/4_MyGLDrawBoard_TextAndFonts.cs +++ b/src/PixelFarm/PixelFarm.Drawing.GLES/DrawBoard/4_MyGLDrawBoard_TextAndFonts.cs @@ -25,7 +25,7 @@ public override Color CurrentTextColor _gpuPainter.TextPrinter?.ChangeFillColor(value); } } - public override RenderVxFormattedString CreateFormattedString(char[] buffer, int startAt, int len, bool delay) + public override RenderVxFormattedString CreateFormattedString(int[] buffer, int startAt, int len, bool delay) { if (_gpuPainter.TextPrinter == null) { @@ -34,27 +34,47 @@ public override RenderVxFormattedString CreateFormattedString(char[] buffer, int #endif } //create blank render vx - var renderVxFmtStr = new DrawingGL.GLRenderVxFormattedString(); - renderVxFmtStr.Delay = delay; + var fmtstr = new DrawingGL.GLRenderVxFormattedString(); + fmtstr.Delay = delay; #if DEBUG - renderVxFmtStr.dbugText = new string(buffer, startAt, len); + //fmtstr.dbugText = new string(buffer, startAt, len); #endif - if (_gpuPainter.TextPrinter != null) + + //we create + //1. texture coords for this string + //2. (if not delay) => an image for this string inside a larger img texture + _gpuPainter.TextPrinter.PrepareStringForRenderVx(fmtstr, buffer, startAt, len); + if (!fmtstr.Delay) { - //we create - //1. texture coords for this string - //2. (if not delay) => an image for this string inside a larger img texture - _gpuPainter.TextPrinter.PrepareStringForRenderVx(renderVxFmtStr, buffer, 0, buffer.Length); - return renderVxFmtStr; + fmtstr.ReleaseIntermediateStructures(); } - else + return fmtstr; + + } + public override RenderVxFormattedString CreateFormattedString(char[] buffer, int startAt, int len, bool delay) + { + if (_gpuPainter.TextPrinter == null) { #if DEBUG - throw new System.NotSupportedException(); -#else - return null; + throw new System.Exception("no text printer"); +#endif + } + //create blank render vx + var fmtstr = new DrawingGL.GLRenderVxFormattedString(); + fmtstr.Delay = delay; +#if DEBUG + fmtstr.dbugText = new string(buffer, startAt, len); #endif + + //we create + //1. texture coords for this string + //2. (if not delay) => an image for this string inside a larger img texture + _gpuPainter.TextPrinter.PrepareStringForRenderVx(fmtstr, buffer, startAt, len); + if (!fmtstr.Delay) + { + fmtstr.ReleaseIntermediateStructures(); } + return fmtstr; } public void PrepareWordStrips(System.Collections.Generic.List fmtStringList) { @@ -65,20 +85,28 @@ public override void DrawRenderVx(RenderVx renderVx, float x, float y) { if (renderVx is DrawingGL.GLRenderVxFormattedString vxFmtStr) { - _gpuPainter.TextPrinter.DrawString(vxFmtStr, x, y); - - //if (vxFmtStr.BmpOnTransparentBackground) - //{ - // DrawingGL.GlyphTexturePrinterDrawingTechnique prevTech = _gpuPainter.TextPrinterDrawingTechnique; //save - // _gpuPainter.TextPrinterDrawingTechnique = DrawingGL.GlyphTexturePrinterDrawingTechnique.Copy; - // _gpuPainter.TextPrinter.DrawString(vxFmtStr, x, y); - // _gpuPainter.TextPrinterDrawingTechnique = prevTech;//restore - //} - //else - //{ - // _gpuPainter.TextPrinter.DrawString(vxFmtStr, x, y); - //} + DrawingGL.IGLTextPrinter textPrinter = _gpuPainter.TextPrinter; + DrawingGL.GlyphTexturePrinterDrawingTechnique prev = textPrinter.TextDrawingTechnique;//save + DrawingGL.GlyphTexturePrinterDrawingTechnique cur = DrawingGL.GlyphTexturePrinterDrawingTechnique.Copy; + switch (this.TextDrawingTech) + { + //temp fix + case TextDrawingTech.LcdSubPix: + cur = DrawingGL.GlyphTexturePrinterDrawingTechnique.LcdSubPixelRendering; + break; + case TextDrawingTech.Stencil: + cur = DrawingGL.GlyphTexturePrinterDrawingTechnique.Stencil; + break; + case TextDrawingTech.Copy: + cur = DrawingGL.GlyphTexturePrinterDrawingTechnique.Copy; + break; + } + + textPrinter.TextDrawingTechnique = cur; + + textPrinter.DrawString(vxFmtStr, x, y); + textPrinter.TextDrawingTechnique = prev;//restore } } diff --git a/src/PixelFarm/PixelFarm.Drawing.GLES/GLPainter/GLPainter_Imgs.cs b/src/PixelFarm/PixelFarm.Drawing.GLES/GLPainter/GLPainter_Imgs.cs index a4802a317..52cf3337c 100644 --- a/src/PixelFarm/PixelFarm.Drawing.GLES/GLPainter/GLPainter_Imgs.cs +++ b/src/PixelFarm/PixelFarm.Drawing.GLES/GLPainter/GLPainter_Imgs.cs @@ -39,7 +39,7 @@ public override void DrawImage(Image img, double left, double top, ICoordTransfo if (this.OriginX != 0 || this.OriginY != 0) { #if DEBUG - System.Diagnostics.Debugger.Break(); + //System.Diagnostics.Debugger.Break(); #endif } diff --git a/src/PixelFarm/PixelFarm.Drawing.GLES/GLPainter/GLPainter_PenAndStroke.cs b/src/PixelFarm/PixelFarm.Drawing.GLES/GLPainter/GLPainter_PenAndStroke.cs index fc12d7eb9..aa9883ea0 100644 --- a/src/PixelFarm/PixelFarm.Drawing.GLES/GLPainter/GLPainter_PenAndStroke.cs +++ b/src/PixelFarm/PixelFarm.Drawing.GLES/GLPainter/GLPainter_PenAndStroke.cs @@ -134,6 +134,9 @@ DashPatternBmpCache GetCacheBmpDashOrCreate() return cache; } + readonly ArrayList _vertexList = new ArrayList(); + readonly ArrayList _indexList = new ArrayList(); + /// /// we do NOT store vxs /// @@ -160,7 +163,13 @@ public override void Draw(VertexStore vxs) } else { - _lineDashGen.CreateDash(vxs, v1); + //TODO: cache? + ushort tempLineJoinRadius = _lineDashGen.LineJoinRadius; + // + _lineDashGen.LineJoinRadius = 0;//px + _lineDashGen.CreateDash(vxs, v1);//a set of line dash + _lineDashGen.LineJoinRadius = tempLineJoinRadius; + if (_dashGenV2 && _lineDashGen.IsStaticPattern) { //generate texture backend for a dash pattern @@ -183,7 +192,9 @@ public override void Draw(VertexStore vxs) GLBitmap glbmp = dashPattBmpCache.glBmp; SimpleBitmapAtlas simpleBmpAtlas = dashPattBmpCache.Atlas; - _vboBuilder.Clear(); + _vertexList.Clear(); + _indexList.Clear(); + _vboBuilder.SetArrayLists(_vertexList, _indexList); _vboBuilder.SetTextureInfo(glbmp.Width, glbmp.Height, false, RenderSurfaceOriginKind.LeftTop); ushort patNo = 0; @@ -215,12 +226,45 @@ public override void Draw(VertexStore vxs) py = y; } - _vboBuilder.AppendDegenerativeTriangle(); + + //ushort patNo = 0; + //for (int i = 0; i < n; ++i) + //{ + // VertexCmd cmd = v1.GetVertex(i, out double x, out double y); + // switch (cmd) + // { + // case VertexCmd.MoveTo: + + // break; + // case VertexCmd.LineTo: + // { + // //select proper img for this segment + + // simpleBmpAtlas.TryGetItem(patNo, out AtlasItem atlasItem); + // var srcRect = new Rectangle(atlasItem.Left - (int)atlasItem.TextureXOffset, atlasItem.Top - (int)atlasItem.TextureYOffset, atlasItem.Width - 8, atlasItem.Height - 8); + // //please note that : we start rect at (px,py) + // _vboBuilder.WriteRectWithRotation(srcRect, (float)px, (float)py, (float)Math.Atan2(y - py, x - px)); + // patNo += 2; + // if (patNo >= prebuilt_patt.Length) + // { + // patNo = 0;//reset + // } + // } + // break; + // } + // px = x; + // py = y; + //} + + _vboBuilder.AppendDegenerativeTriangle(); Color prevColor = _pcx.FontFillColor; _pcx.FontFillColor = this.StrokeColor;//*** _pcx.DrawGlyphImageWithStecil_VBO(glbmp, _vboBuilder); //TODO: review here. in this version, use glyph renderer _pcx.FontFillColor = prevColor; //restore + + //--------------- + } else { diff --git a/src/PixelFarm/PixelFarm.Drawing.GLES/GLPainter/GLPainter_TextAndFont.cs b/src/PixelFarm/PixelFarm.Drawing.GLES/GLPainter/GLPainter_TextAndFont.cs index 5b93cc29d..5c278418f 100644 --- a/src/PixelFarm/PixelFarm.Drawing.GLES/GLPainter/GLPainter_TextAndFont.cs +++ b/src/PixelFarm/PixelFarm.Drawing.GLES/GLPainter/GLPainter_TextAndFont.cs @@ -16,11 +16,20 @@ public interface IGLTextPrinter /// void DrawString(GLRenderVxFormattedString renderVx, double left, double top); void PrepareStringForRenderVx(GLRenderVxFormattedString renderVx, char[] text, int startAt, int len); + void PrepareStringForRenderVx(GLRenderVxFormattedString renderVx, int[] text, int startAt, int len); + void PrepareStringForRenderVx(GLRenderVxFormattedString renderVx, IFormattedGlyphPlanList formattedGlyphPlans); + + void ChangeFont(RequestFont font); void ChangeFillColor(Color fillColor); void ChangeStrokeColor(Color strokColor); TextBaseline TextBaseline { get; set; } void DrawString(char[] text, int startAt, int len, double left, double top); + + /// + /// text drawing technique + /// + GlyphTexturePrinterDrawingTechnique TextDrawingTechnique { get; set; } } partial class GLPainter @@ -109,12 +118,31 @@ public override RenderVxFormattedString CreateRenderVx(string textspan) if (_textPrinter != null) { char[] buffer = textspan.ToCharArray(); - var renderVxFmtStr = new GLRenderVxFormattedString(); + var fmtstr = new GLRenderVxFormattedString(); #if DEBUG - renderVxFmtStr.dbugText = textspan; + fmtstr.dbugText = textspan; #endif - _textPrinter?.PrepareStringForRenderVx(renderVxFmtStr, buffer, 0, buffer.Length); - return renderVxFmtStr; + _textPrinter?.PrepareStringForRenderVx(fmtstr, buffer, 0, buffer.Length); + fmtstr.ReleaseIntermediateStructures(); + return fmtstr; + } + else + { +#if DEBUG + throw new NotSupportedException(); +#else + return null; +#endif + } + } + public override RenderVxFormattedString CreateRenderVx(IFormattedGlyphPlanList formattedGlyphPlans) + { + if (_textPrinter != null) + { + var fmtstr = new GLRenderVxFormattedString(); + _textPrinter?.PrepareStringForRenderVx(fmtstr, formattedGlyphPlans); + fmtstr.ReleaseIntermediateStructures(); + return fmtstr; } else { @@ -129,12 +157,13 @@ public override RenderVxFormattedString CreateRenderVx(char[] textspanBuff, int { if (_textPrinter != null) { - var renderVxFmtStr = new GLRenderVxFormattedString(); + var fmtstr = new GLRenderVxFormattedString(); #if DEBUG - renderVxFmtStr.dbugText = new string(textspanBuff, startAt, len); + fmtstr.dbugText = new string(textspanBuff, startAt, len); #endif - _textPrinter?.PrepareStringForRenderVx(renderVxFmtStr, textspanBuff, startAt, len); - return renderVxFmtStr; + _textPrinter?.PrepareStringForRenderVx(fmtstr, textspanBuff, startAt, len); + fmtstr.ReleaseIntermediateStructures(); + return fmtstr; } else { @@ -150,28 +179,63 @@ public override void DrawString(RenderVxFormattedString renderVx, double x, doub _textPrinter?.DrawString((GLRenderVxFormattedString)renderVx, x, y); } + + int _creationCycle; + internal void CreateWordStrips(System.Collections.Generic.List fmtStringList) { - + //create a set of frm string // + if (_creationCycle > ushort.MaxValue) + { + _creationCycle = 0;//reset + } + _creationCycle++; + int j = fmtStringList.Count; - for (int i = 0; i < j; ++i) + + for (int i = j - 1; i >= 0; --i) { //change state before send to the drawboard GLRenderVxFormattedString vxFmtStr = fmtStringList[i]; vxFmtStr.UseWithWordPlate = true; vxFmtStr.Delay = false; + if (vxFmtStr.CreationCycle > 0 && vxFmtStr.CreationCycle == _creationCycle - 1) + { + vxFmtStr.SkipCreation = true; + continue; + } + vxFmtStr.SkipCreation = false; + vxFmtStr.CreationCycle = _creationCycle; + } + +#if DEBUG + int diff = j - fmtStringList.Count; + if (diff > 5) + { + } +#endif + // + j = fmtStringList.Count;//reset + if (j == 0) + { + return; + } RequestFont prevFont = CurrentFont; //save WordPlate latestWordplate = null; + //if (j > 20) + //{ + // j = 20; + //} for (int i = 0; i < j; ++i) { GLRenderVxFormattedString vxFmtStr = fmtStringList[i]; - if (vxFmtStr.OwnerPlate != null) + if (vxFmtStr.OwnerPlate != null || vxFmtStr.SkipCreation) { continue; } @@ -188,21 +252,19 @@ internal void CreateWordStrips(System.Collections.Generic.List 3) + { + //Console.WriteLine("enter-exit:" + ms); + } +#endif + _drawBoard.CurrentFont = backupFont;//restore + fmtString.CreationState = GLRenderVxFormattedStringState.S2_TextureStrip; + return fmtString.OwnerPlate != null; + } + + + //-------------- + internal bool TryCreateWordStrip2(GLRenderVxFormattedString fmtString) + { + WordPlate wordPlate = _wordPlateMx.GetWordPlate(fmtString); + if (wordPlate == null) + { +#if DEBUG + throw new NotSupportedException(); +#else + return false; +#endif + } + + + //{ + // //save output + // using (Image img = wordPlate._backBuffer.CopyToNewMemBitmap()) + // { + // MemBitmap memBmp = img as MemBitmap; + // if (memBmp != null) + // { + // memBmp.SaveImage("testx_01.png"); + // } + // } //} + RequestFont backupFont = _drawBoard.CurrentFont; //backup +#if DEBUG + dbugsw2.Reset(); + dbugsw2.Start(); +#endif + //switch the drawboard to back buffer + _drawBoard.EnterNewDrawboardBuffer(wordPlate._backBuffer); if (!wordPlate.CreateWordStrip(this, fmtString)) { @@ -260,13 +386,25 @@ internal bool TryCreateWordStrip(GLRenderVxFormattedString fmtString) #if DEBUG throw new NotSupportedException(); #else - return false; + return false; #endif } - fmtString.State = RenderVxFormattedString.VxState.Ready; _drawBoard.ExitCurrentDrawboardBuffer(); + + fmtString.State = RenderVxFormattedString.VxState.Ready; + fmtString.IsReset = false; + +#if DEBUG + dbugsw2.Stop(); + long ms = dbugsw2.ElapsedMilliseconds; + if (ms > 3) + { + //Console.WriteLine("enter-exit:" + ms); + } +#endif _drawBoard.CurrentFont = backupFont;//restore + fmtString.CreationState = GLRenderVxFormattedStringState.S2_TextureStrip; return fmtString.OwnerPlate != null; } } diff --git a/src/PixelFarm/PixelFarm.Drawing.GLES/TextPrinter/GLBitmapGlyphTextPrinter.cs b/src/PixelFarm/PixelFarm.Drawing.GLES/TextPrinter/GLBitmapGlyphTextPrinter.cs index 1e837ab75..6621f5392 100644 --- a/src/PixelFarm/PixelFarm.Drawing.GLES/TextPrinter/GLBitmapGlyphTextPrinter.cs +++ b/src/PixelFarm/PixelFarm.Drawing.GLES/TextPrinter/GLBitmapGlyphTextPrinter.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.IO; - using PixelFarm.CpuBlit; using PixelFarm.CpuBlit.BitmapAtlas; using PixelFarm.Drawing; @@ -39,7 +38,6 @@ public class GLBitmapGlyphTextPrinter : IGLTextPrinter, IDisposable GLBitmap _glBmp; ResolvedFont _resolvedFont; - float _px_scale = 1; int _white_space_width; float _ascending; @@ -64,7 +62,6 @@ public GLBitmapGlyphTextPrinter(GLPainter painter, OpenFontTextService textServi _pcx = painter.Core; _txtClient = textServices.CreateNewServiceClient(); - //_currentTextureKind = TextureKind.Msdf; //_currentTextureKind = TextureKind.StencilGreyScale; @@ -73,19 +70,20 @@ public GLBitmapGlyphTextPrinter(GLPainter painter, OpenFontTextService textServi //-------- //load preview of pre-built texture font //temp fix, TODO: review this again - string[] maybeTextureInfoFiles = Directory.GetFiles(Directory.GetCurrentDirectory(), "*.tx_info"); + + + string[] maybeTextureInfoFiles = GetCacheFontTextureFilenames(); if (maybeTextureInfoFiles.Length > 0) { for (int i = 0; i < maybeTextureInfoFiles.Length; ++i) { //try read - using (FileStream fs = new FileStream(maybeTextureInfoFiles[i], FileMode.Open)) + using (Stream s = PixelFarm.Platforms.StorageService.Provider.ReadDataStream(maybeTextureInfoFiles[i])) { try { - _myGLBitmapFontMx.LoadBitmapAtlasPreview(fs); - - + //try load from specific stream + _myGLBitmapFontMx.LoadBitmapAtlasPreview(s); } catch (Exception ex) { @@ -95,8 +93,6 @@ public GLBitmapGlyphTextPrinter(GLPainter painter, OpenFontTextService textServi } } - - //LoadFontAtlas("tahoma_set1.multisize_fontAtlas", "tahoma_set1.multisize_fontAtlas.png"); //test textures... @@ -140,7 +136,18 @@ public GLBitmapGlyphTextPrinter(GLPainter painter, OpenFontTextService textServi AlternativeTypefaceSelector = myAlternativeTypefaceSelector; } - + static string[] GetCacheFontTextureFilenames() + { + List alldirs = new List(); + foreach (string s in PixelFarm.Platforms.StorageService.Provider.GetDataNameList(".")) + { + if (System.IO.Path.GetExtension(s) == ".tx_info") + { + alldirs.Add(s); + } + } + return alldirs.ToArray(); + } public AlternativeTypefaceSelector AlternativeTypefaceSelector { get => _txtClient.AlternativeTypefaceSelector; @@ -149,54 +156,39 @@ public AlternativeTypefaceSelector AlternativeTypefaceSelector void ChangeFont(SameFontTextStrip s) { - ResolvedFont r_font = s.ResolvedFont; -#if DEBUG - if (r_font == null) { throw new NotSupportedException(); } -#endif - _px_scale = r_font.GetScaleToPixelFromPointInSize(); - _white_space_width = r_font.WhitespaceWidth; - _ascending = r_font.AscentInPixels; - _descending = r_font.DescentInPixels; - _lineSpacingInPx = r_font.LineSpacingInPixels; - UnicodeRangeInfo unicodeRng = s.BreakInfo.UnicodeRange; - _fontAtlas = _myGLBitmapFontMx.GetFontAtlas(r_font, unicodeRng.StartCodepoint, unicodeRng.EndCodepoint, out _glBmp); + if (unicodeRng == null) + { + ChangeFont(s.ResolvedFont, 0, 255); + } + else + { + ChangeFont(s.ResolvedFont, unicodeRng.StartCodepoint, unicodeRng.EndCodepoint); + } } void ChangeFont(FormattedGlyphPlanSeq s) { - ResolvedFont r_font = s.ResolvedFont; -#if DEBUG - if (r_font == null) { throw new NotSupportedException(); } -#endif - Typeface typeface = r_font.Typeface; - _fontSizeInPoints = r_font.SizeInPoints; - _px_scale = r_font.GetScaleToPixelFromPointInSize(); - - _white_space_width = r_font.WhitespaceWidth;//(int)Math.Round(typeface.GetWhitespaceWidth() * _px_scale); - _ascending = r_font.AscentInPixels; - _descending = r_font.DescentInPixels; - _lineSpacingInPx = r_font.LineSpacingInPixels; //typeface.CalculateMaxLineClipHeight() * _px_scale; - UnicodeRangeInfo unicodeRng = s.BreakInfo.UnicodeRange; - _fontAtlas = _myGLBitmapFontMx.GetFontAtlas(r_font, unicodeRng.StartCodepoint, unicodeRng.EndCodepoint, out _glBmp); + if (unicodeRng == null) + { + ChangeFont(s.ResolvedFont, 0, 255); + } + else + { + ChangeFont(s.ResolvedFont, unicodeRng.StartCodepoint, unicodeRng.EndCodepoint); + } } - public void ChangeFont(ResolvedFont font, int startCodepoint, int endCodepoint) { - if (_resolvedFont != null && font != null && GlobalTextService.TxtClient.Eq(_resolvedFont, font)) + if (_resolvedFont == font || + (_resolvedFont != null && font != null && _resolvedFont.RuntimeResolvedKey == font.RuntimeResolvedKey)) { return; } -#if DEBUG - //if (font.Name.ToLower().Contains("emoji")) - //{ - - //} -#endif _resolvedFont = font; _fontSizeInPoints = font.SizeInPoints; - _px_scale = font.GetScaleToPixelFromPointInSize(); + _px_scale = font.GetScaleToPixelFromPointUnit(); _white_space_width = font.WhitespaceWidth; _ascending = font.AscentInPixels; _descending = font.DescentInPixels; @@ -216,50 +208,10 @@ public void ChangeFont(RequestFont font) // ChangeFont(_txtClient.ResolveFont(font), 0, 0); } - - - - //public void LoadFontAtlas(string fontTextureInfoFile, string atlasImgFilename) - //{ - // //TODO: extension method - // if (PixelFarm.Platforms.StorageService.Provider.DataExists(fontTextureInfoFile) && - // PixelFarm.Platforms.StorageService.Provider.DataExists(atlasImgFilename)) - // { - // using (System.IO.Stream fontTextureInfoStream = PixelFarm.Platforms.StorageService.Provider.ReadDataStream(fontTextureInfoFile)) - // using (System.IO.Stream fontTextureImgStream = PixelFarm.Platforms.StorageService.Provider.ReadDataStream(atlasImgFilename)) - // { - // try - // { - // BitmapAtlasFile fontAtlas = new BitmapAtlasFile(); - // fontAtlas.Read(fontTextureInfoStream); - // SimpleBitmapAtlas[] resultAtlases = fontAtlas.AtlasList.ToArray(); - // _myGLBitmapFontMx.AddSimpleFontAtlas(resultAtlases, fontTextureImgStream); - // } - // catch (Exception ex) - // { - // throw ex; - // } - // } - // } - - //} public bool UseVBO { get; set; } - GlyphTexturePrinterDrawingTechnique _drawingTech; - public GlyphTexturePrinterDrawingTechnique TextDrawingTechnique - { - get => _drawingTech; - set - { -#if DEBUG - if (value == GlyphTexturePrinterDrawingTechnique.Stencil) - { - } -#endif - _drawingTech = value; - } - } + public GlyphTexturePrinterDrawingTechnique TextDrawingTechnique { get; set; } public void ChangeFillColor(Color color) { //called by owner painter @@ -286,9 +238,12 @@ public void Dispose() } } + internal bool IsInWordPlateCreatingMode { get; set; } public PixelFarm.Drawing.TextBaseline TextBaseline { get; set; } #if DEBUG + readonly PixelFarm.CpuBlit.ArrayList _dbugVertexList = new PixelFarm.CpuBlit.ArrayList(); + readonly PixelFarm.CpuBlit.ArrayList _dbugIndexList = new PixelFarm.CpuBlit.ArrayList(); void dbugInnerDrawI18NStringNO_WordPlate(char[] buffer, int startAt, int len, double left, double top) { //input string may not be only Eng+ Num @@ -310,7 +265,9 @@ void dbugInnerDrawI18NStringNO_WordPlate(char[] buffer, int startAt, int len, do GlyphPlanSequence glyphPlanSeq = _txtClient.CreateGlyphPlanSeq(textBufferSpan, _resolvedFont); //----------------- - _vboBuilder.Clear(); + _dbugVertexList.Clear(); + _dbugIndexList.Clear(); + _vboBuilder.SetArrayLists(_dbugVertexList, _dbugIndexList); _vboBuilder.SetTextureInfo(_glBmp.Width, _glBmp.Height, _glBmp.IsYFlipped, _pcx.OriginKind); //ask text service to parse user input char buffer and create a glyph-plan-sequence (list of glyph-plan) @@ -499,25 +456,22 @@ void dbugInnerDrawI18NStringNO_WordPlate(char[] buffer, int startAt, int len, do _pcx.DrawImagesWithMsdf_VBO(_glBmp, _vboBuilder); break; } - - _vboBuilder.Clear(); } } #endif readonly GLRenderVxFormattedString _reusableFmtString = new GLRenderVxFormattedString(); + public void DrawString(char[] buffer, int startAt, int len, double left, double top) { //for internal use - _reusableFmtString.Reuse(); //use sure + _reusableFmtString.ClearData(); PrepareStringForRenderVx(_reusableFmtString, buffer, startAt, len); DrawString(_reusableFmtString, left, top); - _reusableFmtString.Reuse(); //clear data + _reusableFmtString.ClearData(); } - public bool WordPlateCreatingMode { get; set; } - public void DrawString(GLRenderVxFormattedString vxFmtStr, double x, double y) { _pcx.FontFillColor = _painter.FontFillColor; @@ -527,6 +481,11 @@ public void DrawString(GLRenderVxFormattedString vxFmtStr, double x, double y) return; } + //TODO: review here + //the following part is a drawing intensive part. + + + float base_offset = 0; switch (TextBaseline) { @@ -534,14 +493,17 @@ public void DrawString(GLRenderVxFormattedString vxFmtStr, double x, double y) //base_offset = -(vxFmtStr.SpanHeight + vxFmtStr.DescendingInPx); break; case PixelFarm.Drawing.TextBaseline.Top: - base_offset = vxFmtStr.DescendingInPx; + + base_offset = vxFmtStr.DescendingInPx; + //base_offset += 10; + //base_offset -= vxFmtStr.DescendingInPx; break; case PixelFarm.Drawing.TextBaseline.Bottom: base_offset = -vxFmtStr.SpanHeight; break; } - if (WordPlateCreatingMode) + if (IsInWordPlateCreatingMode) { //on word plate mode //in this version @@ -552,14 +514,14 @@ public void DrawString(GLRenderVxFormattedString vxFmtStr, double x, double y) case GLRenderVxFormattedStringGlyphMixMode.OnlyColorGlyphs: { //all glyph are color - List strips = vxFmtStr._strips; - int j = strips.Count; + + int j = vxFmtStr.StripCount; float start_x = (float)Math.Round(x); float start_y = (float)Math.Floor(y + base_offset); for (int n = 0; n < j; ++n) { - SameFontTextStrip s = strips[n]; + SameFontTextStrip s = vxFmtStr[n]; //change font, bitmap atlas , px_scale @@ -579,18 +541,19 @@ public void DrawString(GLRenderVxFormattedString vxFmtStr, double x, double y) { //in this mode =>don't draw color bitmap - List strips = vxFmtStr._strips; - int j = strips.Count; + + int j = vxFmtStr.StripCount; float start_x = (float)Math.Round(x); float start_y = (float)Math.Floor(y + base_offset); + switch (TextDrawingTechnique) { case GlyphTexturePrinterDrawingTechnique.LcdSubPixelRendering: { for (int n = 0; n < j; ++n) { - SameFontTextStrip s = strips[n]; + SameFontTextStrip s = vxFmtStr[n]; if (s.ColorGlyphOnTransparentBG) { continue; @@ -611,7 +574,7 @@ public void DrawString(GLRenderVxFormattedString vxFmtStr, double x, double y) { for (int n = 0; n < j; ++n) { - SameFontTextStrip s = strips[n]; + SameFontTextStrip s = vxFmtStr[n]; if (s.ColorGlyphOnTransparentBG) { @@ -657,14 +620,14 @@ public void DrawString(GLRenderVxFormattedString vxFmtStr, double x, double y) { //BUT if it not success => then... - List strips = vxFmtStr._strips; - int j = strips.Count; + + int j = vxFmtStr.StripCount; float start_x = (float)Math.Round(x); float start_y = (float)Math.Floor(y + base_offset); for (int n = 0; n < j; ++n) { - SameFontTextStrip s = strips[n]; + SameFontTextStrip s = vxFmtStr[n]; //change font, bitmap atlas , px_scale ChangeFont(s); @@ -711,14 +674,14 @@ public void DrawString(GLRenderVxFormattedString vxFmtStr, double x, double y) //not use wordplate if (_painter.PreparingWordStrip) { - List strips = vxFmtStr._strips; - int j = strips.Count; + + int j = vxFmtStr.StripCount; float start_x = (float)Math.Round(x); float start_y = (float)Math.Floor(y + base_offset); for (int n = 0; n < j; ++n) { - SameFontTextStrip s = strips[n]; + SameFontTextStrip s = vxFmtStr[n]; //change font, bitmap atlas , px_scale ChangeFont(s); @@ -733,8 +696,8 @@ public void DrawString(GLRenderVxFormattedString vxFmtStr, double x, double y) } else { - List strips = vxFmtStr._strips; - int j = strips.Count; + + int j = vxFmtStr.StripCount; float start_x = (float)Math.Round(x); float start_y = (float)Math.Floor(y + base_offset); float spanHeight = 0; @@ -742,7 +705,7 @@ public void DrawString(GLRenderVxFormattedString vxFmtStr, double x, double y) for (int n = 0; n < j; ++n) { - SameFontTextStrip s = strips[n]; + SameFontTextStrip s = vxFmtStr[n]; spanHeight = s.SpanHeight; spanWidth += s.Width; @@ -776,14 +739,14 @@ public void DrawString(GLRenderVxFormattedString vxFmtStr, double x, double y) { //can't create at this time //render with vbo - List strips = vxFmtStr._strips; - int j = strips.Count; + + int j = vxFmtStr.StripCount; float start_x = (float)Math.Round(x); float start_y = (float)Math.Floor(y + base_offset); for (int n = 0; n < j; ++n) { - SameFontTextStrip s = strips[n]; + SameFontTextStrip s = vxFmtStr[n]; //change font, bitmap atlas , px_scale ChangeFont(s); @@ -804,14 +767,14 @@ public void DrawString(GLRenderVxFormattedString vxFmtStr, double x, double y) if (vxFmtStr.GlyphMixMode == GLRenderVxFormattedStringGlyphMixMode.MixedStencilAndColorGlyphs) { ////draw color pat - List strips = vxFmtStr._strips; - int j = strips.Count; + + int j = vxFmtStr.StripCount; float start_x = (float)Math.Round(x); float start_y = (float)Math.Floor(y + base_offset); for (int n = 0; n < j; ++n) { - SameFontTextStrip s = strips[n]; + SameFontTextStrip s = vxFmtStr[n]; if (s.ColorGlyphOnTransparentBG) { //change font, bitmap atlas , px_scale @@ -834,7 +797,7 @@ public void DrawString(GLRenderVxFormattedString vxFmtStr, double x, double y) #endif - void CreateTextCoords(SameFontTextStrip txtStrip, FormattedGlyphPlanList seqs) + void CreateTextCoords(SameFontTextStrip txtStrip) { int top = 0;//simulate top int left = 0;//simulate left @@ -842,13 +805,15 @@ void CreateTextCoords(SameFontTextStrip txtStrip, FormattedGlyphPlanList seqs) //change font once ResolvedFont expected_resolvedFont = txtStrip.ResolvedFont; Typeface expectedTypeface = expected_resolvedFont.Typeface; + SpanBreakInfo expectedBreakInfo = txtStrip.BreakInfo; + #if DEBUG if (expectedTypeface == null) { throw new NotSupportedException(); } #endif ChangeFont(txtStrip); - float px_scale = expected_resolvedFont.GetScaleToPixelFromPointInSize(); + float px_scale = expected_resolvedFont.GetScaleToPixelFromPointUnit(); //TODO: review here, rounding error*** txtStrip.SpanHeight = expected_resolvedFont.LineSpacingInPixels;// (int)Math.Round(expectedTypeface.CalculateMaxLineClipHeight() * px_scale);// expectedFont.LineSpacingInPixels; @@ -857,8 +822,9 @@ void CreateTextCoords(SameFontTextStrip txtStrip, FormattedGlyphPlanList seqs) int descend_px = (int)expected_resolvedFont.DescentInPixels;// (int)(expectedTypeface.Descender * px_scale); int ascentd_px = (int)expected_resolvedFont.AscentInPixels;// (int)(expectedTypeface.Ascender * px_scale); txtStrip.DescendingInPx = descend_px;// (short)(expectedTypeface.Descender * px_scale); //expectedFont.DescentInPixels; + txtStrip.SpanDescendingInPx = (int)expected_resolvedFont.UsDescendingInPixels; - int count = seqs.Count; + int count = _fmtGlyphPlans.Count; float g_left = 0; float g_top = 0; @@ -876,111 +842,117 @@ void CreateTextCoords(SameFontTextStrip txtStrip, FormattedGlyphPlanList seqs) //we will create a txtstrip for an expected font only //for another font, just skip and wait - _vboBuilder.Clear();//*** + _vboBuilder.SetArrayLists(_sh_vertexList, _sh_indexList); //set output*** _vboBuilder.SetTextureInfo(_glBmp.Width, _glBmp.Height, _glBmp.IsYFlipped, _pcx.OriginKind); - for (int s = 0; s < count; ++s) + if (_fmtGlyphPlans.Count > 0) { - FormattedGlyphPlanSeq sq = seqs[s]; - bool isTargetFont = sq.ResolvedFont.Typeface == expectedTypeface; - //if this seq use another font=> just calculate entire advance with - ChangeFont(sq); + FormattedGlyphPlanSeq sq = _fmtGlyphPlans.GetFirst(); + while (sq != null) + { - px_scale = _px_scale; //init - //use current resolve font - bottom = (float)top + _ascending - _descending; - each_white_spaceW = _white_space_width; + bool isTargetFont = sq.ResolvedFont.Typeface == expectedTypeface && + sq.BreakInfo == expectedBreakInfo; - if (sq.PrefixWhitespaceCount > 0) - { - acc_x += each_white_spaceW * sq.PrefixWhitespaceCount; - } + //if this seq use another font=> just calculate entire advance with + ChangeFont(sq); + px_scale = _px_scale; //init + //use current resolve font + bottom = (float)top + _ascending - _descending; + each_white_spaceW = _white_space_width; - //create temp buffer span that describe the part of a whole char buffer - //ask text service to parse user input char buffer and create a glyph-plan-sequence (list of glyph-plan) - //with specific request font - GlyphPlanSequence glyphPlanSeq = sq.Seq; - int seqLen = glyphPlanSeq.Count; - for (int i = 0; i < seqLen; ++i) - { - UnscaledGlyphPlan glyphPlan = glyphPlanSeq[i]; - if (!isTargetFont) + if (sq.PrefixWhitespaceCount > 0) { - //not the target - //find only advance and go next - acc_x += (float)Math.Round(glyphPlan.AdvanceX * px_scale); - continue;//*** + acc_x += each_white_spaceW * sq.PrefixWhitespaceCount; } - if (!_fontAtlas.TryGetItem(glyphPlan.glyphIndex, out AtlasItem atlasItem)) + + //create temp buffer span that describe the part of a whole char buffer + //ask text service to parse user input char buffer and create a glyph-plan-sequence (list of glyph-plan) + //with specific request font + GlyphPlanSequence glyphPlanSeq = sq.Seq; + int seqLen = glyphPlanSeq.Count; + for (int i = 0; i < seqLen; ++i) { - //if no glyph data, we should render a missing glyph *** - continue; - } + UnscaledGlyphPlan glyphPlan = glyphPlanSeq[i]; + if (!isTargetFont) + { + //not the target + //find only advance and go next + acc_x += (float)Math.Round(glyphPlan.AdvanceX * px_scale); + continue;//*** + } - //-------------------------------------- - //TODO: review precise height in float - //-------------------------------------- + if (!_fontAtlas.TryGetItem(glyphPlan.glyphIndex, out AtlasItem atlasItem)) + { + //if no glyph data, we should render a missing glyph *** + continue; + } - var srcRect = new Rectangle(atlasItem.Left, atlasItem.Top, atlasItem.Width, atlasItem.Height); + //-------------------------------------- + //TODO: review precise height in float + //-------------------------------------- - //offset length from 'base-line' - float x_offset = acc_x + (float)Math.Round(glyphPlan.OffsetX * px_scale - atlasItem.TextureXOffset); - float y_offset = acc_y + (float)Math.Round(glyphPlan.OffsetY * px_scale - atlasItem.TextureYOffset) + srcRect.Height; //*** + var srcRect = new Rectangle(atlasItem.Left, atlasItem.Top, atlasItem.Width, atlasItem.Height); - //NOTE: - // -glyphData.TextureXOffset => restore to original pos - // -glyphData.TextureYOffset => restore to original pos - //-------------------------- + //offset length from 'base-line' + float x_offset = acc_x + (float)Math.Round(glyphPlan.OffsetX * px_scale - atlasItem.TextureXOffset); + float y_offset = acc_y + (float)Math.Round(glyphPlan.OffsetY * px_scale - atlasItem.TextureYOffset) + srcRect.Height; //*** - g_left = (float)(left + x_offset); - g_top = (float)(bottom - y_offset); //*** + //NOTE: + // -glyphData.TextureXOffset => restore to original pos + // -glyphData.TextureYOffset => restore to original pos + //-------------------------- - acc_x += (float)Math.Round(glyphPlan.AdvanceX * px_scale); - g_top = (float)Math.Floor(g_top);//adjust to integer num *** + g_left = (float)(left + x_offset); + g_top = (float)(bottom - y_offset); //*** - hasSomeGlyphs = true; - _vboBuilder.WriteRect(srcRect, g_left, g_top, scaleFromTexture); + acc_x += (float)Math.Round(glyphPlan.AdvanceX * px_scale); + g_top = (float)Math.Floor(g_top);//adjust to integer num *** - } + hasSomeGlyphs = true; + _vboBuilder.WriteRect(srcRect, g_left, g_top, scaleFromTexture); - // - if (sq.PostfixWhitespaceCount > 0) - { - //*** - if (isTargetFont) + } + + // + if (sq.PostfixWhitespaceCount > 0) { - _vboBuilder.AppendDegenerativeTriangle(); + //*** + if (isTargetFont) + { + _vboBuilder.AppendDegenerativeTriangle(); + } + acc_x += each_white_spaceW * sq.PostfixWhitespaceCount; } - acc_x += each_white_spaceW * sq.PostfixWhitespaceCount; + + //------------ + // + sq = sq.Next; } + } + + if (hasSomeGlyphs) { _vboBuilder.AppendDegenerativeTriangle(); - - txtStrip.IndexArrayCount = _vboBuilder._indexList.Count; - txtStrip.IndexArray = _vboBuilder._indexList.ToArray(); - txtStrip.VertexCoords = _vboBuilder._buffer.ToArray(); - } txtStrip.Width = acc_x; - - _vboBuilder.Clear(); } - - readonly FormattedGlyphPlanList _fmtGlyphPlans = new FormattedGlyphPlanList(); - readonly Dictionary _uniqueResolvedFonts = new Dictionary(); + readonly FormattedGlyphPlanSeqPool _fmtGlyphPlans = new FormattedGlyphPlanSeqPool(); + readonly Dictionary _uniqueResolvedFonts = new Dictionary(); readonly struct SpanFormattedInfo { + //just intermediate structure public readonly ResolvedFont resolvedFont; public readonly SpanBreakInfo breakInfo; public SpanFormattedInfo(ResolvedFont resolvedFont, SpanBreakInfo breakInfo) @@ -990,60 +962,66 @@ public SpanFormattedInfo(ResolvedFont resolvedFont, SpanBreakInfo breakInfo) } } - public void PrepareStringForRenderVx(GLRenderVxFormattedString vxFmtStr, char[] buffer, int startAt, int len) - { - //we need to parse string - //since it may contains glyph from multiple font (eg. eng, emoji etc.) - //see VxsTextPrinter - - var buffSpan = new Typography.Text.TextBufferSpan(buffer, startAt, len); - - RequestFont reqFont = _painter.CurrentFont; //init with default + PixelFarm.CpuBlit.ArrayList _sh_vertexList; + PixelFarm.CpuBlit.ArrayList _sh_indexList; + bool _useSingleSequentialIndexList; + PixelFarm.CpuBlit.ArrayList _sh_globalIndexList = new PixelFarm.CpuBlit.ArrayList(); - ResolvedFont resolvedFont = _txtClient.ResolveFont(reqFont); - // + void PrepareStringForRenderVx(GLRenderVxFormattedString vxFmtStr, FormattedGlyphPlanSeq fmt_seq) + { - Typeface curTypeface = resolvedFont.Typeface; - _fmtGlyphPlans.Clear(); _uniqueResolvedFonts.Clear(); - //resolved font has information about typeface, size - - _txtClient.SetCurrentFont(curTypeface, _fontSizeInPoints, _txtClient.CurrentScriptLang); - _txtClient.PrepareFormattedStringList(buffer, startAt, len, _fmtGlyphPlans); - - bool needRightToLeftArr = _fmtGlyphPlans.IsRightToLeftDirection; - - int j = _fmtGlyphPlans.Count; - for (int n = 0; n < j; ++n) + while (fmt_seq != null) { - //each part may contains diff unicode range - FormattedGlyphPlanSeq fmt_seq = _fmtGlyphPlans[n]; + //find unique atlas SpanFormattedInfo spFmt = new SpanFormattedInfo(fmt_seq.ResolvedFont, fmt_seq.BreakInfo); if (!_uniqueResolvedFonts.ContainsKey(spFmt)) { - _uniqueResolvedFonts.Add(spFmt, spFmt); + _uniqueResolvedFonts.Add(spFmt, true); } + // + fmt_seq = fmt_seq.Next; } + + //a fmtGlyphPlanSeqs may contains glyph from more than 1 font, //now, create a overlapped strip for each #if DEBUG - if (vxFmtStr._strips.Count > 0) { throw new NotSupportedException(); } + vxFmtStr.dbugPreparing = true; + if (vxFmtStr.StripCount > 0) + { + throw new NotSupportedException(); + } #endif - - float spanHeight = 0; float spanWidth = 0; int descendingInPx = 0; + int spanDescendingInPx = 0; int maxStripHeight = 0; - GlyphMixModeSummary mixModeSummary = new GlyphMixModeSummary(); + GlyphMixModeSummary mixModeSummary = new GlyphMixModeSummary();//light-weight state helper + + _useSingleSequentialIndexList = (_uniqueResolvedFonts.Count < 2); + + vxFmtStr.PrepareIntermediateStructures(_useSingleSequentialIndexList); + //get blank indexList and vertexList from a fmtString, + //this text printer will create a data set for it. + _sh_vertexList = vxFmtStr._sh_vertexList;//temp, + if (_useSingleSequentialIndexList) + { + _sh_indexList = _sh_globalIndexList; + } + else + { + _sh_indexList = vxFmtStr._sh_indexList; //temp, + } - foreach (var kv in _uniqueResolvedFonts) + foreach (SpanFormattedInfo spFmt in _uniqueResolvedFonts.Keys) { //once for each typeface*** - SpanFormattedInfo spFmt = kv.Value; + //SpanFormattedInfo spFmt = kv.Key; #if DEBUG if (spFmt.resolvedFont == null) { throw new NotSupportedException(); } @@ -1052,71 +1030,132 @@ public void PrepareStringForRenderVx(GLRenderVxFormattedString vxFmtStr, char[] Typeface typeface = spFmt.resolvedFont.Typeface; //TODO: review here again, use pool - SameFontTextStrip sameFontTextStrip = new SameFontTextStrip - { - ResolvedFont = spFmt.resolvedFont, - BreakInfo = spFmt.breakInfo - }; + SameFontTextStrip sameFontTextStrip = vxFmtStr.AppendNewStrip(); + sameFontTextStrip.UseSeqIndexList = _useSingleSequentialIndexList; + sameFontTextStrip.ResolvedFont = spFmt.resolvedFont; + sameFontTextStrip.BreakInfo = spFmt.breakInfo; //assign ColorGlyphOnTransparentBG and update mix mode state mixModeSummary.AddGlyphMixMode( sameFontTextStrip.ColorGlyphOnTransparentBG = (typeface.HasSvgTable() || typeface.IsBitmapFont || typeface.HasColorTable())); + //** + + int sh_vertex_begin = _sh_vertexList.Count; + + int sh_index_begin = _useSingleSequentialIndexList ? 0 : _sh_indexList.Count; - //** - CreateTextCoords(sameFontTextStrip, _fmtGlyphPlans); + CreateTextCoords(sameFontTextStrip); //** //use max size of height and descending ? descendingInPx = sameFontTextStrip.DescendingInPx; + spanDescendingInPx = sameFontTextStrip.SpanDescendingInPx; maxStripHeight = Math.Max(maxStripHeight, sameFontTextStrip.SpanHeight); spanWidth = sameFontTextStrip.Width;//same width for all strip - vxFmtStr._strips.Add(sameFontTextStrip); + + if (_useSingleSequentialIndexList) + { + sameFontTextStrip.SetIndexCount(_sh_globalIndexList.Length); + _sh_globalIndexList.Clear(); + } + else + { + sameFontTextStrip.IndexArray = _sh_indexList.CreateSpan(sh_index_begin, _sh_indexList.Length - sh_index_begin); + } + sameFontTextStrip.VertexCoords = _sh_vertexList.CreateSpan(sh_vertex_begin, _sh_vertexList.Length - sh_vertex_begin); } //adjust addition vertical height spanHeight = maxStripHeight; - int stripCount = vxFmtStr._strips.Count; - for (int i = 0; i < stripCount; ++i) - { - SameFontTextStrip sameFontTextStrip = vxFmtStr._strips[i]; - sameFontTextStrip.AdditionalVerticalOffset = maxStripHeight - sameFontTextStrip.SpanHeight; - } - + vxFmtStr.ApplyAdditionalVerticalOffset(maxStripHeight); vxFmtStr.GlyphMixMode = mixModeSummary.FinalMixMode; - vxFmtStr.SpanHeight = spanHeight; vxFmtStr.Width = spanWidth; vxFmtStr.DescendingInPx = (short)descendingInPx; - - + vxFmtStr.SpanDescendingInPx = (short)spanDescendingInPx; + vxFmtStr.CreationState = GLRenderVxFormattedStringState.S1_VertexList; //----------- //TODO: review here again - if (vxFmtStr.Delay) - { - //when we use delay mode - //we need to save current font setting of the _painter - //with the render vx--- - //vxFmtStr.RequestFont = _painter.CurrentFont; - } - else + if (!vxFmtStr.Delay) { //TODO: review here again _painter.TryCreateWordStrip(vxFmtStr); } + + //contains chain _uniqueResolvedFonts.Clear(); - //restore prev typeface & settings + + _sh_indexList = null; //reset + _sh_vertexList = null;//reset +#if DEBUG + vxFmtStr.dbugPreparing = false; + +#endif + } + + public void PrepareStringForRenderVx(GLRenderVxFormattedString vxFmtStr, IFormattedGlyphPlanList fmtGlyphPlans) + { + if (!(fmtGlyphPlans is FormattedGlyphPlanListHolder fmtHolder)) { return; } + + PrepareStringForRenderVx(vxFmtStr, fmtHolder._chainFmtGlyphPlans); + } + public void PrepareStringForRenderVx(GLRenderVxFormattedString vxFmtStr, char[] buffer, int startAt, int len) + { + //we need to parse string + //since it may contains glyph from multiple font (eg. eng, emoji etc.) + //see VxsTextPrinter + + //resolved font has information about typeface, size + _txtClient.SetCurrentFont( + _txtClient.ResolveFont(_painter.CurrentFont).Typeface, + _fontSizeInPoints, + _txtClient.CurrentScriptLang); + + if (vxFmtStr.IsReset) + { + _painter.TryCreateWordStrip(vxFmtStr); + } + else + { + _fmtGlyphPlans.Clear(); //reuse + _txtClient.PrepareFormattedStringList(buffer, startAt, len, _fmtGlyphPlans); + if (_fmtGlyphPlans.Count > 0) + { + PrepareStringForRenderVx(vxFmtStr, _fmtGlyphPlans.GetFirst()); + } + } } + public void PrepareStringForRenderVx(GLRenderVxFormattedString vxFmtStr, int[] buffer, int startAt, int len) + { + //we need to parse string + //since it may contains glyph from multiple font (eg. eng, emoji etc.) + //see VxsTextPrinter + + //resolved font has information about typeface, size + _txtClient.SetCurrentFont( + _txtClient.ResolveFont(_painter.CurrentFont).Typeface, + _fontSizeInPoints, + _txtClient.CurrentScriptLang); + + _fmtGlyphPlans.Clear(); //reuse + _txtClient.PrepareFormattedStringList(buffer, startAt, len, _fmtGlyphPlans); + if (_fmtGlyphPlans.Count > 0) + { + PrepareStringForRenderVx(vxFmtStr, _fmtGlyphPlans.GetFirst()); + } + + } /// /// helper struct for summarize glyph mixed mode /// - struct GlyphMixModeSummary + ref struct GlyphMixModeSummary { public GLRenderVxFormattedStringGlyphMixMode FinalMixMode { get; private set; } public void AddGlyphMixMode(bool colorGlyphOnTransparentBG) diff --git a/src/PixelFarm/PixelFarm.Drawing.GLES/TextPrinter/GLRenderVxFormattedString.cs b/src/PixelFarm/PixelFarm.Drawing.GLES/TextPrinter/GLRenderVxFormattedString.cs index 713debeed..eefa8a000 100644 --- a/src/PixelFarm/PixelFarm.Drawing.GLES/TextPrinter/GLRenderVxFormattedString.cs +++ b/src/PixelFarm/PixelFarm.Drawing.GLES/TextPrinter/GLRenderVxFormattedString.cs @@ -1,6 +1,7 @@ //MIT, 2016-present, WinterDev using System; using System.Collections.Generic; +using PixelFarm.CpuBlit; using PixelFarm.Drawing; using Typography.Text; using Typography.TextBreak; @@ -15,25 +16,40 @@ enum GLRenderVxFormattedStringGlyphMixMode : byte MixedStencilAndColorGlyphs } + enum GLRenderVxFormattedStringState : byte + { + S0_Init, + S1_VertexList, + S2_TextureStrip, + S4_Reset + + } /// /// texture-based render vx /// public class GLRenderVxFormattedString : PixelFarm.Drawing.RenderVxFormattedString { - internal List _strips = new List(); + List _strips; + + internal PixelFarm.CpuBlit.ArrayList _sh_vertexList; //temp src vertice buffer for each SameFontTextStrip + internal PixelFarm.CpuBlit.ArrayList _sh_indexList; //temp src indice buffer for each SameFontTextStrip internal GLRenderVxFormattedString() { } - public ushort WordPlateLeft { get; set; } public ushort WordPlateTop { get; set; } + internal WordPlate OwnerPlate { get; set; } - internal bool Delay { get; set; } internal bool UseWithWordPlate { get; set; } + internal int CreationCycle { get; set; } + internal bool SkipCreation { get; set; } + internal bool Delay { get; set; } internal GLRenderVxFormattedStringGlyphMixMode GlyphMixMode { get; set; } - internal void ClearOwnerPlate() + internal GLRenderVxFormattedStringState CreationState { get; set; } //creation state + + void ClearOwnerPlate() { if (OwnerPlate != null) { @@ -42,126 +58,177 @@ internal void ClearOwnerPlate() OwnerPlate = null; } } - internal void Reuse() + + internal void ClearData() { WordPlateLeft = WordPlateTop = 0; ClearOwnerPlate(); - OwnerPlate = null; Delay = false; UseWithWordPlate = true; GlyphMixMode = GLRenderVxFormattedStringGlyphMixMode.Unknown; - int j = _strips.Count; - for (int i = 0; i < j; ++i) + + DisposeWordStripsVbo(); + + + if (_sh_vertexList != null) + { + _sh_vertexList.Clear(); + s_vertextListPool.Push(_sh_vertexList); + _sh_vertexList = null; + } + if (_sh_indexList != null) { - _strips[i].DisposeVbo(); + _sh_indexList.Clear(); + s_indexListPool.Push(_sh_indexList); + _sh_indexList = null; } - _strips.Clear(); + if (_strips != null) + { + int j = _strips.Count; + for (int i = 0; i < j; ++i) + { + SameFontTextStrip s = _strips[i]; + s.Reset(); + s_textStripPool.Push(s); + } + _strips.Clear(); + _strips = null; + } } - - public void DisposeVbo() + /// + /// dispose only vbo inside each word-strip + /// + internal void DisposeWordStripsVbo() { //dispose only its vbo //preserve coord data - foreach (SameFontTextStrip s in _strips) + if (_strips != null) { - s.DisposeVbo(); + int j = _strips.Count; + for (int i = 0; i < j; ++i) + { + _strips[i].DisposeVbo(); + } } } public override void Dispose() { - //no use this any more - //VertexCoords = null; - //IndexArray = null; - - ClearOwnerPlate(); - DisposeVbo(); - _strips.Clear(); - + ClearData(); base.Dispose(); } -#if DEBUG - public string dbugText; - public override string ToString() - { - if (dbugText != null) - { - return dbugText; - } - return base.ToString(); - } - public override string dbugName => "GL"; -#endif - } - public class GLRenderVxFormattedStringSpan - { - DrawingGL.VertexBufferObject _vbo; - internal GLRenderVxFormattedStringSpan() + internal SameFontTextStrip AppendNewStrip() { + var newstrip = (s_textStripPool.Count > 0) ? s_textStripPool.Pop() : new SameFontTextStrip(); + //get buffer from pool + _strips.Add(newstrip); + return newstrip; } - //-------- - public float[] VertexCoords { get; set; } - public ushort[] IndexArray { get; set; } - public int IndexArrayCount { get; set; } - public ushort WordPlateLeft { get; set; } - public ushort WordPlateTop { get; set; } - - internal RequestFont RequestFont { get; set; } - internal WordPlate OwnerPlate { get; set; } - internal bool Delay { get; set; } - internal bool UseWithWordPlate { get; set; } - internal void ClearOwnerPlate() +#if DEBUG + internal bool dbugPreparing = false; +#endif + public override int StripCount => (_strips == null) ? 0 : _strips.Count; + + //{ + // get + // { + + // if (_strips == null) + // { + // if (!dbugPreparing) + // { + + // } + // return 0; + // } + // else + // { + // return _strips.Count; + // } + // //return (_strips == null) ? 0 : _strips.Count; + // } + //} + + internal SameFontTextStrip this[int index] => _strips[index]; + + internal void ApplyAdditionalVerticalOffset(int maxStripHeight) { - OwnerPlate = null; + int j = _strips.Count; + for (int i = 0; i < j; ++i) + { + SameFontTextStrip s = _strips[i]; + s.AdditionalVerticalOffset = maxStripHeight - s.SpanHeight; + } } - - internal DrawingGL.VertexBufferObject GetVbo() + internal void PrepareIntermediateStructures(bool useSingleSeqIndexList) { - if (_vbo != null) + if (_strips == null) { - return _vbo; + _strips = (s_sameFontTextStripListPool.Count > 0) ? s_sameFontTextStripListPool.Pop() : new List(); } - _vbo = new VertexBufferObject(); - _vbo.CreateBuffers(this.VertexCoords, this.IndexArray); - return _vbo; + if (_sh_vertexList == null) + { + _sh_vertexList = (s_vertextListPool.Count > 0) ? s_vertextListPool.Pop() : new PixelFarm.CpuBlit.ArrayList(); + } + if (!useSingleSeqIndexList) + { + _sh_indexList = (s_indexListPool.Count > 0) ? s_indexListPool.Pop() : new PixelFarm.CpuBlit.ArrayList(); + } + + CreationState = GLRenderVxFormattedStringState.S0_Init; } - internal void DisposeVbo() + internal void ReleaseIntermediateStructures() { - //dispose only VBO - //and we can create the vbo again - //from VertexCoord and IndexArray - if (_vbo != null) + if (GlyphMixMode == GLRenderVxFormattedStringGlyphMixMode.MixedStencilAndColorGlyphs) { - _vbo.Dispose(); - _vbo = null; + return; } - } - public void Dispose() - { - //no use this any more - VertexCoords = null; - IndexArray = null; - //if (OwnerPlate != null) + //------------------ + //state2: strips + //if (_strips != null) //{ - // OwnerPlate.RemoveWordStrip(this); - // OwnerPlate = null; + // int j = _strips.Count; + // for (int i = 0; i < j; ++i) + // { + // _strips[i].Reset(); + // } + // _strips.Clear(); + // s_sameFontTextStripListPool.Push(_strips); + // _strips = null; //} + //------------------ + //state1: Data + //if (_sh_vertexList != null) + //{ + // _sh_vertexList.Clear(); + // s_vertextListPool.Push(_sh_vertexList); + // _sh_vertexList = null; + //} + //if (_sh_indexList != null) + //{ + // _sh_indexList.Clear(); + // s_indexListPool.Push(_sh_indexList); + // _sh_indexList = null; + //} - DisposeVbo(); - + CreationState = GLRenderVxFormattedStringState.S4_Reset; } #if DEBUG + static int s_sameStrCount; + static int s_dbugTotalId; + public readonly int dbugId = ++s_dbugTotalId; public string dbugText; + public override string ToString() { if (dbugText != null) @@ -170,10 +237,16 @@ public override string ToString() } return base.ToString(); } + public override string dbugName => "GL"; #endif - } + readonly static Stack> s_vertextListPool = new Stack>(); + readonly static Stack> s_indexListPool = new Stack>(); + readonly static Stack s_textStripPool = new Stack(); + readonly static Stack> s_sameFontTextStripListPool = new Stack>(); + } + /// @@ -183,30 +256,72 @@ class SameFontTextStrip { //our _vbo is used with 1 font texture //so if a text-strip use multiple font - //we need to separate it into multiple SameFontTextStrip. - + //we need to separate it into multiple SameFontTextStrip +#if DEBUG + public SameFontTextStrip() + { - public SameFontTextStrip() { } + } +#endif public DrawingGL.VertexBufferObject _vbo; - public float[] VertexCoords { get; set; } - public ushort[] IndexArray { get; set; } - public int IndexArrayCount { get; set; } + public PixelFarm.CpuBlit.ArrayListSegment VertexCoords { get; set; } + public PixelFarm.CpuBlit.ArrayListSegment IndexArray { get; set; } + public int IndexArrayCount => UseSeqIndexList ? _seqIndexCount : IndexArray.Count; public float Width { get; set; } public int SpanHeight { get; set; } public int DescendingInPx { get; set; } + public int SpanDescendingInPx { get; set; } public int AdditionalVerticalOffset { get; set; } public bool ColorGlyphOnTransparentBG { get; set; } + + static readonly Stack s_sharedIndexBufferStack = new Stack(); + const int SHARED_INDEX_BUFFER_SIZE = 1024; + internal bool UseSeqIndexList { get; set; } + + int _seqIndexCount; + internal void SetIndexCount(int seqIndexCount) + { + _seqIndexCount = seqIndexCount; + } + + int _sharedIndexBufferId; //use shared index buffer or not internal DrawingGL.VertexBufferObject GetVbo() { + _sharedIndexBufferId = 0; if (_vbo != null) { return _vbo; } + + //for our index list: + //our generator generate sequence number 1,2,3,4,5,6.... + //so we can use shared index-list buffer + _vbo = new VertexBufferObject(); - _vbo.CreateBuffers(this.VertexCoords, this.IndexArray); + if (IndexArray.len >= SHARED_INDEX_BUFFER_SIZE) + { + _vbo.CreateBuffers(VertexCoords, IndexArray); + } + else + { + // + if (s_sharedIndexBufferStack.Count > 0) + { + _sharedIndexBufferId = s_sharedIndexBufferStack.Pop(); + } + else + { + //create a new one + _sharedIndexBufferId = SharedIndexBufferHelper.NewElementArrayBuffer(SHARED_INDEX_BUFFER_SIZE); + } + + //use a simple index buffer here + _vbo.CreateBuffers(VertexCoords, _sharedIndexBufferId, IndexArray.len); + } + return _vbo; } @@ -221,10 +336,27 @@ internal void DisposeVbo() _vbo.Dispose(); _vbo = null; } + + if (_sharedIndexBufferId > 0) + { + s_sharedIndexBufferStack.Push(_sharedIndexBufferId); + _sharedIndexBufferId = 0; + } } public ResolvedFont ResolvedFont { get; set; } public SpanBreakInfo BreakInfo { get; set; } + public void Reset() + { + DisposeVbo(); + Width = 0; + SpanHeight = DescendingInPx = AdditionalVerticalOffset = SpanDescendingInPx = 0; + ColorGlyphOnTransparentBG = false; + VertexCoords = PixelFarm.CpuBlit.ArrayListSegment.Empty; + IndexArray = PixelFarm.CpuBlit.ArrayListSegment.Empty; + ResolvedFont = null; + BreakInfo = null; + } } diff --git a/src/PixelFarm/PixelFarm.Drawing.GLES/TextPrinter/WordPlateAndWordPlateMx.cs b/src/PixelFarm/PixelFarm.Drawing.GLES/TextPrinter/WordPlateAndWordPlateMx.cs index a80dc51a0..94486417d 100644 --- a/src/PixelFarm/PixelFarm.Drawing.GLES/TextPrinter/WordPlateAndWordPlateMx.cs +++ b/src/PixelFarm/PixelFarm.Drawing.GLES/TextPrinter/WordPlateAndWordPlateMx.cs @@ -8,23 +8,29 @@ namespace PixelFarm.DrawingGL { - + /// + /// wordplate manager + /// class WordPlateMx { - Dictionary _wordPlates = new Dictionary(); - //**dictionay not guarantee sorted id** - Queue _wordPlatesQueue = new Queue(); + readonly Dictionary _wordPlates = new Dictionary(); + //**dictionay does not guarantee sorted id** + + readonly Queue _wordPlatesQueue = new Queue(); WordPlate _latestPlate; - int _defaultPlateW = 800; - int _defaultPlateH = 600; + int _defaultPlateW = 1024; + int _defaultPlateH = 512; static ushort s_totalPlateId = 0; public WordPlateMx() { MaxPlateCount = 20; //*** important! +#if DEBUG + //MaxPlateCount = 3;//temp for test the performance +#endif AutoRemoveOldestPlate = true; } @@ -58,7 +64,8 @@ public WordPlate GetWordPlate(GLRenderVxFormattedString fmtPlate) } return GetNewWordPlate(); } - public WordPlate GetNewWordPlate() + + WordPlate GetNewWordPlate() { //create new and register if (_wordPlates.Count == MaxPlateCount) @@ -68,7 +75,7 @@ public WordPlate GetNewWordPlate() //**dictionay not guarantee sorted id** //so we use queue, (TODO: use priority queue) WordPlate oldest = _wordPlatesQueue.Dequeue(); - _wordPlates.Remove(oldest._plateId); + //_wordPlates.Remove(oldest._plateId); #if DEBUG if (oldest.dbugUsedCount < 50) { @@ -77,8 +84,9 @@ public WordPlate GetNewWordPlate() //oldest.dbugSaveBackBuffer("word_plate_" + oldest._plateId + ".png"); #endif - oldest.Dispose(); - oldest = null; + oldest.ClearAndReuse(); + _wordPlatesQueue.Enqueue(oldest); + return oldest; } } @@ -117,8 +125,8 @@ public class WordPlate : IDisposable bool _full; internal readonly ushort _plateId; - Dictionary _wordStrips = new Dictionary(); internal Drawing.GLES2.MyGLBackbuffer _backBuffer; + readonly Dictionary _wordStrips = new Dictionary(); public event Action Cleared; @@ -144,7 +152,13 @@ public void dbugSaveBackBuffer(string filename) } #endif + /// + /// inter-line space + /// const int INTERLINE_SPACE = 1; //px + /// + /// inter-word space + /// const int INTERWORD_SPACE = 1; //px public void Dispose() @@ -158,11 +172,30 @@ public void Dispose() foreach (GLRenderVxFormattedString k in _wordStrips.Keys) { //essential! - k.ClearOwnerPlate(); + k.State = RenderVxFormattedString.VxState.NoStrip; + k.OwnerPlate = null; } _wordStrips.Clear(); } + public void ClearAndReuse() + { + //clear this word plate nad + _isInitBg = false;//will apint bg again + foreach (GLRenderVxFormattedString k in _wordStrips.Keys) + { + //essential! + //k.Delay = true;//*** + k.IsReset = true; + k.State = RenderVxFormattedString.VxState.NoStrip; + k.OwnerPlate = null;//remove its parent + + } + _wordStrips.Clear(); + _full = false; + _currentX = _currentY = 0; + _currentLineHeightMax = 20;//?? + } public bool Full => _full; @@ -177,14 +210,13 @@ public bool HasAvailableSpace(GLRenderVxFormattedString renderVxFormattedString) #endif if (_currentX + width > _plateWidth) { - //move to newline + //move to newline previewY += _currentLineHeightMax + INTERLINE_SPACE; - } return previewY + renderVxFormattedString.SpanHeight < _plateHeight; } - public bool CreateWordStrip(GLPainter painter, GLRenderVxFormattedString renderVxFormattedString) + public bool CreateWordStrip(GLPainter painter, GLRenderVxFormattedString fmtstr) { //-------------- //create stencil text buffer @@ -199,7 +231,7 @@ public bool CreateWordStrip(GLPainter painter, GLRenderVxFormattedString renderV } - float width = renderVxFormattedString.Width; + float width = fmtstr.Width; if (_currentX + width > _plateWidth) { @@ -207,21 +239,21 @@ public bool CreateWordStrip(GLPainter painter, GLRenderVxFormattedString renderV _currentY += _currentLineHeightMax + INTERLINE_SPACE;//interspace =4 px _currentX = 0; //new line - _currentLineHeightMax = (int)Math.Ceiling(renderVxFormattedString.SpanHeight); + _currentLineHeightMax = (int)Math.Ceiling(fmtstr.SpanHeight); } //on current line //check available height - if (_currentY + renderVxFormattedString.SpanHeight > _plateHeight) + if (_currentY + fmtstr.SpanHeight > _plateHeight) { _full = true; return false; } //---------------------------------- - if (renderVxFormattedString.SpanHeight > _currentLineHeightMax) + if (fmtstr.SpanHeight > _currentLineHeightMax) { - _currentLineHeightMax = (int)Math.Ceiling(renderVxFormattedString.SpanHeight); + _currentLineHeightMax = (int)Math.Ceiling(fmtstr.SpanHeight); } @@ -233,12 +265,12 @@ public bool CreateWordStrip(GLPainter painter, GLRenderVxFormattedString renderV painter.TextBgColorHint = Color.Black; painter.FontFillColor = Color.White; painter.PreparingWordStrip = true; - renderVxFormattedString.UseWithWordPlate = false; + fmtstr.UseWithWordPlate = false; GLBitmapGlyphTextPrinter textPrinter = (GLBitmapGlyphTextPrinter)painter.TextPrinter; - switch (renderVxFormattedString.GlyphMixMode) + switch (fmtstr.GlyphMixMode) { case GLRenderVxFormattedStringGlyphMixMode.OnlyColorGlyphs: { @@ -255,31 +287,32 @@ public bool CreateWordStrip(GLPainter painter, GLRenderVxFormattedString renderV //use special mode of the GLBitmapGlyphTextPrinter //----------- - textPrinter.WordPlateCreatingMode = true; //turn on platemode - textPrinter.DrawString(renderVxFormattedString, _currentX, _currentY); - textPrinter.WordPlateCreatingMode = false;//switch back + textPrinter.IsInWordPlateCreatingMode = true; //turn on platemode + textPrinter.DrawString(fmtstr, _currentX, _currentY); + textPrinter.IsInWordPlateCreatingMode = false;//switch back //----------- - renderVxFormattedString.UseWithWordPlate = true;//restore + fmtstr.UseWithWordPlate = true;//restore painter.FontFillColor = prevColor;//restore painter.TextBgColorHint = prevTextBgHint;//restore painter.PreparingWordStrip = prevPreparingWordStrip; painter.TextPrinterDrawingTechnique = prevTextDrawing;//restore //in this case we can dispose vbo inside renderVx //(we can recreate that vbo later) - renderVxFormattedString.DisposeVbo(); + fmtstr.DisposeWordStripsVbo(); + + fmtstr.OwnerPlate = this; + fmtstr.WordPlateLeft = (ushort)_currentX; + fmtstr.WordPlateTop = (ushort)_currentY; + fmtstr.UseWithWordPlate = true; - renderVxFormattedString.OwnerPlate = this; - renderVxFormattedString.WordPlateLeft = (ushort)_currentX; - renderVxFormattedString.WordPlateTop = (ushort)_currentY; - renderVxFormattedString.UseWithWordPlate = true; #if DEBUG dbugUsedCount++; #endif - _wordStrips.Add(renderVxFormattedString, true); + _wordStrips.Add(fmtstr, true); //-------- - _currentX += (int)Math.Ceiling(renderVxFormattedString.Width) + INTERWORD_SPACE; //interspace x 1px + _currentX += (int)Math.Ceiling(fmtstr.Width) + INTERWORD_SPACE; //interspace x 1px #if DEBUG //dbugSaveBackBuffer("dbug_test1.png"); diff --git a/src/PixelFarm/PixelFarm.Drawing.GdiPlus_SH/DrawBoard/4_GdiPlusDrawBoard_TextAndFonts.cs b/src/PixelFarm/PixelFarm.Drawing.GdiPlus_SH/DrawBoard/4_GdiPlusDrawBoard_TextAndFonts.cs index d00cc4832..e78e0ba50 100644 --- a/src/PixelFarm/PixelFarm.Drawing.GdiPlus_SH/DrawBoard/4_GdiPlusDrawBoard_TextAndFonts.cs +++ b/src/PixelFarm/PixelFarm.Drawing.GdiPlus_SH/DrawBoard/4_GdiPlusDrawBoard_TextAndFonts.cs @@ -18,6 +18,10 @@ namespace PixelFarm.Drawing.WinGdi { partial class GdiPlusDrawBoard { + public override RenderVxFormattedString CreateFormattedString(int[] buffer, int startAt, int len, bool delay) + { + throw new System.NotImplementedException(); + } public override RenderVxFormattedString CreateFormattedString(char[] buffer, int startAt, int len, bool delay) { //TODO: review here diff --git a/src/PixelFarm/PixelFarm.Drawing.GdiPlus_SH/Painter/BitmapHelper.cs b/src/PixelFarm/PixelFarm.Drawing.GdiPlus_SH/Painter/BitmapHelper.cs index fab67cc38..ecd918952 100644 --- a/src/PixelFarm/PixelFarm.Drawing.GdiPlus_SH/Painter/BitmapHelper.cs +++ b/src/PixelFarm/PixelFarm.Drawing.GdiPlus_SH/Painter/BitmapHelper.cs @@ -3,7 +3,7 @@ using System; using System.Drawing; using System.Drawing.Imaging; - + using PixelFarm.CpuBlit.Imaging; using MemMx = PixelFarm.Drawing.Internal.MemMx; @@ -436,9 +436,7 @@ public static void CopyFromGdiPlusBitmapSameSizeTo32BitsBuffer( TempMemPtr targetBufferPtr = MemBitmap.GetBufferPtr(dstMemBmp); BitmapData bmpData = srcWindowsBitmap.LockBits( - new Rectangle(0, 0, - w, - h), + new Rectangle(0, 0, w, h), System.Drawing.Imaging.ImageLockMode.ReadOnly, System.Drawing.Imaging.PixelFormat.Format32bppArgb); //read as 32 bits unsafe diff --git a/src/PixelFarm/PixelFarm.Drawing.GdiPlus_SH/Painter/GdiMemBitmapIO.cs b/src/PixelFarm/PixelFarm.Drawing.GdiPlus_SH/Painter/GdiMemBitmapIO.cs index be1ba3998..5e508a325 100644 --- a/src/PixelFarm/PixelFarm.Drawing.GdiPlus_SH/Painter/GdiMemBitmapIO.cs +++ b/src/PixelFarm/PixelFarm.Drawing.GdiPlus_SH/Painter/GdiMemBitmapIO.cs @@ -1,14 +1,15 @@ //Apache2, 2014-present, WinterDev using System; -using PixelFarm.CpuBlit; using System.IO; + +using PixelFarm.CpuBlit; using MemMx = PixelFarm.Drawing.Internal.MemMx; namespace PixelFarm.Drawing.WinGdi { public sealed class GdiBitmapIO : MemBitmapIO - { + { public override MemBitmap ScaleImage(MemBitmap bmp, float x_scale, float y_scale) { @@ -116,34 +117,12 @@ public override void SaveImage(MemBitmap bitmap, Stream output, OutputImageForma public override void SaveImage(MemBitmap bitmap, string filename, OutputImageFormat outputFormat, object saveParameters) { //TODO: resolve filename here!!! - - using (System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(bitmap.Width, bitmap.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb)) + using (FileStream output = new FileStream(filename, FileMode.Create)) { - var bmpdata = bmp.LockBits(new System.Drawing.Rectangle(0, 0, bitmap.Width, bitmap.Height), - System.Drawing.Imaging.ImageLockMode.WriteOnly, - System.Drawing.Imaging.PixelFormat.Format32bppArgb); - unsafe - { - byte* ptr = (byte*)MemBitmap.GetBufferPtr(bitmap).Ptr; - MemMx.memcpy((byte*)bmpdata.Scan0, ptr, bmpdata.Stride * bmp.Height); - } - bmp.UnlockBits(bmpdata); - - //save to stream - System.Drawing.Imaging.ImageFormat format = null; - switch (outputFormat) - { - case OutputImageFormat.Default: - throw new NotSupportedException(); - case OutputImageFormat.Jpeg: - format = System.Drawing.Imaging.ImageFormat.Jpeg; - break; - case OutputImageFormat.Png: - format = System.Drawing.Imaging.ImageFormat.Png; - break; - } - bmp.Save(filename, format); + SaveImage(bitmap, output, outputFormat, saveParameters); + output.Flush(); } + } } } \ No newline at end of file diff --git a/src/PixelFarm/PixelFarm.Drawing.GdiPlus_SH/Painter/GdiPlusRenderVx.cs b/src/PixelFarm/PixelFarm.Drawing.GdiPlus_SH/Painter/GdiPlusRenderVx.cs index ac6438669..462f7777a 100644 --- a/src/PixelFarm/PixelFarm.Drawing.GdiPlus_SH/Painter/GdiPlusRenderVx.cs +++ b/src/PixelFarm/PixelFarm.Drawing.GdiPlus_SH/Painter/GdiPlusRenderVx.cs @@ -19,6 +19,7 @@ public WinGdiRenderVxFormattedString(char[] buffer) { _buffer = buffer; } + public override int StripCount => throw new System.NotImplementedException(); public char[] InternalBuffer => _buffer; #if DEBUG public override string dbugName => "WinGdi"; diff --git a/src/PixelFarm/PixelFarm.Drawing.GdiPlus_SH/Painter/NativeTextWin32.cs b/src/PixelFarm/PixelFarm.Drawing.GdiPlus_SH/Painter/NativeTextWin32.cs index 97a653bb9..4f8cef1fa 100644 --- a/src/PixelFarm/PixelFarm.Drawing.GdiPlus_SH/Painter/NativeTextWin32.cs +++ b/src/PixelFarm/PixelFarm.Drawing.GdiPlus_SH/Painter/NativeTextWin32.cs @@ -179,9 +179,10 @@ public static void CalculateGlyphAdvancePos(in TextBufferSpan textBufferSpan, byte[] encoding = s_en.GetBytes( - textBufferSpan.GetRawCharBuffer(), + textBufferSpan.GetRawUtf16Buffer(), textBufferSpan.start, len); + NativeTextWin32.FontABC[] abcWidths = winfont.GetInteralABCArray(); int totalW = 0; for (int i = 0; i < len; ++i) @@ -368,11 +369,13 @@ public float MeasureWhitespace(RequestFont f) } public PixelFarm.Drawing.Size MeasureString(in TextBufferSpan textBufferSpan, RequestFont font) { - return WinGdiTextService.MeasureString(textBufferSpan.GetRawCharBuffer(), textBufferSpan.start, textBufferSpan.len, font); + //TODO: review here*** + return WinGdiTextService.MeasureString(textBufferSpan.GetRawUtf16Buffer(), textBufferSpan.start, textBufferSpan.len, font); } public void MeasureString(in TextBufferSpan textBufferSpan, RequestFont font, int maxWidth, out int charFit, out int charFitWidth) { - WinGdiTextService.MeasureString(textBufferSpan.GetRawCharBuffer(), textBufferSpan.start, textBufferSpan.len, font, maxWidth, out charFit, out charFitWidth); + //TODO: review here*** + WinGdiTextService.MeasureString(textBufferSpan.GetRawUtf16Buffer(), textBufferSpan.start, textBufferSpan.len, font, maxWidth, out charFit, out charFitWidth); } public void CalculateUserCharGlyphAdvancePos(in TextBufferSpan textBufferSpan, @@ -384,11 +387,7 @@ public void CalculateUserCharGlyphAdvancePos(in TextBufferSpan textBufferSpan, public float MeasureBlankLineHeight(RequestFont f) => WinGdiTextService.MeasureBlankLineHeight(f); - public ILineSegmentList BreakToLineSegments(in TextBufferSpan textBufferSpan) - { - return null; - throw new NotImplementedException(); - } + public void CalculateUserCharGlyphAdvancePos(in TextBufferSpan textBufferSpan, ILineSegmentList lineSegs, RequestFont font, diff --git a/src/PixelFarm/PixelFarm.Drawing.GdiPlus_SH/RenderSurface/GdiPlusRenderSurface.cs b/src/PixelFarm/PixelFarm.Drawing.GdiPlus_SH/RenderSurface/GdiPlusRenderSurface.cs index 87cc3da4a..9a9b007f6 100644 --- a/src/PixelFarm/PixelFarm.Drawing.GdiPlus_SH/RenderSurface/GdiPlusRenderSurface.cs +++ b/src/PixelFarm/PixelFarm.Drawing.GdiPlus_SH/RenderSurface/GdiPlusRenderSurface.cs @@ -18,6 +18,7 @@ using Typography.TextBreak; using Typography.Text; using Win32; +using PixelFarm.CpuBlit; namespace PixelFarm.Drawing.WinGdi { @@ -1200,6 +1201,9 @@ public void MeasureString(char[] buffer, int startAt, int len, out int w, out in _rendersx.MeasureString(buffer, startAt, len, new Rectangle(), out w, out h); } - + public void PrepareStringForRenderVx(AggRenderVxFormattedString renderVx, IFormattedGlyphPlanList fmtGlyphPlans) + { + throw new NotImplementedException(); + } } } \ No newline at end of file diff --git a/src/PixelFarm/PixelFarm.Drawing/2_AggPainter/AggPainter.cs b/src/PixelFarm/PixelFarm.Drawing/2_AggPainter/AggPainter.cs index 029e1d4e7..a44e5df9b 100644 --- a/src/PixelFarm/PixelFarm.Drawing/2_AggPainter/AggPainter.cs +++ b/src/PixelFarm/PixelFarm.Drawing/2_AggPainter/AggPainter.cs @@ -121,6 +121,7 @@ public override ICoordTransformer CoordTransformer public override float OriginX => _aggsx.ScanlineRasOriginX; public override float OriginY => _aggsx.ScanlineRasOriginY; public override void Clear(Color color) => _aggsx.Clear(color); + public void Clear(Color color, int left, int top, int width, int height) => _aggsx.Clear(color, left, top, width, height); public override void SetOrigin(float x, float y) => _aggsx.SetScanlineRasOrigin(x, y); public override RenderQuality RenderQuality { get; set; } diff --git a/src/PixelFarm/PixelFarm.Drawing/2_AggPainter/AggPainter_FontAndText.cs b/src/PixelFarm/PixelFarm.Drawing/2_AggPainter/AggPainter_FontAndText.cs index e49b9bbc8..02625d1ea 100644 --- a/src/PixelFarm/PixelFarm.Drawing/2_AggPainter/AggPainter_FontAndText.cs +++ b/src/PixelFarm/PixelFarm.Drawing/2_AggPainter/AggPainter_FontAndText.cs @@ -15,6 +15,7 @@ public interface IAggTextPrinter /// void DrawString(AggRenderVxFormattedString renderVx, double left, double top); void PrepareStringForRenderVx(AggRenderVxFormattedString renderVx, char[] text, int startAt, int len); + void PrepareStringForRenderVx(AggRenderVxFormattedString renderVx, IFormattedGlyphPlanList fmtGlyphPlans); int CurrentLineSpaceHeight { get; } void ChangeFont(RequestFont font); void ChangeFillColor(Color fillColor); @@ -81,24 +82,58 @@ public override void DrawString( char[] buffer = text.ToCharArray(); _textPrinter.DrawString(buffer, 0, buffer.Length, x, this.Height - y); } - } } public override void DrawString(RenderVxFormattedString renderVx, double left, double top) { //draw string from render vx + AggRenderVxFormattedString aggVxString = (AggRenderVxFormattedString)renderVx; + if (aggVxString.IsDelay) + { + //check state is string is ready or not + if (aggVxString.State == RenderVxFormattedString.VxState.NoStrip) + { + //parse the string content - _textPrinter?.DrawString((AggRenderVxFormattedString)renderVx, left, top); + } + } + _textPrinter?.DrawString(aggVxString, left, top); + } + + public RenderVxFormattedString CreateRenderVx(string text, bool delay) + { + if (delay) + { + var renderVxFmtStr = new AggRenderVxFormattedString(); + if (_textPrinter != null) + { + renderVxFmtStr.IsDelay = true; + renderVxFmtStr.DelayString = text; + } + return renderVxFmtStr; + } + else + { + return CreateRenderVx(text); + } } public override RenderVxFormattedString CreateRenderVx(string textspan) { - var renderVxFmtStr = new AggRenderVxFormattedString(); if (_textPrinter != null) { char[] buffer = textspan.ToCharArray(); + //prepare string from current printer setting _textPrinter.PrepareStringForRenderVx(renderVxFmtStr, buffer, 0, buffer.Length); - + } + return renderVxFmtStr; + } + public override RenderVxFormattedString CreateRenderVx(IFormattedGlyphPlanList formattedGlyphPlans) + { + var renderVxFmtStr = new AggRenderVxFormattedString(); + if (_textPrinter != null) + { + _textPrinter.PrepareStringForRenderVx(renderVxFmtStr, formattedGlyphPlans); } return renderVxFmtStr; } diff --git a/src/PixelFarm/PixelFarm.Drawing/2_AggPainter/AggPainter_Imgs.cs b/src/PixelFarm/PixelFarm.Drawing/2_AggPainter/AggPainter_Imgs.cs index 279841a28..a59198df5 100644 --- a/src/PixelFarm/PixelFarm.Drawing/2_AggPainter/AggPainter_Imgs.cs +++ b/src/PixelFarm/PixelFarm.Drawing/2_AggPainter/AggPainter_Imgs.cs @@ -39,6 +39,7 @@ void DrawBitmap(MemBitmap memBmp, double left, double top) this.UseLcdEffectSubPixelRendering = useSubPix; _aggsx.UseSubPixelLcdEffect = useSubPix; } + void DrawBitmap(MemBitmap memBmp, double left, double top, int srcX, int srcY, int srcW, int srcH) { @@ -97,7 +98,7 @@ public override void DrawImage(Image img) //------------------------------- bool useSubPix = UseLcdEffectSubPixelRendering; //save, restore later... - //before render an image we turn off vxs subpixel rendering + //before render an image we turn off vxs subpixel rendering this.UseLcdEffectSubPixelRendering = false; _aggsx.Render(memBmp); @@ -113,7 +114,7 @@ public override void DrawImage(Image img, in AffineMat aff) } bool useSubPix = UseLcdEffectSubPixelRendering; //save, restore later... - //before render an image we turn off vxs subpixel rendering + //before render an image we turn off vxs subpixel rendering this.UseLcdEffectSubPixelRendering = false; _aggsx.Render(memBmp, aff); @@ -132,7 +133,7 @@ public override void DrawImage(Image img, double left, double top, ICoordTransfo } bool useSubPix = UseLcdEffectSubPixelRendering; //save, restore later... - //before render an image we turn off vxs subpixel rendering + //before render an image we turn off vxs subpixel rendering this.UseLcdEffectSubPixelRendering = false; if (coordTx is Affine aff) diff --git a/src/PixelFarm/PixelFarm.Drawing/2_AggPainter/AggPainter_MaskAndClipping.cs b/src/PixelFarm/PixelFarm.Drawing/2_AggPainter/AggPainter_MaskAndClipping.cs index 418f791b5..71ede02da 100644 --- a/src/PixelFarm/PixelFarm.Drawing/2_AggPainter/AggPainter_MaskAndClipping.cs +++ b/src/PixelFarm/PixelFarm.Drawing/2_AggPainter/AggPainter_MaskAndClipping.cs @@ -22,6 +22,27 @@ partial class AggPainter PixelBlenderPerColorComponentWithMask _maskPixelBlenderPerCompo; ClipingTechnique _currentClipTech; + void ClearClipRgn() + { + //remove clip rgn if exists** + switch (_currentClipTech) + { + case ClipingTechnique.ClipMask: + this.EnableBuiltInMaskComposite = false; + this.TargetBufferName = TargetBufferName.AlphaMask;//swicth to mask buffer + this.Clear(Color.Black); + this.TargetBufferName = TargetBufferName.Default; + + break; + case ClipingTechnique.ClipSimpleRect: + + this.SetClipBox(0, 0, this.Width, this.Height); + break; + } + + _currentClipTech = ClipingTechnique.None; + } + /// /// we DO NOT store vxs /// @@ -69,23 +90,7 @@ public override void SetClipRgn(VertexStore vxs) } else { - //remove clip rgn if exists** - switch (_currentClipTech) - { - case ClipingTechnique.ClipMask: - this.EnableBuiltInMaskComposite = false; - this.TargetBufferName = TargetBufferName.AlphaMask;//swicth to mask buffer - this.Clear(Color.Black); - this.TargetBufferName = TargetBufferName.Default; - - break; - case ClipingTechnique.ClipSimpleRect: - - this.SetClipBox(0, 0, this.Width, this.Height); - break; - } - - _currentClipTech = ClipingTechnique.None; + ClearClipRgn(); } } public override Rectangle ClipBox @@ -265,7 +270,7 @@ public override void DrawRegion(Region rgn) public override void FillRegion(VertexStore vxs) { - + this.SetClipRgn(vxs); diff --git a/src/PixelFarm/PixelFarm.Drawing/2_AggPainter/AggRenderSurface.cs b/src/PixelFarm/PixelFarm.Drawing/2_AggPainter/AggRenderSurface.cs index f6091035e..0618b130e 100644 --- a/src/PixelFarm/PixelFarm.Drawing/2_AggPainter/AggRenderSurface.cs +++ b/src/PixelFarm/PixelFarm.Drawing/2_AggPainter/AggRenderSurface.cs @@ -145,7 +145,15 @@ public PixelFarm.CpuBlit.FragmentProcessing.ImgSpanGen CustomImgSpanGen } public ImageInterpolationQuality ImageInterpolationQuality { get; set; } + public void Clear(Color color, int left, int top, int width, int height) + { + BitmapBlenderBase destImage = this.DestBitmapBlender; +#if DEBUG + if (destImage.BitDepth != 32) throw new NotSupportedException(); +#endif + MemBitmapExt.Clear(destImage.GetBufferPtr(), color, left, top, width, height); + } public void Clear(Color color) { @@ -154,103 +162,7 @@ public void Clear(Color color) if (destImage.BitDepth != 32) throw new NotSupportedException(); #endif - MemBitmapExt.Clear(destImage.GetBufferPtr(), color); - - //unsafe - //{ - // int* buffer = (int*)tmp.Ptr; - // int len32 = tmp.LengthInBytes / 4; - - // switch (destImage.BitDepth) - // { - // default: throw new NotSupportedException(); - // case 32: - // { - // //------------------------------ - // //fast clear buffer - // //skip clipping **** - // //TODO: reimplement clipping*** - // //------------------------------ - // if (color == Color.White) - // { - // //fast cleat with white color - // int n = len32; - // unsafe - // { - // //fixed (void* head = &buffer[0]) - // { - // uint* head_i32 = (uint*)buffer; - // for (int i = n - 1; i >= 0; --i) - // { - // *head_i32 = 0xffffffff; //white (ARGB) - // head_i32++; - // } - // } - // } - // } - // else if (color == Color.Black) - // { - // //fast clear with black color - // int n = len32; - // unsafe - // { - // //fixed (void* head = &buffer[0]) - // { - // uint* head_i32 = (uint*)buffer; - // for (int i = n - 1; i >= 0; --i) - // { - // *head_i32 = 0xff000000; //black (ARGB) - // head_i32++; - // } - // } - // } - // } - // else if (color == Color.Empty) - // { - // int n = len32; - // unsafe - // { - // //fixed (void* head = &buffer[0]) - // { - // uint* head_i32 = (uint*)buffer; - // for (int i = n - 1; i >= 0; --i) - // { - // *head_i32 = 0x00000000; //empty - // head_i32++; - // } - // } - // } - // } - // else - // { - // //other color - // //#if WIN32 - // // uint colorARGB = (uint)((color.alpha << 24) | ((color.red << 16) | (color.green << 8) | color.blue)); - // //#else - // // uint colorARGB = (uint)((color.alpha << 24) | ((color.blue << 16) | (color.green << 8) | color.red)); - // //#endif - - // //ARGB - // uint colorARGB = (uint)((color.alpha << CO.A_SHIFT) | ((color.red << CO.R_SHIFT) | (color.green << CO.G_SHIFT) | color.blue << CO.B_SHIFT)); - // int n = len32; - // unsafe - // { - // //fixed (void* head = &buffer[0]) - // { - // uint* head_i32 = (uint*)buffer; - // for (int i = n - 1; i >= 0; --i) - // { - // *head_i32 = colorARGB; - // head_i32++; - // } - // } - // } - // } - // } - // break; - // } - //} - + MemBitmapExt.Clear(destImage.GetBufferPtr(), color, destImage.Width, destImage.Height); } diff --git a/src/PixelFarm/PixelFarm.Drawing/2_AggPainter/AggRenderVx.cs b/src/PixelFarm/PixelFarm.Drawing/2_AggPainter/AggRenderVx.cs index 362803905..16889448e 100644 --- a/src/PixelFarm/PixelFarm.Drawing/2_AggPainter/AggRenderVx.cs +++ b/src/PixelFarm/PixelFarm.Drawing/2_AggPainter/AggRenderVx.cs @@ -14,12 +14,16 @@ public AggRenderVx(VertexStore vxs) } } + public class AggRenderVxFormattedString : RenderVxFormattedString { internal AggRenderVxFormattedString() { } - public RenderVxGlyphPlan[] GlyphList { get; set; } + public object Seq { get; set; } + public override int StripCount => throw new System.NotImplementedException(); + public string DelayString { get; internal set; } + public bool IsDelay { get; internal set; } #if DEBUG public string OriginalString { get; set; } public override string dbugName => "Agg"; diff --git a/src/PixelFarm/PixelFarm.Drawing/3_VertexProcessoring/LineDashGenerator.cs b/src/PixelFarm/PixelFarm.Drawing/3_VertexProcessoring/LineDashGenerator.cs index dfee34540..5b575bc07 100644 --- a/src/PixelFarm/PixelFarm.Drawing/3_VertexProcessoring/LineDashGenerator.cs +++ b/src/PixelFarm/PixelFarm.Drawing/3_VertexProcessoring/LineDashGenerator.cs @@ -32,6 +32,7 @@ public void SetOutput(VertexStore vsx) public void AddMoveTo(LineWalkerMark maker, double x, double y) => _vxs.AddMoveTo(x, y); } + public class LineDashGenerator : IDashGenerator { LineWalker _dashGenLineWalker = new LineWalker(); @@ -43,8 +44,6 @@ public LineDashGenerator() { } - - public void SetDashPattern(DashSegment[] segments) { IsStaticPattern = true; @@ -71,7 +70,11 @@ public void SetDashPattern(LineWalker lineWalker) public DashSegment[] GetStaticDashSegments() => _staicDashSegments; public bool IsStaticPattern { get; set; } - + public ushort LineJoinRadius + { + get => _dashGenLineWalker.LineJoinRadius; + set => _dashGenLineWalker.LineJoinRadius = value; + } public string GetPatternAsString() { if (IsStaticPattern) @@ -91,22 +94,23 @@ public string GetPatternAsString() return null; } - public void GenerateDash(VertexStore srcVxs, ILineSegmentWalkerOutput output) + public void CreateDash(VertexStore srcVxs, ILineSegmentWalkerOutput output) { if (_dashGenLineWalker == null) { return; } + _dashGenLineWalker.Walk(srcVxs, output); } public void CreateDash(VertexStore srcVxs, VertexStore output) { _output.SetOutput(output); - GenerateDash(srcVxs, _output); + CreateDash(srcVxs, _output); } - } + public static class LineDashGeneratorExtension { public static void SetDashPattern(this LineDashGenerator generator, float solid, float blank) diff --git a/src/PixelFarm/PixelFarm.Drawing/5_PathReconstruction/FloodFill.cs b/src/PixelFarm/PixelFarm.Drawing/5_PathReconstruction/FloodFill.cs index c77fff930..eca3e1843 100644 --- a/src/PixelFarm/PixelFarm.Drawing/5_PathReconstruction/FloodFill.cs +++ b/src/PixelFarm/PixelFarm.Drawing/5_PathReconstruction/FloodFill.cs @@ -115,9 +115,9 @@ public override string ToString() sealed class FloodFillRunner { bool[] _pixelsChecked; - SimpleQueue _hspanQueue = new SimpleQueue(9); - List _upperSpans = new List(); - List _lowerSpans = new List(); + readonly SimpleQueue _hspanQueue = new SimpleQueue(9); + readonly List _upperSpans = new List(); + readonly List _lowerSpans = new List(); int _yCutAt; IPixelEvaluator _pixelEvalutor; public HSpan[] InternalFill(IPixelEvaluator pixelEvalutor, int x, int y, bool collectHSpans) diff --git a/src/PixelFarm/PixelFarm.Drawing/5_PathReconstruction/OutlineTracer.cs b/src/PixelFarm/PixelFarm.Drawing/5_PathReconstruction/OutlineTracer.cs index ff490424c..7e8e2357c 100644 --- a/src/PixelFarm/PixelFarm.Drawing/5_PathReconstruction/OutlineTracer.cs +++ b/src/PixelFarm/PixelFarm.Drawing/5_PathReconstruction/OutlineTracer.cs @@ -250,7 +250,7 @@ enum ReadSide : byte Right = 1 << 1,//2 LeftAndRight = Left | Right //3 } - struct Remaining + readonly struct Remaining { public readonly HSpanColumn column; public readonly ReadSide unreadSide; @@ -780,7 +780,7 @@ void TraceOutline(HSpan[] sortedHSpans, RawOutline output) List incompleteReadList = new List(); TraceOutlineCcw(new Remaining(_verticalGroupList.GetGroup(0).GetColumn(0), ReadSide.Left), output, true); - TRACE_AGAIN://** + TRACE_AGAIN://** //check if the shape have hole(s) _verticalGroupList.CollectIncompleteColumns(incompleteReadList); diff --git a/src/PixelFarm/PixelFarm.Drawing/7_BitmapAtlas/BitmapAtlasFile.cs b/src/PixelFarm/PixelFarm.Drawing/7_BitmapAtlas/BitmapAtlasFile.cs index d75594dfa..e66a64bad 100644 --- a/src/PixelFarm/PixelFarm.Drawing/7_BitmapAtlas/BitmapAtlasFile.cs +++ b/src/PixelFarm/PixelFarm.Drawing/7_BitmapAtlas/BitmapAtlasFile.cs @@ -48,6 +48,7 @@ public void Read(Stream inputStream) switch (objKind) { default: throw new NotSupportedException(); + case ObjectKind.OverviewMultiSizeFontInfo: listCount = reader.ReadUInt16(); break; diff --git a/src/PixelFarm/PixelFarm.Drawing/7_BitmapAtlas/SimpleBitmapAtlasBuilder.cs b/src/PixelFarm/PixelFarm.Drawing/7_BitmapAtlas/SimpleBitmapAtlasBuilder.cs index d2468af40..19eb8f897 100644 --- a/src/PixelFarm/PixelFarm.Drawing/7_BitmapAtlas/SimpleBitmapAtlasBuilder.cs +++ b/src/PixelFarm/PixelFarm.Drawing/7_BitmapAtlas/SimpleBitmapAtlasBuilder.cs @@ -92,20 +92,20 @@ public MemBitmap BuildSingleImage(bool flipY) //3. layout for (int i = itemList.Count - 1; i >= 0; --i) { - BitmapAtlasItemSource g = itemList[i]; - if (g.Height > maxRowHeight) + BitmapAtlasItemSource itm = itemList[i]; + if (itm.Height > maxRowHeight) { - maxRowHeight = g.Height; + maxRowHeight = itm.Height; } - if (currentX + g.Width > totalMaxLim) + if (currentX + itm.Width > totalMaxLim) { //start new row currentY += maxRowHeight; currentX = 0; } //------------------- - g.Area = new Rectangle(currentX, currentY, g.Width, g.Height); - currentX += g.Width; + itm.Area = new Rectangle(currentX, currentY, itm.Width, itm.Height); + currentX += itm.Width; } } @@ -116,24 +116,24 @@ public MemBitmap BuildSingleImage(bool flipY) itemList.Sort((a, b) => a.Height.CompareTo(b.Height)); //3. layout - int glyphCount = itemList.Count; - for (int i = 0; i < glyphCount; ++i) + int count = itemList.Count; + for (int i = 0; i < count; ++i) { - BitmapAtlasItemSource g = itemList[i]; - if (g.Height > maxRowHeight) + BitmapAtlasItemSource itm = itemList[i]; + if (itm.Height > maxRowHeight) { - maxRowHeight = g.Height; + maxRowHeight = itm.Height; } - if (currentX + g.Width > totalMaxLim) + if (currentX + itm.Width > totalMaxLim) { //start new row currentY += maxRowHeight; currentX = 0; - maxRowHeight = g.Height;//reset, after start new row + maxRowHeight = itm.Height;//reset, after start new row } //------------------- - g.Area = new Rectangle(currentX, currentY, g.Width, g.Height); - currentX += g.Width; + itm.Area = new Rectangle(currentX, currentY, itm.Width, itm.Height); + currentX += itm.Width; } } diff --git a/src/PixelFarm/PixelFarm.DrawingGL_SH/GLShader/ShaderBase.cs b/src/PixelFarm/PixelFarm.DrawingGL_SH/GLShader/ShaderBase.cs index a540901f1..c67068bb1 100644 --- a/src/PixelFarm/PixelFarm.DrawingGL_SH/GLShader/ShaderBase.cs +++ b/src/PixelFarm/PixelFarm.DrawingGL_SH/GLShader/ShaderBase.cs @@ -13,8 +13,8 @@ public ShaderBase(ShaderSharedResource shareRes) _shareRes = shareRes; _shaderProgram = new MiniShaderProgram(); - EnableProgramBinaryCache = false; //force - //EnableProgramBinaryCache = CachedBinaryShaderIO.HasBinCacheImpl; + //EnableProgramBinaryCache = true; //force + EnableProgramBinaryCache = CachedBinaryShaderIO.HasBinCacheImpl; } /// /// set as current shader diff --git a/src/PixelFarm/PixelFarm.DrawingGL_SH/GLShader/SimpleRectTextureShader.cs b/src/PixelFarm/PixelFarm.DrawingGL_SH/GLShader/SimpleRectTextureShader.cs index 26cde154e..41143f8e6 100644 --- a/src/PixelFarm/PixelFarm.DrawingGL_SH/GLShader/SimpleRectTextureShader.cs +++ b/src/PixelFarm/PixelFarm.DrawingGL_SH/GLShader/SimpleRectTextureShader.cs @@ -1,6 +1,8 @@ //MIT, 2016-present, WinterDev using OpenTK.Graphics.ES20; +using System; + namespace PixelFarm.DrawingGL { abstract class SimpleRectTextureShader : ColorFillShaderBase @@ -119,8 +121,9 @@ internal unsafe void UnsafeDrawSubImages(float* srcDestList, int arrLen, float s public void DrawWithVBO(TextureCoordVboBuilder vboBuilder) { - float[] vboList = vboBuilder._buffer.UnsafeInternalArray; - ushort[] indexList = vboBuilder._indexList.UnsafeInternalArray; + + CpuBlit.ArrayListSegment vertexListSpan = vboBuilder.CreateVertextListSpan(); + CpuBlit.ArrayListSegment indexListSpan = vboBuilder.CreateIndexListSpan(); SetCurrent(); CheckViewMatrix(); @@ -128,13 +131,20 @@ public void DrawWithVBO(TextureCoordVboBuilder vboBuilder) //------------------------------------------------------------------------------------- unsafe { - fixed (float* imgVertices = &vboList[0]) + CpuBlit.ArrayListSegment.UnsafeGetInternalArr(vertexListSpan, out float[] vertexArr); + CpuBlit.ArrayListSegment.UnsafeGetInternalArr(indexListSpan, out ushort[] indexArr); + + fixed (float* imgVertices = &vertexArr[vertexListSpan.beginAt]) { a_position.UnsafeLoadMixedV3f(imgVertices, 5); a_texCoord.UnsafeLoadMixedV2f(imgVertices + 3, 5); } + fixed (ushort* indexVertices = &indexArr[indexListSpan.beginAt]) + { + GL.DrawElements(PrimitiveType.TriangleStrip, indexListSpan.len, DrawElementsType.UnsignedShort, (IntPtr)indexVertices); + } } - GL.DrawElements(BeginMode.TriangleStrip, vboBuilder._indexList.Count, DrawElementsType.UnsignedShort, indexList); + } public void Render(GLBitmap bmp, float left, float top, float w, float h) @@ -1032,11 +1042,14 @@ public void DrawSubImages(GLBitmap glBmp, VertexBufferObject vbo, int elemCount, /// public void DrawSubImages(GLBitmap glBmp, TextureCoordVboBuilder vboBuilder) { - if (vboBuilder._buffer.Length == 0) { return; } + CpuBlit.ArrayListSegment vertextListSpan = vboBuilder.CreateVertextListSpan(); + + if (vertextListSpan.Count == 0) { return; } + + CpuBlit.ArrayListSegment indexListSpan = vboBuilder.CreateIndexListSpan(); SetCurrent(); CheckViewMatrix(); - LoadGLBitmap(glBmp); if (_hasSomeOffset) @@ -1047,40 +1060,45 @@ public void DrawSubImages(GLBitmap glBmp, TextureCoordVboBuilder vboBuilder) // ------------------------------------------------------------------------------------- unsafe { - float[] vboList = vboBuilder._buffer.UnsafeInternalArray; //*** - fixed (float* imgVertices = &vboList[0]) + CpuBlit.ArrayListSegment.UnsafeGetInternalArr(vertextListSpan, out float[] v_arr); + CpuBlit.ArrayListSegment.UnsafeGetInternalArr(indexListSpan, out ushort[] i_arr); + + fixed (float* imgVertices = &v_arr[vertextListSpan.beginAt]) { a_position.UnsafeLoadMixedV3f(imgVertices, 5); a_texCoord.UnsafeLoadMixedV2f(imgVertices + 3, 5); } - } - //SHARED ARRAY - ushort[] indexList = vboBuilder._indexList.UnsafeInternalArray; //*** - int count1 = vboBuilder._indexList.Count; //*** + //SHARED ARRAY #if DEBUG - System.Diagnostics.Debug.WriteLine("lcd3steps:"); + System.Diagnostics.Debug.WriteLine("lcd3steps:"); #endif - //version 1 - //0. B , yellow result - GL.ColorMask(false, false, true, false); - SetCompo(ColorCompo.C0); - GL.DrawElements(BeginMode.TriangleStrip, count1, DrawElementsType.UnsignedShort, indexList); + fixed (ushort* indexArrPtr = &i_arr[indexListSpan.beginAt]) + { + //version 1 + //0. B , yellow result + GL.ColorMask(false, false, true, false); + SetCompo(ColorCompo.C0); - //1. G , magenta result - GL.ColorMask(false, true, false, false); - SetCompo(ColorCompo.C1); - GL.DrawElements(BeginMode.TriangleStrip, count1, DrawElementsType.UnsignedShort, indexList); + GL.DrawElements(PrimitiveType.TriangleStrip, indexListSpan.len, DrawElementsType.UnsignedShort, (IntPtr)indexArrPtr); - //2. R , cyan result - GL.ColorMask(true, false, false, false);// - SetCompo(ColorCompo.C2); - GL.DrawElements(BeginMode.TriangleStrip, count1, DrawElementsType.UnsignedShort, indexList); + //1. G , magenta result + GL.ColorMask(false, true, false, false); + SetCompo(ColorCompo.C1); + GL.DrawElements(PrimitiveType.TriangleStrip, indexListSpan.len, DrawElementsType.UnsignedShort, (IntPtr)indexArrPtr); - //restore - GL.ColorMask(true, true, true, true); + //2. R , cyan result + GL.ColorMask(true, false, false, false);// + SetCompo(ColorCompo.C2); + GL.DrawElements(PrimitiveType.TriangleStrip, indexListSpan.len, DrawElementsType.UnsignedShort, (IntPtr)indexArrPtr); + + //restore + GL.ColorMask(true, true, true, true); + } + + } } public void DrawSubImage(float srcLeft, float srcTop, float srcW, float srcH, float targetLeft, float targetTop) @@ -1185,7 +1203,6 @@ public void DrawSubImagesNoLcdEffect(GLBitmap glBmp, VertexBufferObject vbo, int GL.DrawElements(BeginMode.TriangleStrip, elemCount, DrawElementsType.UnsignedShort, 0); vbo.UnBind(); - } } diff --git a/src/PixelFarm/PixelFarm.DrawingGL_SH/GLTexture/FrameBuffer.cs b/src/PixelFarm/PixelFarm.DrawingGL_SH/GLTexture/FrameBuffer.cs index 8d31644d6..52934d744 100644 --- a/src/PixelFarm/PixelFarm.DrawingGL_SH/GLTexture/FrameBuffer.cs +++ b/src/PixelFarm/PixelFarm.DrawingGL_SH/GLTexture/FrameBuffer.cs @@ -11,10 +11,10 @@ class Framebuffer : IDisposable int _frameBufferId; int _renderBufferId; - int _width; - int _height; + readonly int _width; + readonly int _height; + readonly bool _isBmpOwner; GLBitmap _glBmp; - bool _isBmpOwner; public Framebuffer(GLBitmap glBmp, bool isBmpOwner) { diff --git a/src/PixelFarm/PixelFarm.DrawingGL_SH/RenderSuface/GLRenderSurface.cs b/src/PixelFarm/PixelFarm.DrawingGL_SH/RenderSuface/GLRenderSurface.cs index e349f5127..5ea1b03fd 100644 --- a/src/PixelFarm/PixelFarm.DrawingGL_SH/RenderSuface/GLRenderSurface.cs +++ b/src/PixelFarm/PixelFarm.DrawingGL_SH/RenderSuface/GLRenderSurface.cs @@ -77,7 +77,7 @@ public void Dispose() public bool IsPrimary { get; } public bool IsValid { get; private set; } - public GLBitmap GetGLBitmap() => (_frameBuffer == null) ? null : _frameBuffer.GetGLBitmap(); + public GLBitmap GetGLBitmap() => _frameBuffer?.GetGLBitmap(); public InnerGLData GetInnerGLData() => (_frameBuffer != null) ? new InnerGLData(_frameBuffer.FrameBufferId, _frameBuffer.GetGLBitmap()) : new InnerGLData(); @@ -326,6 +326,7 @@ public void AttachToRenderSurface(GLRenderSurface rendersx, bool updateTextureRe _shareRes.SetOrthoViewOffset(0, 0); rendersx.SetAsCurrentSurface(); SetCanvasOrigin(0, 0);//reset + //TODO: width, height? SetClipRect(0, 0, rendersx.Height, rendersx.Height); } @@ -424,6 +425,7 @@ internal GLBitmap ResolveForGLBitmap(Image image) return glBmp; } //2. + glBmp = Image.GetCacheInnerImage(image) as GLBitmap; if (glBmp != null) { @@ -462,9 +464,9 @@ public unsafe void CopyPixels(int x, int y, int w, int h, IntPtr outputBuffer) // PixelType.UnsignedByte, // outputBuffer); GL.ReadPixels(x, y, w, h, - OpenTK.Graphics.ES20.PixelFormat.Rgba, - PixelType.UnsignedByte, - outputBuffer); + OpenTK.Graphics.ES20.PixelFormat.Rgba, + PixelType.UnsignedByte, + outputBuffer); } // @@ -586,6 +588,9 @@ public void DrawSubImage(GLBitmap bmp, float srcLeft, float srcTop, float srcW, switch (bmp.BitmapFormat) { default: throw new NotSupportedException(); + case BitmapBufferFormat.RGBO: + _rgbTextureShader.DrawSubImage(bmp, srcLeft, srcTop, srcW, srcH, targetLeft, targetTop); + break; case BitmapBufferFormat.RGBA: _rgbaTextureShader.DrawSubImage(bmp, srcLeft, srcTop, srcW, srcH, targetLeft, targetTop); break; @@ -1851,16 +1856,31 @@ public class TextureCoordVboBuilder int _orgBmpW; int _orgBmpH; bool _bmpYFlipped; - RenderSurfaceOriginKind _pcxOrgKind; - internal PixelFarm.CpuBlit.ArrayList _buffer = new CpuBlit.ArrayList(); - internal PixelFarm.CpuBlit.ArrayList _indexList = new CpuBlit.ArrayList(); + ArrayList _vertexList; + ArrayList _indexList; + + int _v_startIndex; + int _i_startIndex; + + ushort _indexCount = 0; public TextureCoordVboBuilder() { + } + public void SetArrayLists(ArrayList vertexList, ArrayList indexlist) + { + _v_startIndex = vertexList.Count; + _i_startIndex = indexlist.Count; + _indexCount = 0;//*** + _vertexList = vertexList; + _indexList = indexlist; } + public ArrayListSegment CreateVertextListSpan() => new ArrayListSegment(_vertexList, _v_startIndex, _vertexList.Count - _v_startIndex); + public ArrayListSegment CreateIndexListSpan() => new ArrayListSegment(_indexList, _i_startIndex, _indexList.Count - _i_startIndex); + public void SetTextureInfo(int width, int height, bool isYFlipped, RenderSurfaceOriginKind pcxOrgKind) { _orgBmpW = width; @@ -1868,11 +1888,7 @@ public void SetTextureInfo(int width, int height, bool isYFlipped, RenderSurface _bmpYFlipped = isYFlipped; _pcxOrgKind = pcxOrgKind; } - public void Clear() - { - _buffer.Clear(); - _indexList.Clear(); - } + public void WriteRect( in PixelFarm.Drawing.Rectangle srcRect, @@ -1897,42 +1913,45 @@ public void WriteRect( // https://developer.apple.com/library/content/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/TechniquesforWorkingwithVertexData/TechniquesforWorkingwithVertexData.html - ushort indexCount = (ushort)_indexList.Count; + //ushort indexCount = (ushort)_indexList.Count; - if (indexCount > 0) + ArrayList vertexLst = _vertexList; + ArrayList indxLst = _indexList; + if (_indexCount > 0) { - //add degenerative triangle - int buff_count = _buffer.Count; - float prev_5 = _buffer[buff_count - 5]; - float prev_4 = _buffer[buff_count - 4]; - float prev_3 = _buffer[buff_count - 3]; - float prev_2 = _buffer[buff_count - 2]; - float prev_1 = _buffer[buff_count - 1]; + //add degenerative triangle + int buff_count = vertexLst.Count; + float prev_5 = vertexLst[buff_count - 5]; + float prev_4 = vertexLst[buff_count - 4]; + float prev_3 = vertexLst[buff_count - 3]; + float prev_2 = vertexLst[buff_count - 2]; + float prev_1 = vertexLst[buff_count - 1]; - _buffer.Append(prev_5); _buffer.Append(prev_4); _buffer.Append(prev_3); - _buffer.Append(prev_2); _buffer.Append(prev_1); + vertexLst.Append(prev_5); vertexLst.Append(prev_4); vertexLst.Append(prev_3); + vertexLst.Append(prev_2); vertexLst.Append(prev_1); - _indexList.Append((ushort)(indexCount)); - _indexList.Append((ushort)(indexCount + 1)); + indxLst.Append((ushort)(_indexCount)); + indxLst.Append((ushort)(_indexCount + 1)); - indexCount += 2; + _indexCount += 2; } //--------- RectangleF normalizedSrc = srcRect.CreateNormalizedRect(_orgBmpW, _orgBmpH); RectangleF target = new RectangleF(targetLeft, targetTop, srcRect.Width, srcRect.Height); - WriteToVboStream(_buffer, indexCount > 0, + WriteToVboStream(vertexLst, _indexCount > 0, normalizedSrc, target, _bmpYFlipped); - _indexList.Append(indexCount); - _indexList.Append((ushort)(indexCount + 1)); - _indexList.Append((ushort)(indexCount + 2)); - _indexList.Append((ushort)(indexCount + 3)); - //--- + indxLst.Append(_indexCount); + indxLst.Append((ushort)(_indexCount + 1)); + indxLst.Append((ushort)(_indexCount + 2)); + indxLst.Append((ushort)(_indexCount + 3)); + + _indexCount += 4; } @@ -1959,27 +1978,27 @@ public void WriteRectWithRotation( // https://developer.apple.com/library/content/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/TechniquesforWorkingwithVertexData/TechniquesforWorkingwithVertexData.html - ushort indexCount = (ushort)_indexList.Count; - - if (indexCount > 0) + ArrayList vertexLst = _vertexList; + ArrayList indxLst = _indexList; + if (_indexCount > 0) { //add degenerative triangle - int buff_count = _buffer.Count; - float prev_5 = _buffer[buff_count - 5]; - float prev_4 = _buffer[buff_count - 4]; - float prev_3 = _buffer[buff_count - 3]; - float prev_2 = _buffer[buff_count - 2]; - float prev_1 = _buffer[buff_count - 1]; + int buff_count = vertexLst.Count; + float prev_5 = vertexLst[buff_count - 5]; + float prev_4 = vertexLst[buff_count - 4]; + float prev_3 = vertexLst[buff_count - 3]; + float prev_2 = vertexLst[buff_count - 2]; + float prev_1 = vertexLst[buff_count - 1]; - _buffer.Append(prev_5); _buffer.Append(prev_4); _buffer.Append(prev_3); - _buffer.Append(prev_2); _buffer.Append(prev_1); + vertexLst.Append(prev_5); vertexLst.Append(prev_4); vertexLst.Append(prev_3); + vertexLst.Append(prev_2); vertexLst.Append(prev_1); - _indexList.Append((ushort)(indexCount)); - _indexList.Append((ushort)(indexCount + 1)); + indxLst.Append((ushort)(_indexCount)); + indxLst.Append((ushort)(_indexCount + 1)); - indexCount += 2; + _indexCount += 2; } //--------- @@ -1996,38 +2015,41 @@ public void WriteRectWithRotation( RectangleF normalizedSrcRect = srcRect.CreateNormalizedRect(_orgBmpW, _orgBmpH); - WriteToVboStream(_buffer, - indexCount > 0, + WriteToVboStream(vertexLst, + _indexCount > 0, normalizedSrcRect, quad, _bmpYFlipped); - _indexList.Append(indexCount); - _indexList.Append((ushort)(indexCount + 1)); - _indexList.Append((ushort)(indexCount + 2)); - _indexList.Append((ushort)(indexCount + 3)); - //--- + indxLst.Append(_indexCount); + indxLst.Append((ushort)(_indexCount + 1)); + indxLst.Append((ushort)(_indexCount + 2)); + indxLst.Append((ushort)(_indexCount + 3)); + + _indexCount += 4; } public void AppendDegenerativeTriangle() { - ushort indexCount = (ushort)_indexList.Count; - if (indexCount > 0) + if (_indexCount > 0) { - + ArrayList vertexLst = _vertexList; + ArrayList indxLst = _indexList; //add degenerative triangle - int buff_count = _buffer.Count; - float prev_5 = _buffer[buff_count - 5]; - float prev_4 = _buffer[buff_count - 4]; - float prev_3 = _buffer[buff_count - 3]; - float prev_2 = _buffer[buff_count - 2]; - float prev_1 = _buffer[buff_count - 1]; - - _buffer.Append(prev_5); _buffer.Append(prev_4); _buffer.Append(prev_3); - _buffer.Append(prev_2); _buffer.Append(prev_1); - _indexList.Append((ushort)(indexCount)); - _indexList.Append((ushort)(indexCount + 1)); + int buff_count = vertexLst.Count; + float prev_5 = vertexLst[buff_count - 5]; + float prev_4 = vertexLst[buff_count - 4]; + float prev_3 = vertexLst[buff_count - 3]; + float prev_2 = vertexLst[buff_count - 2]; + float prev_1 = vertexLst[buff_count - 1]; + + vertexLst.Append(prev_5); vertexLst.Append(prev_4); vertexLst.Append(prev_3); + vertexLst.Append(prev_2); vertexLst.Append(prev_1); + indxLst.Append((ushort)(_indexCount)); + indxLst.Append((ushort)(_indexCount + 1)); + + _indexCount += 2; } } diff --git a/src/PixelFarm/PixelFarm.DrawingGL_SH/RenderSuface/VertexBufferObject.cs b/src/PixelFarm/PixelFarm.DrawingGL_SH/RenderSuface/VertexBufferObject.cs index 189754419..0c868602b 100644 --- a/src/PixelFarm/PixelFarm.DrawingGL_SH/RenderSuface/VertexBufferObject.cs +++ b/src/PixelFarm/PixelFarm.DrawingGL_SH/RenderSuface/VertexBufferObject.cs @@ -6,7 +6,7 @@ using System; using System.Collections.Generic; using OpenTK.Graphics.ES20; -using Tesselate; + namespace PixelFarm.DrawingGL { @@ -17,7 +17,8 @@ public class VertexBufferObject : IDisposable int _indexBufferId; // element buffer bool _hasData; - + bool _useSharedIndexBuffer; + int _sharedIndexBufferLen; #if DEBUG static Dictionary s_dbugVboCount = new Dictionary(); #endif @@ -42,7 +43,7 @@ public VertexBufferObject() { } - System.Diagnostics.Debug.WriteLine("vbo_dbugId=" + dbugId); + //System.Diagnostics.Debug.WriteLine("vbo_dbugId=" + dbugId); #endif } #if DEBUG @@ -50,29 +51,23 @@ public VertexBufferObject() static int dbugTotalId = 0; #endif - //public VertexBufferObject CreateClone() - //{ - // VertexBufferObject newclone = new VertexBufferObject(); - // newclone.CreateBuffers(_vertextBuffer, _indexBuffer); - // return newclone; - //} - //float[] _vertextBuffer; - //ushort[] _indexBuffer; /// - /// set up vertex data, we don't store the vertex array,or index array here + /// we copy data from array to mem, we don't store the vertex array,or index array here /// - public void CreateBuffers(float[] vertextBuffer, ushort[] indexBuffer) + /// + /// + /// + /// + public void CreateBuffers(float[] vertexBuffer, int vertexBufferLen, ushort[] indexBuffer, int indexBufferLen) { if (_hasData) { throw new NotSupportedException(); } - //_vertextBuffer = vertextBuffer; - //_indexBuffer = indexBuffer; - // - if (vertextBuffer != null) + + if (vertexBuffer != null) { - if (vertextBuffer.Length == 0) + if (vertexBuffer.Length == 0) { #if DEBUG @@ -89,10 +84,10 @@ public void CreateBuffers(float[] vertextBuffer, ushort[] indexBuffer) GL.BindBuffer(BufferTarget.ArrayBuffer, _vertexBufferId); unsafe { - fixed (void* vertDataPtr = &vertextBuffer[0]) + fixed (void* vertDataPtr = &vertexBuffer[0]) { GL.BufferData(BufferTarget.ArrayBuffer, - new IntPtr(vertextBuffer.Length * 4), //size in byte + new IntPtr(vertexBufferLen * 4), //size in byte new IntPtr(vertDataPtr), BufferUsage.StaticDraw); //this version we use static draw } @@ -115,7 +110,7 @@ public void CreateBuffers(float[] vertextBuffer, ushort[] indexBuffer) fixed (void* indexDataPtr = &indexBuffer[0]) { GL.BufferData(BufferTarget.ElementArrayBuffer, - new IntPtr(indexBuffer.Length * 2), + new IntPtr(indexBufferLen * 2), new IntPtr(indexDataPtr), BufferUsage.StaticDraw); //this version we use static draw } @@ -126,6 +121,138 @@ public void CreateBuffers(float[] vertextBuffer, ushort[] indexBuffer) _hasData = true; } + /// + /// set up vertex data, we don't store the vertex array,or index array here + /// + public void CreateBuffers(float[] vertexBuffer, ushort[] indexBuffer) + { + CreateBuffers( + vertexBuffer, (vertexBuffer != null) ? vertexBuffer.Length : 0, + indexBuffer, (indexBuffer != null) ? indexBuffer.Length : 0); + } + + internal void CreateBuffers(CpuBlit.ArrayListSegment vertexBuffer, int sharedIndexBufferId, int indexBufferLen) + { + if (_hasData) + { + throw new NotSupportedException(); + } + + //create only vertex buffer + CpuBlit.ArrayListSegment.UnsafeGetInternalArr(vertexBuffer, out float[] v_arr); + + if (v_arr != null) + { + if (vertexBuffer.len == 0) + { + +#if DEBUG + //this can occur, + //eg. when no glyph data + // + //System.Diagnostics.Debugger.Break(); + //System.Diagnostics.Debug.WriteLine("create_buffers?"); +#endif + return; + } + + + //1. + GL.GenBuffers(1, out _vertexBufferId); + GL.BindBuffer(BufferTarget.ArrayBuffer, _vertexBufferId); + unsafe + { + fixed (void* vertDataPtr = &v_arr[vertexBuffer.beginAt]) + { + GL.BufferData(BufferTarget.ArrayBuffer, + new IntPtr(vertexBuffer.len * 4), //size in byte + new IntPtr(vertDataPtr), + BufferUsage.StaticDraw); //this version we use static draw + } + } + // IMPORTANT: Unbind from the buffer when we're done with it. + GL.BindBuffer(BufferTarget.ArrayBuffer, 0); +#if DEBUG + //System.Diagnostics.Debug.WriteLine("vbo_create=" + _vertexBufferId); +#endif + } + //---- + //2. + + _indexBufferId = sharedIndexBufferId; + _sharedIndexBufferLen = indexBufferLen; + _useSharedIndexBuffer = sharedIndexBufferId > 0; + _hasData = true; + } + internal void CreateBuffers(CpuBlit.ArrayListSegment vertexBuffer, CpuBlit.ArrayListSegment indexBuffer) + { + if (_hasData) + { + throw new NotSupportedException(); + } + + CpuBlit.ArrayListSegment.UnsafeGetInternalArr(vertexBuffer, out float[] v_arr); + CpuBlit.ArrayListSegment.UnsafeGetInternalArr(indexBuffer, out ushort[] i_arr); + + if (v_arr != null) + { + if (vertexBuffer.len == 0) + { + +#if DEBUG + //this can occur, + //eg. when no glyph data + // + //System.Diagnostics.Debugger.Break(); + //System.Diagnostics.Debug.WriteLine("create_buffers?"); +#endif + return; + } + + + //1. + GL.GenBuffers(1, out _vertexBufferId); + GL.BindBuffer(BufferTarget.ArrayBuffer, _vertexBufferId); + unsafe + { + fixed (void* vertDataPtr = &v_arr[vertexBuffer.beginAt]) + { + GL.BufferData(BufferTarget.ArrayBuffer, + new IntPtr(vertexBuffer.len * 4), //size in byte + new IntPtr(vertDataPtr), + BufferUsage.StaticDraw); //this version we use static draw + } + } + // IMPORTANT: Unbind from the buffer when we're done with it. + GL.BindBuffer(BufferTarget.ArrayBuffer, 0); +#if DEBUG + System.Diagnostics.Debug.WriteLine("vbo_create=" + _vertexBufferId); +#endif + } + //---- + //2. + if (i_arr != null) + { + GL.GenBuffers(1, out _indexBufferId); + GL.BindBuffer(BufferTarget.ElementArrayBuffer, _indexBufferId); + unsafe + { + fixed (void* indexDataPtr = &i_arr[indexBuffer.beginAt]) + { + GL.BufferData(BufferTarget.ElementArrayBuffer, + new IntPtr(indexBuffer.len * 2), + new IntPtr(indexDataPtr), + BufferUsage.StaticDraw); //this version we use static draw + } + } + // IMPORTANT: Unbind from the buffer when we're done with it. + GL.BindBuffer(BufferTarget.ElementArrayBuffer, 0); + } + + _hasData = true; + } + + public void Dispose() { Clear(); @@ -151,9 +278,18 @@ public void Clear() } #endif - int* toDeleteBufferIndexArr = stackalloc int[] { _vertexBufferId, _indexBufferId }; + if (_useSharedIndexBuffer) + { + int* toDeleteBufferIndexArr = stackalloc int[] { _vertexBufferId }; + GL.DeleteBuffers(1, toDeleteBufferIndexArr); + } + else + { + int* toDeleteBufferIndexArr = stackalloc int[] { _vertexBufferId, _indexBufferId }; + GL.DeleteBuffers(2, toDeleteBufferIndexArr); + } - GL.DeleteBuffers(2, toDeleteBufferIndexArr); + _useSharedIndexBuffer = false; _vertexBufferId = _indexBufferId = 0; } @@ -187,5 +323,37 @@ public void UnBind() // public bool HasData => _hasData; // + + + } + + public static class SharedIndexBufferHelper + { + //helper class + // + public static int NewElementArrayBuffer(int size) + { + ushort[] indexBuffer = new ushort[size];//max size + for (ushort i = 0; i < size; ++i) + { + indexBuffer[i] = i; + } + + GL.GenBuffers(1, out int indexBufferId); + GL.BindBuffer(BufferTarget.ElementArrayBuffer, indexBufferId); + unsafe + { + fixed (void* indexDataPtr = &indexBuffer[0]) + { + GL.BufferData(BufferTarget.ElementArrayBuffer, + new IntPtr(indexBuffer.Length * 2), //we use size of ushort + new IntPtr(indexDataPtr), + BufferUsage.StaticDraw); //this version we use static draw + } + } + // IMPORTANT: Unbind from the buffer when we're done with it. + GL.BindBuffer(BufferTarget.ElementArrayBuffer, 0); + return indexBufferId; + } } } \ No newline at end of file diff --git a/src/PixelFarm/PixelFarm.Painter_Layer1_SH/ArrayList_T.cs b/src/PixelFarm/PixelFarm.Painter_Layer1_SH/ArrayList_T.cs index d2cb22458..cb99f493c 100644 --- a/src/PixelFarm/PixelFarm.Painter_Layer1_SH/ArrayList_T.cs +++ b/src/PixelFarm/PixelFarm.Painter_Layer1_SH/ArrayList_T.cs @@ -18,12 +18,44 @@ // http://www.antigrain.com //---------------------------------------------------------------------------- + namespace PixelFarm.CpuBlit { + public readonly struct ArrayListSegment + { + internal readonly ArrayList _arrList; + public readonly int beginAt; + public readonly int len; + public ArrayListSegment(ArrayList arrList, int beginAt, int len) + { + this._arrList = arrList; + this.beginAt = beginAt; + this.len = len; + } + + public int Count => len; + + public static void UnsafeGetInternalArr(in ArrayListSegment listSpan, out T[] internalArr) + { + internalArr = listSpan._arrList.UnsafeInternalArray; + } + + public static readonly ArrayListSegment Empty = new ArrayListSegment(); +#if DEBUG + public override string ToString() + { + return beginAt + "," + len; + } +#endif + } + public sealed class ArrayList { + static readonly T[] s_empty = new T[0]; + int _currentSize; - T[] _internalArray = new T[0]; + T[] _internalArray = s_empty; + public ArrayList() { } @@ -94,24 +126,23 @@ void Allocate(int size, int extraTail) /// public void AdjustSize(int newSize) { - if (newSize > _currentSize) + if (newSize > _currentSize && newSize > AllocatedSize) { - if (newSize > AllocatedSize) + //create new array and copy data to that + var newArray = new T[newSize]; + if (_internalArray != null) { - //create new array and copy data to that - var newArray = new T[newSize]; - if (_internalArray != null) - { - System.Array.Copy(_internalArray, newArray, _internalArray.Length); - //for (int i = _internalArray.Length - 1; i >= 0; --i) - //{ - // newArray[i] = _internalArray[i]; - //} - } - _internalArray = newArray; + System.Array.Copy(_internalArray, newArray, _internalArray.Length); + //for (int i = _internalArray.Length - 1; i >= 0; --i) + //{ + // newArray[i] = _internalArray[i]; + //} } + _internalArray = newArray; } } + + public void Zero() { System.Array.Clear(_internalArray, 0, _internalArray.Length); @@ -122,6 +153,23 @@ public T[] ToArray() System.Array.Copy(_internalArray, output, _currentSize); return output; } + + void EnsureSpaceForAppend(int newAppendLen) + { + int newSize = _currentSize + newAppendLen; + if (_internalArray.Length < newSize) + { + //copy + if (newSize < 100000) + { + AdjustSize(newSize + (newSize / 2) + 16); + } + else + { + AdjustSize(newSize + newSize / 4); + } + } + } /// /// append element to latest index /// @@ -141,25 +189,26 @@ public void Append(T v) } _internalArray[_currentSize++] = v; } + public void Append(T[] arr) { //append arr - int newSize = _currentSize + arr.Length; - if (_internalArray.Length < newSize) - { - //copy - if (newSize < 100000) - { - AdjustSize(newSize + (newSize / 2) + 16); - } - else - { - AdjustSize(newSize + newSize / 4); - } - } - System.Array.Copy(arr, 0, _internalArray, _currentSize, arr.Length); - _currentSize = newSize; + Append(arr, 0, arr.Length); + } + public void Append(T[] arr, int start, int len) + { + EnsureSpaceForAppend(len); + System.Array.Copy(arr, start, _internalArray, _currentSize, len); + _currentSize = _currentSize + len; } + public void CopyAndAppend(int srcIndex, int len) + { + EnsureSpaceForAppend(len); + System.Array.Copy(_internalArray, srcIndex, _internalArray, _currentSize, len); + _currentSize = _currentSize + len; + } + + public T this[int i] { get => _internalArray[i]; @@ -175,5 +224,8 @@ public void SetData(int index, T data) } // public int Length => _currentSize; + + // + public ArrayListSegment CreateSpan(int beginAt, int len) => new ArrayListSegment(this, beginAt, len); } } diff --git a/src/PixelFarm/PixelFarm.Painter_Layer1_SH/FillingRule.cs b/src/PixelFarm/PixelFarm.Painter_Layer1_SH/FillingRule.cs index c0f4b788e..ecb634fd6 100644 --- a/src/PixelFarm/PixelFarm.Painter_Layer1_SH/FillingRule.cs +++ b/src/PixelFarm/PixelFarm.Painter_Layer1_SH/FillingRule.cs @@ -15,8 +15,6 @@ //---------------------------------------------------------------------------- - -using PixelFarm.CpuBlit; namespace PixelFarm.Drawing { public enum FillingRule diff --git a/src/PixelFarm/PixelFarm.Painter_Layer2_SH/Basic/RenderVx.cs b/src/PixelFarm/PixelFarm.Painter_Layer2_SH/Basic/RenderVx.cs index 9c0573ce9..c65c6c457 100644 --- a/src/PixelFarm/PixelFarm.Painter_Layer2_SH/Basic/RenderVx.cs +++ b/src/PixelFarm/PixelFarm.Painter_Layer2_SH/Basic/RenderVx.cs @@ -12,14 +12,41 @@ public virtual void Dispose() { } public abstract class RenderVxFormattedString : RenderVx { public short DescendingInPx { get; set; } + public short SpanDescendingInPx { get; set; } public float Width { get; set; } public float SpanHeight { get; set; } - public VxState State { get; set; } + + VxState _state; + public abstract int StripCount { get; } + public VxState State + { + get => _state; + set + { + //if (!this.IsReset && value == VxState.NoStrip) + //{ + + //} + _state = value; + } + } + public bool IsReset { get; set; } + public enum VxState : byte { + /// + /// begin state, strip is not created + /// NoStrip, + /// + /// waiting for strip + /// Waiting, + /// + /// strip is ready + /// Ready, + } #if DEBUG public abstract string dbugName { get; } diff --git a/src/PixelFarm/PixelFarm.Painter_Layer2_SH/CpuBlit.VertexProcessing/LineWalker.cs b/src/PixelFarm/PixelFarm.Painter_Layer2_SH/CpuBlit.VertexProcessing/LineWalker.cs index 6f36621c9..d08f2ed03 100644 --- a/src/PixelFarm/PixelFarm.Painter_Layer2_SH/CpuBlit.VertexProcessing/LineWalker.cs +++ b/src/PixelFarm/PixelFarm.Painter_Layer2_SH/CpuBlit.VertexProcessing/LineWalker.cs @@ -26,6 +26,8 @@ public interface ILineSegmentWalkerOutput void AddLineTo(LineWalkerMark marker, double x, double y); } + + public delegate void LineSegmentDelegate(ILineSegmentWalkerOutput walkerOutput, LineWalkerMark markerSrc, VertexCmd cmd, double x, double y); public class LineWalkerMark @@ -113,6 +115,11 @@ public class LineWalker public LineWalker() { } + public ushort LineJoinRadius + { + get => _walkStateMan.LineJoinRadius; + set => _walkStateMan.LineJoinRadius = value; + } public void Reset() { _walkStateMan.ClearAllMarkers(); @@ -182,7 +189,6 @@ class WalkStateManager internal ILineSegmentWalkerOutput _output; - public void AddSegmentMark(LineWalkerMark segMark) { segMark.Index = _marks.Count; @@ -264,6 +270,7 @@ void ClearCollectedTmpPoints(out double tmp_expectedLen) } //----------------- } + public ushort LineJoinRadius { get; set; } public void MoveTo(double x0, double y0) { switch (_state) @@ -283,6 +290,8 @@ public void MoveTo(double x0, double y0) break; } } + + public void LineTo(double x1, double y1) { switch (_state) @@ -296,8 +305,11 @@ public void LineTo(double x1, double y1) { //clear prev segment len - //find line segment length + //find line segment length + // double new_remaining_len = AggMath.calc_distance(_latest_X, _latest_Y, x1, y1); + + //check current gen state //find angle double angle = Math.Atan2(y1 - _latest_Y, x1 - _latest_X); @@ -307,14 +319,26 @@ public void LineTo(double x1, double y1) OnBeginLineSegment(sin, cos, ref new_remaining_len); + if (LineJoinRadius > 0) + { + //offset linejoin radius + new_x = _latest_X + (LineJoinRadius * cos); + new_y = _latest_Y + (LineJoinRadius * sin); + new_remaining_len -= (LineJoinRadius * 2);//remove begin and len + _latest_X = new_x; + _latest_Y = new_y; + } + while (new_remaining_len >= _expectedSegmentLen) { //we can create a new segment new_x = _latest_X + (_expectedSegmentLen * cos); new_y = _latest_Y + (_expectedSegmentLen * sin); new_remaining_len -= _expectedSegmentLen; + //each segment has its own line production procedure - //eg. + //eg... + OnSegment(new_x, new_y); //-------------------- _latest_Y = new_y; diff --git a/src/PixelFarm/PixelFarm.Painter_Layer2_SH/CpuBlit.VertexProcessing/RoundedRect.cs b/src/PixelFarm/PixelFarm.Painter_Layer2_SH/CpuBlit.VertexProcessing/RoundedRect.cs index 4f1f7c632..76379b779 100644 --- a/src/PixelFarm/PixelFarm.Painter_Layer2_SH/CpuBlit.VertexProcessing/RoundedRect.cs +++ b/src/PixelFarm/PixelFarm.Painter_Layer2_SH/CpuBlit.VertexProcessing/RoundedRect.cs @@ -67,16 +67,7 @@ public RoundedRect(double left, double bottom, double right, double top, double } } - public RoundedRect(Q1RectD bounds, double r) - : this(bounds.Left, bounds.Bottom, bounds.Right, bounds.Top, r) - { - } - - public RoundedRect(Q1Rect bounds, double r) - : this(bounds.Left, bounds.Bottom, bounds.Right, bounds.Top, r) - { - } - + public void SetRect(double left, double bottom, double right, double top) { _bounds = new Q1RectD(left, bottom, right, top); @@ -135,46 +126,139 @@ public double ApproximationScale get => _arc.ApproximateScale; set => _arc.ApproximateScale = value; } + + //IEnumerable GetVertexIter() + //{ + + // _arc.UseStartEndLimit = true; + // _arc.Init(_bounds.Left + _leftBottomRadius.x, _bounds.Bottom + _leftBottomRadius.y, _leftBottomRadius.x, _leftBottomRadius.y, Math.PI, Math.PI + Math.PI * 0.5); + // _arc.SetStartEndLimit(_bounds.Left, _bounds.Bottom + _leftBottomRadius.y, + // _bounds.Left + _leftBottomRadius.x, _bounds.Bottom); + + // foreach (VertexData vertexData in _arc.GetVertexIter()) + // { + // if (VertexHelper.IsEmpty(vertexData.command)) + // { + // break; + // } + // yield return vertexData; + // } + + + // _arc.Init(_bounds.Right - _rightBottomRadius.x, _bounds.Bottom + _rightBottomRadius.y, _rightBottomRadius.x, _rightBottomRadius.y, Math.PI + Math.PI * 0.5, 0.0); + // _arc.SetStartEndLimit(_bounds.Right - _rightBottomRadius.x, + // _bounds.Bottom, _bounds.Right, _bounds.Bottom + _rightBottomRadius.y); + + // foreach (VertexData vertexData in _arc.GetVertexIter()) + // { + // if (VertexHelper.IsMoveTo(vertexData.command)) + // { + // // skip the initial moveto + // continue; + // } + // if (VertexHelper.IsEmpty(vertexData.command)) + // { + // break; + // } + // yield return vertexData; + // } + + + // _arc.Init(_bounds.Right - _rightTopRadius.x, _bounds.Top - _rightTopRadius.y, _rightTopRadius.x, _rightTopRadius.y, 0.0, Math.PI * 0.5); + // _arc.SetStartEndLimit(_bounds.Right, _bounds.Top - _rightTopRadius.y, + // _bounds.Right - _rightTopRadius.x, _bounds.Top); + + // foreach (VertexData vertexData in _arc.GetVertexIter()) + // { + // if (VertexHelper.IsMoveTo(vertexData.command)) + // { + // // skip the initial moveto + // continue; + // } + // if (VertexHelper.IsEmpty(vertexData.command)) + // { + // break; + // } + // yield return vertexData; + // } + + + // _arc.Init(_bounds.Left + _leftTopRadius.x, _bounds.Top - _leftTopRadius.y, _leftTopRadius.x, _leftTopRadius.y, Math.PI * 0.5, Math.PI); + // _arc.SetStartEndLimit(_bounds.Left - _leftTopRadius.x, _bounds.Top, + // _bounds.Left, _bounds.Top - _leftTopRadius.y); + + // foreach (VertexData vertexData in _arc.GetVertexIter()) + // { + // switch (vertexData.command) + // { + // case VertexCmd.MoveTo: + // continue; + // case VertexCmd.NoMore: + // goto EXIT_LOOP; + // default: + // yield return vertexData; + // break; + // } + // } + + //EXIT_LOOP: + + // yield return new VertexData(VertexCmd.Close, (int)EndVertexOrientation.CCW, 0); + // yield return new VertexData(VertexCmd.NoMore); + //} + IEnumerable GetVertexIter() { + _arc.UseStartEndLimit = true; - _arc.Init(_bounds.Left + _leftBottomRadius.x, _bounds.Bottom + _leftBottomRadius.y, _leftBottomRadius.x, _leftBottomRadius.y, Math.PI, Math.PI + Math.PI * 0.5); - _arc.SetStartEndLimit(_bounds.Left, _bounds.Bottom + _leftBottomRadius.y, - _bounds.Left + _leftBottomRadius.x, _bounds.Bottom); - foreach (VertexData vertexData in _arc.GetVertexIter()) - { - if (VertexHelper.IsEmpty(vertexData.command)) - { - break; - } - yield return vertexData; - } + //left-top in view + //_arc.Init(_bounds.Left + _leftBottomRadius.x, _bounds.Bottom + _leftBottomRadius.y, _leftBottomRadius.x, _leftBottomRadius.y, Math.PI, Math.PI + Math.PI * 0.5); + //_arc.SetStartEndLimit(_bounds.Left, _bounds.Bottom + _leftBottomRadius.y, + // _bounds.Left + _leftBottomRadius.x, _bounds.Bottom); + //foreach (VertexData vertexData in _arc.GetVertexIter()) + //{ + // if (VertexHelper.IsEmpty(vertexData.command)) + // { + // break; + // } + // yield return vertexData; + //} - _arc.Init(_bounds.Right - _rightBottomRadius.x, _bounds.Bottom + _rightBottomRadius.y, _rightBottomRadius.x, _rightBottomRadius.y, Math.PI + Math.PI * 0.5, 0.0); - _arc.SetStartEndLimit(_bounds.Right - _rightBottomRadius.x, - _bounds.Bottom, _bounds.Right, _bounds.Bottom + _rightBottomRadius.y); + //yield return new VertexData(VertexCmd.LineTo, _bounds.Left + _leftBottomRadius.x, _bounds.Bottom + _leftBottomRadius.y); - foreach (VertexData vertexData in _arc.GetVertexIter()) - { - if (VertexHelper.IsMoveTo(vertexData.command)) - { - // skip the initial moveto - continue; - } - if (VertexHelper.IsEmpty(vertexData.command)) - { - break; - } - yield return vertexData; - } + //------------------------------ + //right-top in view + //_arc.Init(_bounds.Right - _rightBottomRadius.x, _bounds.Bottom + _rightBottomRadius.y, _rightBottomRadius.x, _rightBottomRadius.y, Math.PI + Math.PI * 0.5, 0.0); + //_arc.SetStartEndLimit(_bounds.Right - _rightBottomRadius.x, + // _bounds.Bottom, _bounds.Right, _bounds.Bottom + _rightBottomRadius.y); + + //foreach (VertexData vertexData in _arc.GetVertexIter()) + //{ + // if (VertexHelper.IsMoveTo(vertexData.command)) + // { + // // skip the initial moveto + // continue; + // } + // if (VertexHelper.IsEmpty(vertexData.command)) + // { + // break; + // } + // yield return vertexData; + //} + //yield return new VertexData(VertexCmd.LineTo, _bounds.Right - (_rightBottomRadius.x), _bounds.Bottom + _leftBottomRadius.y); + //yield return new VertexData(VertexCmd.LineTo, _bounds.Right - (_rightBottomRadius.x), _bounds.Bottom); + //------------------------------ + //right - bottom in view _arc.Init(_bounds.Right - _rightTopRadius.x, _bounds.Top - _rightTopRadius.y, _rightTopRadius.x, _rightTopRadius.y, 0.0, Math.PI * 0.5); _arc.SetStartEndLimit(_bounds.Right, _bounds.Top - _rightTopRadius.y, _bounds.Right - _rightTopRadius.x, _bounds.Top); + yield return new VertexData(VertexCmd.LineTo, _bounds.Right, _bounds.Top - _rightTopRadius.y); + foreach (VertexData vertexData in _arc.GetVertexIter()) { if (VertexHelper.IsMoveTo(vertexData.command)) @@ -188,25 +272,26 @@ IEnumerable GetVertexIter() } yield return vertexData; } + //------------------------------ + yield return new VertexData(VertexCmd.LineTo, _bounds.Right - (_rightBottomRadius.x), _bounds.Top - _rightTopRadius.y); + //_arc.Init(_bounds.Left + _leftTopRadius.x, _bounds.Top - _leftTopRadius.y, _leftTopRadius.x, _leftTopRadius.y, Math.PI * 0.5, Math.PI); + //_arc.SetStartEndLimit(_bounds.Left - _leftTopRadius.x, _bounds.Top, + // _bounds.Left, _bounds.Top - _leftTopRadius.y); - _arc.Init(_bounds.Left + _leftTopRadius.x, _bounds.Top - _leftTopRadius.y, _leftTopRadius.x, _leftTopRadius.y, Math.PI * 0.5, Math.PI); - _arc.SetStartEndLimit(_bounds.Left - _leftTopRadius.x, _bounds.Top, - _bounds.Left, _bounds.Top - _leftTopRadius.y); - - foreach (VertexData vertexData in _arc.GetVertexIter()) - { - switch (vertexData.command) - { - case VertexCmd.MoveTo: - continue; - case VertexCmd.NoMore: - goto EXIT_LOOP; - default: - yield return vertexData; - break; - } - } + //foreach (VertexData vertexData in _arc.GetVertexIter()) + //{ + // switch (vertexData.command) + // { + // case VertexCmd.MoveTo: + // continue; + // case VertexCmd.NoMore: + // goto EXIT_LOOP; + // default: + // yield return vertexData; + // break; + // } + //} EXIT_LOOP: diff --git a/src/PixelFarm/PixelFarm.Painter_Layer2_SH/CpuBlit.VertexProcessing/VectorToolBox.cs b/src/PixelFarm/PixelFarm.Painter_Layer2_SH/CpuBlit.VertexProcessing/VectorToolBox.cs index b4fe1cba4..2d13623f4 100644 --- a/src/PixelFarm/PixelFarm.Painter_Layer2_SH/CpuBlit.VertexProcessing/VectorToolBox.cs +++ b/src/PixelFarm/PixelFarm.Painter_Layer2_SH/CpuBlit.VertexProcessing/VectorToolBox.cs @@ -63,7 +63,7 @@ public void Dispose() } } - + public static class VxsTemp { @@ -176,7 +176,7 @@ public static TempContext Borrow(out VxsClipper clipper) return Temp.Borrow(out clipper); } - + } diff --git a/src/PixelFarm/PixelFarm.Painter_Layer2_SH/CpuBlit.VertexProcessing/VertexStoreExtensions.cs b/src/PixelFarm/PixelFarm.Painter_Layer2_SH/CpuBlit.VertexProcessing/VertexStoreExtensions.cs index 442314998..6dd1af3b7 100644 --- a/src/PixelFarm/PixelFarm.Painter_Layer2_SH/CpuBlit.VertexProcessing/VertexStoreExtensions.cs +++ b/src/PixelFarm/PixelFarm.Painter_Layer2_SH/CpuBlit.VertexProcessing/VertexStoreExtensions.cs @@ -182,7 +182,17 @@ public static void MakeVxs(this Ellipse ellipse, PathWriter writer) //4. //add no more? } - + public static void MakeVxs(this Arc arc, VertexStore v) + { + foreach (VertexData vertexData in arc.GetVertexIter()) + { + if (VertexHelper.IsEmpty(vertexData.command)) + { + break; + } + v.AddVertex(vertexData.x, vertexData.y, vertexData.command); + } + } public static IEnumerable GetVertexIter(this Arc arc) { // go to the start diff --git a/src/PixelFarm/PixelFarm.Painter_Layer2_SH/CpuBlit/MemBitmapExt.cs b/src/PixelFarm/PixelFarm.Painter_Layer2_SH/CpuBlit/MemBitmapExt.cs index 39c4cc1e9..7295f1f06 100644 --- a/src/PixelFarm/PixelFarm.Painter_Layer2_SH/CpuBlit/MemBitmapExt.cs +++ b/src/PixelFarm/PixelFarm.Painter_Layer2_SH/CpuBlit/MemBitmapExt.cs @@ -24,7 +24,25 @@ namespace PixelFarm.CpuBlit { - + public class MemBitmapProxy + { + public MemBitmapProxy() + { + } + public void Set(MemBitmap memBmp, int left, int top, int width, int height) + { + Left = left; + Top = top; + Width = width; + Height = height; + OriginalBmp = memBmp; + } + public MemBitmap OriginalBmp { get; private set; } + public int Left { get; private set; } + public int Top { get; private set; } + public int Width { get; private set; } + public int Height { get; private set; } + } public static class MemBitmapExt { @@ -47,6 +65,7 @@ public unsafe static TempMemPtr FromBmp(MemBitmap bmp, out byte* headPtr) return ptr; } + public static int[] CopyImgBuffer(this MemBitmap memBmp, int width, int height, bool flipY = false) { //calculate stride for the width @@ -140,14 +159,59 @@ public static MemBitmap CopyImgBuffer(this MemBitmap src, int srcX, int srcY, in return copyBmp; } - /// - /// swap from gles ARGB to ABGR (Gdi) - /// - /// - public static void SwapArgbToAbgr(this MemBitmap src) + public static void BlendColorWithMask(Color c, MemBitmapProxy mask, MemBitmap dst, int dstX, int dstY, int srcX, int srcY, int srcW, int srcH) { - //TODO: + //select color from mask bitmap and blend to dst bitmap with specific color + } + public static void BitBlt(MemBitmap src, MemBitmap dst, int dstX, int dstY, int srcX, int srcY, int srcW, int srcH) + { + IntPtr src_h = src.GetRawBufferHead(); + IntPtr dst_h = dst.GetRawBufferHead(); + unsafe + { + int* src_h1 = (int*)src_h; + int* dst_h1 = (int*)dst_h; + //copy line-by-line + src_h1 += srcY * src.Width;//move to src line + dst_h1 += dstY * dst.Width;//move to dst line + + if (dstX + srcW > dst.Width) + { + srcW = dst.Width - dstX; + if (srcW < 0) { return; }//limit + } + if (dstY + srcH > dst.Height) + { + srcH = dst.Height - dstY; + if (srcH < 0) return;//limit + } + + for (int t_count = 0; t_count < srcH; ++t_count) + { + MemMx.memcpy((byte*)(dst_h1 + dstX), (byte*)(src_h1 + srcX), srcW * 4); + //move to next line + src_h1 += src.Width; + dst_h1 += dst.Width; + } + } + + src.ReleaseRawBufferHead(src_h); + dst.ReleaseRawBufferHead(dst_h); + +#if DEBUG + //dst.SaveImage("tmpN1.png"); +#endif + } + + ///// + ///// swap from gles ARGB to ABGR (Gdi) + ///// + ///// + //public static void SwapArgbToAbgr(this MemBitmap src) + //{ + // //TODO: + //} //public static void InvertColor(this MemBitmap memBmp) //{ // //temp fix @@ -175,98 +239,115 @@ public static void SwapArgbToAbgr(this MemBitmap src) // } // } //} - internal static void Clear(PixelFarm.CpuBlit.TempMemPtr tmp, Color color) + + internal static void Clear(PixelFarm.CpuBlit.TempMemPtr tmp, Color color, int left, int top, int width, int height) { unsafe { int* buffer = (int*)tmp.Ptr; - int len32 = tmp.LengthInBytes / 4; - //------------------------------ //fast clear buffer //skip clipping **** //TODO: reimplement clipping*** - //------------------------------ - if (color == Color.White) + //------------------------------ + + unsafe { - //fast cleat with white color - int n = len32; - unsafe + //clear only 1st row + uint* head_i32 = (uint*)buffer; + //first line + //other color + //#if WIN32 + // uint colorARGB = (uint)((color.alpha << 24) | ((color.red << 16) | (color.green << 8) | color.blue)); + //#else + // uint colorARGB = (uint)((color.alpha << 24) | ((color.blue << 16) | (color.green << 8) | color.red)); + //#endif + + //ARGB + uint colorARGB = 0;//empty + if (color != Color.Empty) { - //fixed (void* head = &buffer[0]) - { - uint* head_i32 = (uint*)buffer; - for (int i = n - 1; i >= 0; --i) - { - *head_i32 = 0xffffffff; //white (ARGB) - head_i32++; - } - } + colorARGB = (uint)((color.A << CO.A_SHIFT) | ((color.R << CO.R_SHIFT) | (color.G << CO.G_SHIFT) | color.B << CO.B_SHIFT)); } - } - else if (color == Color.Black) - { - //fast clear with black color - int n = len32; - unsafe + + + + head_i32 += top * width;//move to first line + //and first line only + uint* head_i32_1 = head_i32 + left; + for (int i = width - 1; i >= 0; --i) { - //fixed (void* head = &buffer[0]) - { - uint* head_i32 = (uint*)buffer; - for (int i = n - 1; i >= 0; --i) - { - *head_i32 = 0xff000000; //black (ARGB) - head_i32++; - } - } + *head_i32_1 = colorARGB; //black (ARGB) + head_i32_1++; } - } - else if (color == Color.Empty) - { - int n = len32; - unsafe + + int stride = width * 4;//bytes + //and copy to another line + head_i32 += width;//move to another line + + for (int i = height - 2; i >= 0; --i) { - //fixed (void* head = &buffer[0]) - { - uint* head_i32 = (uint*)buffer; - for (int i = n - 1; i >= 0; --i) - { - *head_i32 = 0x00000000; //empty - head_i32++; - } - } + MemMx.memcpy((byte*)(head_i32 + left), (byte*)buffer, stride); + head_i32 += width; } } - else + } + } + + internal static void Clear(PixelFarm.CpuBlit.TempMemPtr tmp, Color color, int width, int height) + { + unsafe + { + int* buffer = (int*)tmp.Ptr; + + + //------------------------------ + //fast clear buffer + //skip clipping **** + //TODO: reimplement clipping*** + //------------------------------ + + + unsafe { + //clear only 1st row + uint* head_i32 = (uint*)buffer; + //first line + //other color //#if WIN32 - // uint colorARGB = (uint)((color.alpha << 24) | ((color.red << 16) | (color.green << 8) | color.blue)); + // uint colorARGB = (uint)((color.alpha << 24) | ((color.red << 16) | (color.green << 8) | color.blue)); //#else - // uint colorARGB = (uint)((color.alpha << 24) | ((color.blue << 16) | (color.green << 8) | color.red)); + // uint colorARGB = (uint)((color.alpha << 24) | ((color.blue << 16) | (color.green << 8) | color.red)); //#endif //ARGB - uint colorARGB = (uint)((color.A << CO.A_SHIFT) | ((color.R << CO.R_SHIFT) | (color.G << CO.G_SHIFT) | color.B << CO.B_SHIFT)); - int n = len32; - unsafe + uint colorARGB = 0;//empty + if (color != Color.Empty) { - //fixed (void* head = &buffer[0]) - { - uint* head_i32 = (uint*)buffer; - for (int i = n - 1; i >= 0; --i) - { - *head_i32 = colorARGB; - head_i32++; - } - } + colorARGB = (uint)((color.A << CO.A_SHIFT) | ((color.R << CO.R_SHIFT) | (color.G << CO.G_SHIFT) | color.B << CO.B_SHIFT)); + } + + //first line only + for (int i = width - 1; i >= 0; --i) + { + *head_i32 = colorARGB; //black (ARGB) + head_i32++; + } + //and copy to another line + int stride = width * 4; + for (int i = height - 2; i >= 0; --i) + { + //copy from first line to another line + MemMx.memcpy((byte*)head_i32, (byte*)buffer, stride); + head_i32 += width; } } } } public static void Clear(this MemBitmap bmp, Color color) { - Clear(MemBitmap.GetBufferPtr(bmp), color); + Clear(MemBitmap.GetBufferPtr(bmp), color, bmp.Width, bmp.Height); } /// /// create thumbnail img with super-sampling technique,(Expensive, High quality thumb) @@ -609,31 +690,19 @@ public static void SaveImage(this MemBitmap source, MemBitmapIO.OutputImageFormat outputFormat = MemBitmapIO.OutputImageFormat.Default, object saveParameters = null) { DefaultMemBitmapIO.SaveImage(source, output, outputFormat, saveParameters); - - ////save image with default parameter - //if (outputFormat == MemBitmapIO.OutputImageFormat.Default) - //{ - // string ext = System.IO.Path.GetExtension(filename).ToLower(); - // switch (ext) - // { - // case ".png": - // outputFormat = MemBitmapIO.OutputImageFormat.Png; - // break; - // case ".jpg": - // case ".jpeg": - // outputFormat = MemBitmapIO.OutputImageFormat.Jpeg; - // break; - // } - //} - - //DefaultMemBitmapIO.SaveImage(source, filename, outputFormat, saveParameters); } + +#if DEBUG + public static bool s_dbugEnableDebugImage; +#endif + } public abstract class MemBitmapIO { public enum OutputImageFormat { + Default, Png, Jpeg, diff --git a/src/PixelFarm/PixelFarm.Painter_Layer2_SH/Drawing.Internal/MicroPainter.cs b/src/PixelFarm/PixelFarm.Painter_Layer2_SH/Drawing.Internal/MicroPainter.cs index 82839a42c..b04599e39 100644 --- a/src/PixelFarm/PixelFarm.Painter_Layer2_SH/Drawing.Internal/MicroPainter.cs +++ b/src/PixelFarm/PixelFarm.Painter_Layer2_SH/Drawing.Internal/MicroPainter.cs @@ -1,25 +1,19 @@ //MIT, 2018-present, WinterDev - + namespace PixelFarm.Drawing.Internal { - public struct MicroPainter + public ref struct MicroPainter { - float _viewportWidth; - float _viewportHeight; public readonly DrawBoard _drawBoard; public MicroPainter(DrawBoard drawBoard) { - _viewportWidth = 0; - _viewportHeight = 0; _drawBoard = drawBoard; } public float ViewportWidth => _drawBoard.Width; public float ViewportHeight => _drawBoard.Height; - public DrawboardBuffer CreateOffscreenDrawBoard(int width, int height) - { - return _drawBoard.CreateBackbuffer(width, height); - } + public DrawboardBuffer CreateOffscreenDrawBoard(int width, int height) => _drawBoard.CreateBackbuffer(width, height); + public void AttachTo(DrawboardBuffer attachToBackbuffer) { //save @@ -27,8 +21,8 @@ public void AttachTo(DrawboardBuffer attachToBackbuffer) } public void SetViewportSize(float width, float height) { - _viewportWidth = width; - _viewportHeight = height; + //_viewportWidth = width; + //_viewportHeight = height; } public void AttachToNormalBuffer() @@ -37,6 +31,10 @@ public void AttachToNormalBuffer() } internal Rectangle CurrentClipRect => _drawBoard.CurrentClipRect; + public void DrawImage(Image img, float x, float y) + { + _drawBoard.DrawImage(img, (int)x, (int)y); + } public void DrawImage(Image img, float x, float y, float w, float h) { _drawBoard.DrawImage(img, new RectangleF(x, y, w, h)); diff --git a/src/PixelFarm/PixelFarm.Painter_Layer2_SH/Drawing/DrawBoard.cs b/src/PixelFarm/PixelFarm.Painter_Layer2_SH/Drawing/DrawBoard.cs index 68e68aadc..d4b7aa89e 100644 --- a/src/PixelFarm/PixelFarm.Painter_Layer2_SH/Drawing/DrawBoard.cs +++ b/src/PixelFarm/PixelFarm.Painter_Layer2_SH/Drawing/DrawBoard.cs @@ -194,19 +194,23 @@ public virtual void RenderTo(Image destImg, int srcX, int srcYy, int srcW, int s //TODO: review these funcs public abstract RequestFont CurrentFont { get; set; } public abstract Color CurrentTextColor { get; set; } - public abstract void DrawText(char[] buffer, int x, int y); - public abstract void DrawText(char[] buffer, Rectangle logicalTextBox, int textAlignment); - public abstract void DrawText(char[] buffer, int startAt, int len, Rectangle logicalTextBox, int textAlignment); + public abstract TextDrawingTech TextDrawingTech { get; set; } //TODO: review here again public abstract Color TextBackgroundColorHint { get; set; }//explicit set current text background color hint - + + public abstract void DrawText(char[] buffer, int x, int y); + public abstract void DrawText(char[] buffer, Rectangle logicalTextBox, int textAlignment); + public abstract void DrawText(char[] buffer, int startAt, int len, Rectangle logicalTextBox, int textAlignment); + /// /// create formatted string base on current font,font-size, font style /// /// /// public abstract RenderVxFormattedString CreateFormattedString(char[] buffer, int startAt, int len, bool delay); + public abstract RenderVxFormattedString CreateFormattedString(int[] buffer, int startAt, int len, bool delay); + public abstract void DrawRenderVx(RenderVx renderVx, float x, float y); public abstract void Dispose(); //-- @@ -224,7 +228,6 @@ public virtual void RenderTo(Image destImg, int srcX, int srcYy, int srcW, int s public abstract bool IsGpuDrawBoard { get; } public abstract void BlitFrom(DrawBoard src, float srcX, float srcY, float srcW, float srcH, float dstX, float dstY); public abstract ImageBinder GetInternalBitmapProvider(); - } public enum TextDrawingTech : byte @@ -245,7 +248,7 @@ public abstract class DrawboardBuffer : System.IDisposable - + public enum RenderQuality { @@ -309,15 +312,15 @@ public struct SmoothingModeState : System.IDisposable internal SmoothingModeState(DrawBoard drawBoard, SmoothingMode state) { _latestSmoothMode = state; - _drawBoard = drawBoard; + _drawBoard = drawBoard; + } public void Dispose() { _drawBoard.SmoothingMode = _latestSmoothMode; } } - //-------------------------------------------------- - + public struct StrokeState : System.IDisposable { readonly DrawBoard _d; diff --git a/src/PixelFarm/PixelFarm.Painter_Layer2_SH/Drawing/ITextPrinter.cs b/src/PixelFarm/PixelFarm.Painter_Layer2_SH/Drawing/ITextPrinter.cs deleted file mode 100644 index 0cd59aee2..000000000 --- a/src/PixelFarm/PixelFarm.Painter_Layer2_SH/Drawing/ITextPrinter.cs +++ /dev/null @@ -1,35 +0,0 @@ -////MIT, 2014-present, WinterDev - -//namespace PixelFarm.Drawing -//{ - - -// /// -// /// for printing a string to target canvas -// /// -// public interface ITextPrinter -// { - -// } - - -// public static class ITextPrinterExtensions -// { -// public static void DrawString(this ITextPrinter textPrinter, string text, double left, double top) -// { -//#if DEBUG -// if (text == null) -// { -// return; -// } -//#endif -// //TODO: review here!!! -// //Do Not alloc new char[] -// //plan: use Span or some ptr to string - -// char[] textBuffer = text.ToCharArray(); -// textPrinter.DrawString(textBuffer, 0, textBuffer.Length, left, top); -// } -// } - -//} \ No newline at end of file diff --git a/src/PixelFarm/PixelFarm.Painter_Layer2_SH/Drawing/Painter.cs b/src/PixelFarm/PixelFarm.Painter_Layer2_SH/Drawing/Painter.cs index ceec01677..00709a297 100644 --- a/src/PixelFarm/PixelFarm.Painter_Layer2_SH/Drawing/Painter.cs +++ b/src/PixelFarm/PixelFarm.Painter_Layer2_SH/Drawing/Painter.cs @@ -13,13 +13,13 @@ // warranty, and with no claim as to its suitability for any purpose. // //---------------------------------------------------------------------------- - + using PixelFarm.CpuBlit; namespace PixelFarm.Drawing { - + public enum TargetBuffer { @@ -37,7 +37,6 @@ public abstract class Painter //2. GdiPlusPainter //3. GLPainter - public abstract float OriginX { get; } public abstract float OriginY { get; } public abstract void SetOrigin(float ox, float oy); @@ -112,18 +111,22 @@ public abstract class Painter public abstract RenderVx CreateRenderVx(VertexStore vxs); - public abstract RenderVxFormattedString CreateRenderVx(string textspan); - public abstract RenderVxFormattedString CreateRenderVx(char[] textspanBuff, int startAt, int len); public abstract void FillRenderVx(Brush brush, RenderVx renderVx); public abstract void FillRenderVx(RenderVx renderVx); public abstract void DrawRenderVx(RenderVx renderVx); public abstract void Render(RenderVx renderVx); ////////////////////////////////////////////////////////////////////////////// + + public abstract RenderVxFormattedString CreateRenderVx(IFormattedGlyphPlanList formattedGlyphPlans); + public abstract RenderVxFormattedString CreateRenderVx(string textspan); + public abstract RenderVxFormattedString CreateRenderVx(char[] textspanBuff, int startAt, int len); + //text,string //TODO: review text drawing funcs public abstract RequestFont CurrentFont { get; set; } + public abstract void DrawString( string text, double x, @@ -132,6 +135,8 @@ public abstract void DrawString( } + + public interface IDashGenerator { diff --git a/src/PixelFarm/PixelFarm.Painter_Layer2_SH/PixelFarm.Painter_Layer2_SH.projitems b/src/PixelFarm/PixelFarm.Painter_Layer2_SH/PixelFarm.Painter_Layer2_SH.projitems index 74b4cda6b..ba1d3e813 100644 --- a/src/PixelFarm/PixelFarm.Painter_Layer2_SH/PixelFarm.Painter_Layer2_SH.projitems +++ b/src/PixelFarm/PixelFarm.Painter_Layer2_SH/PixelFarm.Painter_Layer2_SH.projitems @@ -16,8 +16,6 @@ - - @@ -41,7 +39,6 @@ - diff --git a/src/PixelFarm/PixelFarm.Painter_Layer2_SH/TempContext.cs b/src/PixelFarm/PixelFarm.Painter_Layer2_SH/TempContext.cs index 8f042cf7d..46846d1e3 100644 --- a/src/PixelFarm/PixelFarm.Painter_Layer2_SH/TempContext.cs +++ b/src/PixelFarm/PixelFarm.Painter_Layer2_SH/TempContext.cs @@ -20,11 +20,9 @@ public void Dispose() public static class Temp { - public delegate T CreateNewItemDelegate(); public delegate void ReleaseItemDelegate(T item); - [System.ThreadStatic] static Stack s_pool; [System.ThreadStatic] diff --git a/src/PixelFarm/PixelFarm.Painter_Layer2_SH/_ESS_LINK_WITH_TY/RequestFont.cs b/src/PixelFarm/PixelFarm.Painter_Layer2_SH/_ESS_LINK_WITH_TY/RequestFont.cs index 0d96b9d67..1fe84ba90 100644 --- a/src/PixelFarm/PixelFarm.Painter_Layer2_SH/_ESS_LINK_WITH_TY/RequestFont.cs +++ b/src/PixelFarm/PixelFarm.Painter_Layer2_SH/_ESS_LINK_WITH_TY/RequestFont.cs @@ -34,7 +34,10 @@ namespace PixelFarm.Drawing { + public interface IFormattedGlyphPlanList + { + } public enum RequestFontStyle { //https://www.w3.org/TR/css-fonts-3/#propdef-font-style @@ -239,7 +242,6 @@ internal Choice(Len fontSize) public RequestFont(string fontFamily, float fontSizeInPts, ushort fontWeight = 400, RequestFontStyle cssFontStyle = RequestFontStyle.Regular) : this(fontFamily, Len.Pt(fontSizeInPts), fontWeight, cssFontStyle) { - } public RequestFont(string fontFamily, Len fontSize, ushort fontWeight = 400, RequestFontStyle cssFontStyle = RequestFontStyle.Regular) diff --git a/src/PixelFarm/PixelFarm.Painter_Layer2_SH/_ESS_LINK_WITH_TY/TextBufferSpan.cs b/src/PixelFarm/PixelFarm.Painter_Layer2_SH/_ESS_LINK_WITH_TY/TextBufferSpan.cs deleted file mode 100644 index 8f22ee850..000000000 --- a/src/PixelFarm/PixelFarm.Painter_Layer2_SH/_ESS_LINK_WITH_TY/TextBufferSpan.cs +++ /dev/null @@ -1,34 +0,0 @@ -//MIT, 2020-present, WinterDev - -namespace PixelFarm.Drawing -{ - public readonly struct TextBufferSpan - { - public readonly int start; - public readonly int len; - - readonly char[] _rawString; - - public TextBufferSpan(char[] rawCharBuffer) - { - _rawString = rawCharBuffer; - this.len = rawCharBuffer.Length; - this.start = 0; - } - public TextBufferSpan(char[] rawCharBuffer, int start, int len) - { - this.start = start; - this.len = len; - _rawString = rawCharBuffer; - } - - public override string ToString() - { - return start + ":" + len; - } - - - public char[] GetRawCharBuffer() => _rawString; - } - -} \ No newline at end of file diff --git a/src/PixelFarm/PixelFarm.Painter_Layer2_SH/_ESS_LINK_WITH_TY/TextSpanMeasureResult.cs b/src/PixelFarm/PixelFarm.Painter_Layer2_SH/_ESS_LINK_WITH_TY/TextSpanMeasureResult.cs deleted file mode 100644 index 637a43b24..000000000 --- a/src/PixelFarm/PixelFarm.Painter_Layer2_SH/_ESS_LINK_WITH_TY/TextSpanMeasureResult.cs +++ /dev/null @@ -1,15 +0,0 @@ -//MIT, 2020-present, WinterDev - -namespace PixelFarm.Drawing -{ - public struct TextSpanMeasureResult - { - public int[] outputXAdvances; - public int outputTotalW; - public ushort lineHeight; - - public bool hasSomeExtraOffsetY; - public short minOffsetY; - public short maxOffsetY; - } -} \ No newline at end of file diff --git a/src/PixelFarm/PixelFarm.Typography/PixelFarm.Typography.csproj b/src/PixelFarm/PixelFarm.Typography/PixelFarm.Typography.csproj index 317f9ce53..52ccaade4 100644 --- a/src/PixelFarm/PixelFarm.Typography/PixelFarm.Typography.csproj +++ b/src/PixelFarm/PixelFarm.Typography/PixelFarm.Typography.csproj @@ -39,9 +39,6 @@ - - System.Numerics.ForNet20.cs - diff --git a/src/PixelFarm/PixelFarm.Vectors_SH/2_Geometry/Arc.cs b/src/PixelFarm/PixelFarm.Vectors_SH/2_Geometry/Arc.cs index b4902f79b..c31fbc016 100644 --- a/src/PixelFarm/PixelFarm.Vectors_SH/2_Geometry/Arc.cs +++ b/src/PixelFarm/PixelFarm.Vectors_SH/2_Geometry/Arc.cs @@ -38,9 +38,9 @@ public class Arc double _startAngle; double _endAngle; double _scale; - ArcDirection _Direction; + ArcDirection _direction; double _flattenDeltaAngle; - bool _IsInitialized; + bool _isInitialized; //------------ double _startX; double _startY; @@ -56,7 +56,7 @@ public enum ArcDirection public Arc() { _scale = 1.0; - _IsInitialized = false; + _isInitialized = false; } @@ -127,9 +127,9 @@ public double ApproximateScale set { _scale = value; - if (_IsInitialized) + if (_isInitialized) { - Normalize(_startAngle, _endAngle, _Direction); + Normalize(_startAngle, _endAngle, _direction); } } } @@ -153,10 +153,10 @@ void Normalize(double angle1, double angle2, ArcDirection direction) } _flattenDeltaAngle = -_flattenDeltaAngle; } - _Direction = direction; + _direction = direction; _startAngle = angle1; _endAngle = angle2; - _IsInitialized = true; + _isInitialized = true; _calculateNSteps = (int)Math.Floor(((_endAngle - _startAngle) / _flattenDeltaAngle)); } } diff --git a/src/PixelFarm/PixelFarm.Vectors_SH/3_Transform/3_Perspective.cs b/src/PixelFarm/PixelFarm.Vectors_SH/3_Transform/3_Perspective.cs index e454d2c84..85f24ab87 100644 --- a/src/PixelFarm/PixelFarm.Vectors_SH/3_Transform/3_Perspective.cs +++ b/src/PixelFarm/PixelFarm.Vectors_SH/3_Transform/3_Perspective.cs @@ -25,7 +25,8 @@ namespace PixelFarm.CpuBlit.VertexProcessing public class CoordTransformationChain : ICoordTransformer { - ICoordTransformer _left, _right; + readonly ICoordTransformer _left; + readonly ICoordTransformer _right; public CoordTransformationChain(ICoordTransformer left, ICoordTransformer right) { _left = left; diff --git a/src/PixelFarm/PixelFarm.Vectors_Utils_SH/6_Contours/CurveGen.cs b/src/PixelFarm/PixelFarm.Vectors_Utils_SH/6_Contours/CurveGen.cs index 6b325d246..ddbf70ce4 100644 --- a/src/PixelFarm/PixelFarm.Vectors_Utils_SH/6_Contours/CurveGen.cs +++ b/src/PixelFarm/PixelFarm.Vectors_Utils_SH/6_Contours/CurveGen.cs @@ -1,12 +1,10 @@ -#region --- License --- -/* Licensed under the MIT/X11 license. +/* Licensed under the MIT/X11 license. * Copyright (c) 2006-2008 the OpenTK Team. * This notice may not be removed from any source distribution. * See license.txt for licensing detailed licensing details. * * Contributions by Georg W�chter. */ -#endregion using PixelFarm.VectorMath; namespace PixelFarm.Contours { @@ -25,7 +23,6 @@ public static Vector2f GetPerpendicularRight(this Vector2f v) //[Serializable] struct BezierCurveCubic { - #region Fields /// /// Start anchor point. @@ -51,9 +48,7 @@ struct BezierCurveCubic /// the original curve, 5.0f i.e. stands for a curve that has always a distance /// of 5.f to the original curve at any point. public float Parallel; - #endregion - #region Constructors /// /// Constructs a new . @@ -88,9 +83,7 @@ public BezierCurveCubic(float parallel, Vector2f startAnchor, Vector2f endAnchor this.SecondControlPoint = secondControlPoint; } - #endregion - #region Functions /// /// Calculates the point with the specified t. @@ -150,7 +143,6 @@ private Vector2f CalculatePointOfDerivative(float t) // return (float)length; //} - #endregion } /// @@ -159,7 +151,6 @@ private Vector2f CalculatePointOfDerivative(float t) //[Serializable] public struct BezierCurveQuadric { - #region Fields /// /// Start anchor point. @@ -181,9 +172,7 @@ public struct BezierCurveQuadric /// the original curve, 5.0f i.e. stands for a curve that has always a distance /// of 5.f to the original curve at any point. public float Parallel; - #endregion - #region Constructors /// /// Constructs a new . @@ -214,9 +203,7 @@ public BezierCurveQuadric(float parallel, Vector2f startAnchor, Vector2f endAnch this.ControlPoint = controlPoint; } - #endregion - #region Functions /// /// Calculates the point with the specified t. @@ -273,6 +260,5 @@ public float CalculateLength(float precision) return (float)length; } - #endregion } } diff --git a/src/PixelFarm/Typography.One/NumericForNet20.cs b/src/PixelFarm/Typography.One/NumericForNet20.cs new file mode 100644 index 000000000..2583cf3c3 --- /dev/null +++ b/src/PixelFarm/Typography.One/NumericForNet20.cs @@ -0,0 +1,224 @@ +//MIT, 2015, Michael Popoloski, WinterDev +/* +MIT License +Copyright © 2006 The Mono.Xna Team + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + + +namespace System.Numerics +{ + //FOR NET20 +#if NET20 || COSMOS || DEFINE_VECTOR2 || PIXEL_FARM_NET20 || PIXEL_FARM + + public struct Vector2 + { + static Vector2 zeroVector = new Vector2(0f, 0f); + static Vector2 unitVector = new Vector2(1f, 1f); + static Vector2 unitXVector = new Vector2(1f, 0f); + static Vector2 unitYVector = new Vector2(0f, 1f); + public float X; + public float Y; + public static readonly Vector2 Zero = new Vector2(0, 0); + public Vector2(float x, float y) + { + this.X = x; + this.Y = y; + } + public static Vector2 operator +(Vector2 v1, Vector2 v2) + { + return new Vector2(v1.X + v2.X, v1.Y + v2.Y); + } + public static Vector2 operator +(Vector2 v1, float n) + { + return new Vector2(v1.X + n, v1.Y + n); + } + + public static Vector2 operator -(Vector2 v1, Vector2 v2) + { + return new Vector2(v1.X - v2.X, v1.Y - v2.Y); + } + public static Vector2 operator /(Vector2 v1, float n) + { + return new Vector2(v1.X / n, v1.Y / n); + } + public static Vector2 operator *(Vector2 v1, float n) + { + return new Vector2(v1.X * n, v1.Y * n); + } + public static Vector2 operator *(float n, Vector2 v1) + { + return new Vector2(v1.X * n, v1.Y * n); + } + public static bool operator ==(Vector2 v1, Vector2 v2) + { + return (v1.X == v2.X) && (v1.Y == v2.Y); + } + public static bool operator !=(Vector2 v1, Vector2 v2) + { + return (v1.X != v2.X) || (v1.Y != v2.Y); + } + public override int GetHashCode() + { + return base.GetHashCode(); + } + public static Vector2 Min(Vector2 value1, Vector2 value2) + { + return new Vector2( + (value1.X < value2.X) ? value1.X : value2.X, + (value1.Y < value2.Y) ? value1.Y : value2.Y + ); + } + public static Vector2 Max(Vector2 value1, Vector2 value2) + { + return new Vector2( + (value1.X > value2.X) ? value1.X : value2.X, + (value1.Y > value2.Y) ? value1.Y : value2.Y + ); + } + public override bool Equals(object obj) + { + if (obj is Vector2) + { + Vector2 v2 = (Vector2)obj; + return this == v2; + } + else + { + return false; + } + } + public static Vector2 Normalize(Vector2 value) + { + double factor = 1.0f / (double)Math.Sqrt((value.X * value.X) + (value.Y * value.Y)); + return new Vector2((float)(value.X * factor), (float)(value.Y * factor)); + //value.X *= val; + //value.Y *= val; + //return value; + } + + + public static Vector2 One + { + get { return unitVector; } + } + + public static Vector2 UnitX + { + get { return unitXVector; } + } + + public static Vector2 UnitY + { + get { return unitYVector; } + } + public static double Dot(Vector2 value1, Vector2 value2) + { + return (value1.X * value2.X) + (value1.Y * value2.Y); + } + public double Length() + { + return (double)Math.Sqrt((X * X) + (Y * Y)); + } + + public double LengthSquared() + { + return (X * X) + (Y * Y); + } +#if DEBUG + public override string ToString() + { + return "(" + X + "," + Y + ")"; + } +#endif + + + } + + public struct Matrix3x2 + { + /// + /// Gets the identity matrix. + /// + /// The identity matrix. + public readonly static Matrix3x2 Identity = new Matrix3x2(1, 0, 0, 1, 0, 0); + /// + /// Element (1,1) + /// + public float M11; + + /// + /// Element (1,2) + /// + public float M12; + + /// + /// Element (2,1) + /// + public float M21; + + /// + /// Element (2,2) + /// + public float M22; + + /// + /// Element (3,1) + /// + public float M31; + + /// + /// Element (3,2) + /// + public float M32; + + /// + /// Initializes a new instance of the struct. + /// + /// The value that will be assigned to all components. + public Matrix3x2(float value) + { + M11 = M12 = + M21 = M22 = + M31 = M32 = value; + } + + /// + /// Initializes a new instance of the struct. + /// + /// The value to assign at row 1 column 1 of the matrix. + /// The value to assign at row 1 column 2 of the matrix. + /// The value to assign at row 2 column 1 of the matrix. + /// The value to assign at row 2 column 2 of the matrix. + /// The value to assign at row 3 column 1 of the matrix. + /// The value to assign at row 3 column 2 of the matrix. + public Matrix3x2(float M11, float M12, float M21, float M22, float M31, float M32) + { + this.M11 = M11; this.M12 = M12; + this.M21 = M21; this.M22 = M22; + this.M31 = M31; this.M32 = M32; + } + } +#endif +} + + diff --git a/src/PixelFarm/Typography.One/Typography.One.csproj b/src/PixelFarm/Typography.One/Typography.One.csproj index 2b2fefc2f..9ac891fa6 100644 --- a/src/PixelFarm/Typography.One/Typography.One.csproj +++ b/src/PixelFarm/Typography.One/Typography.One.csproj @@ -11,8 +11,8 @@ Typography.One v2.0 512 - 8.0 - + 8.0 + true @@ -39,16 +39,13 @@ - - System.Numerics.ForNet20.cs - + - - + \ No newline at end of file diff --git a/src/Tests/TestSamples_Painting_Focus/3_Samples/02_AA_Demo/StrokeGenSample.cs b/src/Tests/TestSamples_Painting_Focus/3_Samples/02_AA_Demo/StrokeGenSample.cs index fc025d2fd..462a1ce39 100644 --- a/src/Tests/TestSamples_Painting_Focus/3_Samples/02_AA_Demo/StrokeGenSample.cs +++ b/src/Tests/TestSamples_Painting_Focus/3_Samples/02_AA_Demo/StrokeGenSample.cs @@ -431,7 +431,7 @@ void DrawC1(Painter p) var exampleWalker = new ExampleVxsLineDash2Walker(); exampleWalker.SetPainter(p); - _lineDashGen.GenerateDash(b.CurrentSharedVxs, exampleWalker); + _lineDashGen.CreateDash(b.CurrentSharedVxs, exampleWalker); } diff --git a/src/Tests/TestSamples_Painting_Focus/3_Samples/05_AlphaMask2/LionMask3.cs b/src/Tests/TestSamples_Painting_Focus/3_Samples/05_AlphaMask2/LionMask3.cs index 05d257ea6..704ac82db 100644 --- a/src/Tests/TestSamples_Painting_Focus/3_Samples/05_AlphaMask2/LionMask3.cs +++ b/src/Tests/TestSamples_Painting_Focus/3_Samples/05_AlphaMask2/LionMask3.cs @@ -162,7 +162,7 @@ public override void Draw(Painter p) painter.FillColor = Color.Blue; painter.FillCircle(300, 300, 100); painter.DrawImage(lionImg, 20, 20); - + painter.EnableMask = true; ////4. diff --git a/src/Tests/TestSamples_Painting_Focus/3_Samples/05_AlphaMask2/MiniAggWithTextPrinterDemo.cs b/src/Tests/TestSamples_Painting_Focus/3_Samples/05_AlphaMask2/MiniAggWithTextPrinterDemo.cs index 5a87782de..ebdd88f67 100644 --- a/src/Tests/TestSamples_Painting_Focus/3_Samples/05_AlphaMask2/MiniAggWithTextPrinterDemo.cs +++ b/src/Tests/TestSamples_Painting_Focus/3_Samples/05_AlphaMask2/MiniAggWithTextPrinterDemo.cs @@ -5,7 +5,7 @@ using Typography.Text; using Mini; -namespace PixelFarm.CpuBlit.Sample_LionAlphaMask +namespace PixelFarm.CpuBlit.TextPrinterDev { @@ -25,6 +25,7 @@ public MiniAggWithTextPrinterDemo() this.Width = 800; this.Height = 600; UserText = ""; + UseFontAtlas = true; } public override void Init() { @@ -54,6 +55,8 @@ public bool UseFontAtlas } } + + [DemoConfig] public AntialiasTechnique AntialiasTechnique { @@ -79,7 +82,9 @@ public AntialiasTechnique AntialiasTechnique void SetupFontAtlasPrinter(AggPainter p) { //use custom printer here - //_printer = new FontAtlasTextPrinter(p); + + //in this example we have 2 text printer + //1. if (_fontAtlasTextPrinter == null) { _fontAtlasTextPrinter = new FontAtlasTextPrinter(p); @@ -87,8 +92,12 @@ void SetupFontAtlasPrinter(AggPainter p) if (_vxsTextPrinter == null) { + _openFontTextServices = new OpenFontTextService(); + _vxsTextPrinter = new VxsTextSpanPrinter(p, _openFontTextServices.CreateNewServiceClient()); + _vxsTextPrinter.ChangeFont(p.CurrentFont); + _vxsTextPrinter.TextBaseline = Typography.Text.TextBaseline.Top; } _printer = (_useFontAtlas) ? @@ -106,6 +115,8 @@ public void DrawString(AggPainter painter, char[] buffer, int startAt, int len, _printer.DrawString(buffer, startAt, len, (float)x, (float)y); } + + System.Diagnostics.Stopwatch _sw1 = new System.Diagnostics.Stopwatch(); public override void Draw(Painter painter) { if (!(painter is AggPainter p)) return; @@ -129,8 +140,6 @@ public override void Draw(Painter painter) lineSpaceInPx = 16; //tmp fix } int ypos = 0; - - DrawString(p, "iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii", 10, ypos); ypos += lineSpaceInPx; //-------- @@ -148,24 +157,42 @@ public override void Draw(Painter painter) ypos += lineSpaceInPx; p.FillColor = Color.Blue; - DrawString(p, "Hello World", 10, ypos); - ypos += lineSpaceInPx; + _sw1.Reset(); + _sw1.Start(); + for (int ty = 0; ty < 400; ++ty) + { + int xpos = 10; + for (int tx = 0; tx < 20; ++tx) + { + DrawString(p, "Hello World" + ty, xpos, ypos); + xpos += 50; + } - p.FillColor = Color.Red; - DrawString(p, "Hello World", 10, ypos); - ypos += lineSpaceInPx; + ypos += lineSpaceInPx; + } + _sw1.Stop(); + long ms = _sw1.ElapsedMilliseconds; - p.FillColor = Color.Yellow; - DrawString(p, "Hello World", 10, ypos); - ypos += lineSpaceInPx; - p.FillColor = KnownColors.Gray; - DrawString(p, "Hello World", 10, ypos); - ypos += lineSpaceInPx; - p.FillColor = Color.Black; - DrawString(p, "Hello World", 10, ypos); - ypos += lineSpaceInPx; + //DrawString(p, "Hello World", 10, ypos); + //ypos += lineSpaceInPx; + + //p.FillColor = Color.Red; + //DrawString(p, "Hello World", 10, ypos); + //ypos += lineSpaceInPx; + + //p.FillColor = Color.Yellow; + //DrawString(p, "Hello World", 10, ypos); + //ypos += lineSpaceInPx; + + //p.FillColor = KnownColors.Gray; + //DrawString(p, "Hello World", 10, ypos); + //ypos += lineSpaceInPx; + + //p.FillColor = Color.Black; + //DrawString(p, "Hello World", 10, ypos); + //ypos += lineSpaceInPx; if (!string.IsNullOrEmpty(UserText)) { diff --git a/src/Tests/TestSamples_Painting_Focus/3_Samples/05_AlphaMask2/MiniAggWithTextPrinterDemo2.cs b/src/Tests/TestSamples_Painting_Focus/3_Samples/05_AlphaMask2/MiniAggWithTextPrinterDemo2.cs new file mode 100644 index 000000000..8d49b11d0 --- /dev/null +++ b/src/Tests/TestSamples_Painting_Focus/3_Samples/05_AlphaMask2/MiniAggWithTextPrinterDemo2.cs @@ -0,0 +1,173 @@ +//MIT, 2018-present, WinterDev + +using PixelFarm.Drawing; +using PixelFarm.CpuBlit.BitmapAtlas; + +using Typography.Text; +using Mini; +namespace PixelFarm.CpuBlit.TextPrinterDev +{ + + + [Info(OrderCode = "00")] + public class MiniAggWithTextPrinterDemo2 : DemoBase + { + + + TextPlatePrintHouse _printHouse = new TextPlatePrintHouse(); + FontAtlasTextPrinter _fontAtlasTextPrinter; + bool _fontAtlasPrinterReady; + public MiniAggWithTextPrinterDemo2() + { + this.Width = 800; + this.Height = 600; + _printHouse.Setup(800, 600); + + } + public override void Init() + { + } + //void DrawString(AggPainter p, string text, double x, double y) + //{ + // if (text != null) + // { + // DrawString(p, text.ToCharArray(), 0, text.Length, x, y); + // } + //} + + void SetupFontAtlasPrinter(AggPainter p) + { + //use custom printer here + + //in this example we have 2 text printer + //1. + if (_fontAtlasTextPrinter == null) + { + _fontAtlasTextPrinter = new FontAtlasTextPrinter(p); + _fontAtlasTextPrinter.ChangeFont(p.CurrentFont); + + p.TextPrinter = _fontAtlasTextPrinter; + } + _fontAtlasPrinterReady = true; + _printHouse.SetFont(p.CurrentFont); + } + + System.Diagnostics.Stopwatch _sw1 = new System.Diagnostics.Stopwatch(); + + System.Collections.Generic.List _stringList; + public override void Draw(Painter painter) + { + if (!(painter is AggPainter p)) return; + //Print1(p); + //---------------- + + if (!_fontAtlasPrinterReady) + { + SetupFontAtlasPrinter(p); + } + p.RenderQuality = RenderQuality.HighQuality; + p.Orientation = PixelFarm.Drawing.RenderSurfaceOriginKind.LeftBottom; + + //clear the image to white + // draw a circle + p.Clear(Drawing.Color.White); + p.FillColor = Color.Black; + + _sw1.Reset(); + _sw1.Start(); + + int lineSpaceInPx = 18;// p.CurrentLineSpaceHeight; + if (_stringList == null) + { + //init once + _stringList = new System.Collections.Generic.List(); + for (int ty = 0; ty < 400; ++ty) + { + for (int tx = 0; tx < 20; ++tx) + { + //DrawString(p, "Hello World" + ty, xpos, ypos); + RenderVxFormattedString fmtstr = _printHouse.CreateRenderVxFormattedString("Hello Word" + ty); + _stringList.Add(fmtstr); + } + } + } + + int ypos = 0; + _sw1.Stop(); + long ms1 = _sw1.ElapsedMilliseconds; + + _sw1.Reset(); + _sw1.Start(); + + p.FillColor = Color.Blue; + ypos = 0; + int mm = 0; + + for (int ty = 0; ty < 400; ++ty) + { + int xpos = 10; + for (int tx = 0; tx < 20; ++tx) + { + AggRenderVxFormattedString fmtstr = (AggRenderVxFormattedString)_stringList[mm]; + if (fmtstr.IsDelay) + { + if (fmtstr.State == RenderVxFormattedString.VxState.NoStrip) + { + _printHouse.PrepareFormattedString(fmtstr); + } + } + + p.DrawString(fmtstr, xpos, ypos); + + xpos += 50; + mm++; + } + ypos += lineSpaceInPx; + } + + _sw1.Stop(); + + long ms2 = _sw1.ElapsedMilliseconds; + } + + + class TextPlatePrintHouse + { + MemBitmap _plate; + AggPainter _painter; + FontAtlasTextPrinter _printer; + public TextPlatePrintHouse() + { + + } + + + public RenderVxFormattedString CreateRenderVxFormattedString(string str, bool delay = false) + { + return _painter.CreateRenderVx(str, delay); + } + public void PrepareFormattedString(AggRenderVxFormattedString fmtstr) + { + _printer.PrepareStringForRenderVx(fmtstr); + } + public void SetFont(RequestFont font) + { + _painter.CurrentFont = font; + } + public void Setup(int w, int h) + { + if (_plate != null) { return; } + _plate = new MemBitmap(w, h); + AggRenderSurface renderSx = new AggRenderSurface(); + renderSx.AttachDstBitmap(_plate); + _painter = new AggPainter(renderSx); + _painter.CurrentFont = new RequestFont("Source Sans Pro", 10); + _painter.Clear(Color.White); + // + + _printer = new FontAtlasTextPrinter(_painter); + _painter.TextPrinter = _printer; + } + } + } +} diff --git a/src/Tests/TestSamples_Painting_Focus/3_Samples/10_Polygons/PolygonShopDemo.cs b/src/Tests/TestSamples_Painting_Focus/3_Samples/10_Polygons/PolygonShopDemo.cs index 614eebefc..4977ffc6d 100644 --- a/src/Tests/TestSamples_Painting_Focus/3_Samples/10_Polygons/PolygonShopDemo.cs +++ b/src/Tests/TestSamples_Painting_Focus/3_Samples/10_Polygons/PolygonShopDemo.cs @@ -155,15 +155,8 @@ public static VertexStore BuildRoundCornerPolygon2() arc.Init(50, 50, 10, 20, Math.PI, 0); arc.SetStartEndLimit(40, 50, 60, 50); - foreach (VertexData vertexData in arc.GetVertexIter()) - { - if (VertexHelper.IsEmpty(vertexData.command)) - { - break; - } - v1.AddVertex(vertexData.x, vertexData.y, vertexData.command); - } - + + arc.MakeVxs(v1); //-------------------------- v1.ScaleToNewVxs(3, v2); flattener.MakeVxs(v2, v3); @@ -448,7 +441,6 @@ public override void Draw(Painter p) selectedVxs.RotateDegToNewVxs(i * (360 / 8), v1); p.Fill(v1); - v1.Clear(); } diff --git a/src/Tests/TestSamples_Painting_Focus/Sample04/T405_DrawString.cs b/src/Tests/TestSamples_Painting_Focus/Sample04/T405_DrawString.cs index 46b370593..12673c6da 100644 --- a/src/Tests/TestSamples_Painting_Focus/Sample04/T405_DrawString.cs +++ b/src/Tests/TestSamples_Painting_Focus/Sample04/T405_DrawString.cs @@ -13,6 +13,8 @@ public class T405_DrawString : DemoBase //HarfBuzzShapingService hbShapingService; PixelFarm.Drawing.RequestFont _font1; PixelFarm.Drawing.RequestFont _font2; + float _font1_h; + float _font2_h; protected override void OnReadyForInitGLShaderProgram() { @@ -22,6 +24,9 @@ protected override void OnPainterReady(Painter painter) _font1 = new PixelFarm.Drawing.RequestFont("tahoma", 15); _font2 = new PixelFarm.Drawing.RequestFont("tahoma", 11); + _font1_h = Typography.Text.GlobalTextService.TxtClient.MeasureBlankLineHeight(_font1); + _font2_h = Typography.Text.GlobalTextService.TxtClient.MeasureBlankLineHeight(_font2); + painter.UseLcdEffectSubPixelRendering = true; painter.CurrentFont = _font1; } @@ -41,7 +46,7 @@ public override void Draw(Painter p) //string test_str = "ปู่"; //string test_str = "ก็"; //string test_str = "example"; - string test_str = "ex"; + string test_str = "jhPfmnpqOo"; //string test_str = "A"; //string test_str = "012345"; //string test_str = "กิน"; @@ -50,36 +55,52 @@ public override void Draw(Painter p) p.FillColor = PixelFarm.Drawing.Color.Red; p.UseLcdEffectSubPixelRendering = true; - int n = 50; + int n = 3; float xpos2 = 0; + float y_pos = 0; + for (int i = 0; i < n; i++) { xpos2 += 1f; // p.DrawString(test_str, i * 10, i * 10); float x_pos = xpos2; - float y_pos = i * 20; - p.FillRect(x_pos, y_pos, x_pos + 5, y_pos + 5); + + + p.FillColor = Color.Yellow; + p.FillRect(x_pos, y_pos, 200, _font1_h); //draw 5x5px marker + + p.FillColor = Color.Red; + p.FillRect(x_pos, y_pos, 5, 5); //draw 5x5px marker + + y_pos += _font1_h; } p.FillColor = PixelFarm.Drawing.Color.Black; + xpos2 = 0; + y_pos = 0; for (int i = 0; i < n; i++) { xpos2 += 1f; float x_pos = xpos2;//i + .1f; - float y_pos = i * 20; + //p.DrawString("(" + x_pos + "," + y_pos + ")", x_pos, y_pos); - if ((i % 2) == 0) - { - p.CurrentFont = _font1; - } - else - { - p.CurrentFont = _font2; - } + //if ((i % 2) == 0) + //{ + p.CurrentFont = _font1; p.DrawString(test_str, x_pos, y_pos); + y_pos += _font1_h; + + //} + //else + //{ + // p.CurrentFont = _font2; + // p.DrawString(test_str, x_pos, y_pos); + // y_pos += _font2_h; + //} + } - + } } diff --git a/src/Tests/TestSamples_Painting_Focus/TestSamples_Painting_Focus.csproj b/src/Tests/TestSamples_Painting_Focus/TestSamples_Painting_Focus.csproj index 5b964b911..79402f86a 100644 --- a/src/Tests/TestSamples_Painting_Focus/TestSamples_Painting_Focus.csproj +++ b/src/Tests/TestSamples_Painting_Focus/TestSamples_Painting_Focus.csproj @@ -11,7 +11,7 @@ TestSamples_Painting_Focus v2.0 512 - 8.0 + 8.0 @@ -71,6 +71,7 @@ + @@ -159,9 +160,9 @@ {12bd3faf-a10b-4e38-9337-f5b28c6543b4} PaintLab.Svg.One - - {662f2274-d6f8-413a-a908-1b2f10c01348} - PixelFarm.One.HtmlRenderer + + {5b9fe9f1-12ce-4775-bcef-0ad3cb614ee5} + PixelFarm.One {9060957d-ff0b-4b14-bb87-ee24b5170365} diff --git a/src/Tests/TestSamples_RenderTreeFocus/Demo2/2.1_Demo_SingleLineTextBox.cs b/src/Tests/TestSamples_RenderTreeFocus/Demo2/2.1_Demo_SingleLineTextBox.cs index 1dd1f0a85..e65734cd0 100644 --- a/src/Tests/TestSamples_RenderTreeFocus/Demo2/2.1_Demo_SingleLineTextBox.cs +++ b/src/Tests/TestSamples_RenderTreeFocus/Demo2/2.1_Demo_SingleLineTextBox.cs @@ -1,5 +1,5 @@ //Apache2, 2014-present, WinterDev - +using LayoutFarm.TextFlow; namespace LayoutFarm { [DemoNote("2.1 SingleLineText")] @@ -10,7 +10,8 @@ protected override void OnStart(AppHost host) //simple textbox var reqFont = new PixelFarm.Drawing.RequestFont("Sarabun", 18); var textbox = new LayoutFarm.CustomWidgets.TextBox(200, 30, false); - var textSpanStyle = new TextEditing.TextSpanStyle() { + var textSpanStyle = new TextSpanStyle() + { ReqFont = reqFont, FontColor = new PixelFarm.Drawing.Color(255, 0, 0) }; @@ -24,7 +25,8 @@ protected override void OnStart(AppHost host) //-------------- //mask text box var maskTextBox = new LayoutFarm.CustomWidgets.MaskTextBox(200, 30); - var textSpanStyle2 = new TextEditing.TextSpanStyle() { + var textSpanStyle2 = new TextSpanStyle() + { ReqFont = reqFont, FontColor = PixelFarm.Drawing.Color.Black }; diff --git a/src/Tests/TestSamples_RenderTreeFocus/Demo2/2.2_Demo_MultilineTextBox.cs b/src/Tests/TestSamples_RenderTreeFocus/Demo2/2.2_Demo_MultilineTextBox.cs index ebf13e45d..4dc941367 100644 --- a/src/Tests/TestSamples_RenderTreeFocus/Demo2/2.2_Demo_MultilineTextBox.cs +++ b/src/Tests/TestSamples_RenderTreeFocus/Demo2/2.2_Demo_MultilineTextBox.cs @@ -10,7 +10,7 @@ protected override void OnStart(AppHost host) { var reqFont1 = new PixelFarm.Drawing.RequestFont("Sarabun", 14); var textbox1 = new LayoutFarm.CustomWidgets.TextBox(400, 100, true); - var style1 = new TextEditing.TextSpanStyle(); + var style1 = new TextFlow.TextSpanStyle(); style1.ReqFont = reqFont1; //test with various font style style1.FontColor = new PixelFarm.Drawing.Color(0, 0, 0); @@ -33,7 +33,7 @@ protected override void OnStart(AppHost host) // textbox2.TextSplitter = textSplitter; // textbox2.Text = "Hello World!"; //} - + } } } \ No newline at end of file diff --git a/src/Tests/TestSamples_RenderTreeFocus/Demo2/2.3_Demo_SingleLineTextBox_WithSuggestion.cs b/src/Tests/TestSamples_RenderTreeFocus/Demo2/2.3_Demo_SingleLineTextBox_WithSuggestion.cs index a2f57c333..aae28c81b 100644 --- a/src/Tests/TestSamples_RenderTreeFocus/Demo2/2.3_Demo_SingleLineTextBox_WithSuggestion.cs +++ b/src/Tests/TestSamples_RenderTreeFocus/Demo2/2.3_Demo_SingleLineTextBox_WithSuggestion.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using PixelFarm.Drawing; using LayoutFarm.UI; +using LayoutFarm.TextFlow; namespace LayoutFarm { [DemoNote("2.3 SingleLineText_WithSuggestion")] @@ -17,7 +18,7 @@ protected override void OnStart(AppHost host) { _textbox = new LayoutFarm.CustomWidgets.TextBox(400, 30, false); _textbox.SetLocation(20, 20); - var style2 = new TextEditing.TextSpanStyle(); + var style2 = new TextSpanStyle(); style2.ReqFont = new PixelFarm.Drawing.RequestFont("tahoma", 14); style2.FontColor = new PixelFarm.Drawing.Color(0, 0, 0); _textbox.DefaultSpanStyle = style2; @@ -29,11 +30,11 @@ protected override void OnStart(AppHost host) _listbox.Visible = false; //------------------------------------ //create special text surface listener - var textSurfaceListener = new LayoutFarm.TextEditing.TextSurfaceEventListener(); + var textSurfaceListener = new TextSurfaceEventListener(); textSurfaceListener.CharacterAdded += (s, e) => UpdateSuggestionList(); textSurfaceListener.CharacterRemoved += (s, e) => UpdateSuggestionList(); - textSurfaceListener.PreviewArrowKeyDown += new EventHandler(textSurfaceListener_PreviewArrowKeyDown); - textSurfaceListener.PreviewEnterKeyDown += new EventHandler(textSurfaceListener_PreviewEnterKeyDown); + textSurfaceListener.PreviewArrowKeyDown += textSurfaceListener_PreviewArrowKeyDown; + textSurfaceListener.PreviewEnterKeyDown += textSurfaceListener_PreviewEnterKeyDown; _textbox.TextEventListener = textSurfaceListener; //------------------------------------ host.AddChild(_textbox); @@ -43,7 +44,7 @@ protected override void OnStart(AppHost host) } - void textSurfaceListener_PreviewArrowKeyDown(object sender, TextEditing.TextDomEventArgs e) + void textSurfaceListener_PreviewArrowKeyDown(object sender, TextDomEventArgs e) { //update selection in list box switch (e.Key) @@ -66,7 +67,7 @@ void textSurfaceListener_PreviewArrowKeyDown(object sender, TextEditing.TextDomE break; } } - void textSurfaceListener_PreviewEnterKeyDown(object sender, TextEditing.TextDomEventArgs e) + void textSurfaceListener_PreviewEnterKeyDown(object sender, TextDomEventArgs e) { //accept selected text @@ -91,6 +92,8 @@ static string GetString(char[] buffer, LayoutFarm.Composers.TextSplitBounds boun return new string(buffer, bound.startIndex, bound.length); } + + string _currentLocalText = null; void UpdateSuggestionList() { @@ -105,7 +108,11 @@ void UpdateSuggestionList() //------------------------------------------------------------------------- //simple parse ... //In this example all country name start with Captial letter so ... - string currentTextSpanText = _textbox.CurrentTextSpan.GetText().ToUpper(); + + + + string currentTextSpanText = _textbox.CurrentTextSpan.GetUpperString(); + //analyze content char[] textBuffer = currentTextSpanText.ToCharArray(); var results = new List(); diff --git a/src/Tests/TestSamples_RenderTreeFocus/Demo2/2.5_Demo_MultiLineTextBox_WithSugggestion.cs b/src/Tests/TestSamples_RenderTreeFocus/Demo2/2.5_Demo_MultiLineTextBox_WithSugggestion.cs index 34acf712d..710b053fc 100644 --- a/src/Tests/TestSamples_RenderTreeFocus/Demo2/2.5_Demo_MultiLineTextBox_WithSugggestion.cs +++ b/src/Tests/TestSamples_RenderTreeFocus/Demo2/2.5_Demo_MultiLineTextBox_WithSugggestion.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using PixelFarm.Drawing; using LayoutFarm.UI; +using LayoutFarm.TextFlow; namespace LayoutFarm { [DemoNote("2.5 MultiLineText_WithSuggestion")] @@ -18,7 +19,7 @@ protected override void OnStart(AppHost host) _textbox = new LayoutFarm.CustomWidgets.TextBox(400, 300, true); _textbox.SetLocation(20, 20); - var style1 = new TextEditing.TextSpanStyle(); + var style1 = new TextSpanStyle(); style1.ReqFont = new PixelFarm.Drawing.RequestFont("tahoma", 10); style1.FontColor = new PixelFarm.Drawing.Color(0, 0, 0); _textbox.DefaultSpanStyle = style1; @@ -30,11 +31,11 @@ protected override void OnStart(AppHost host) _listbox.Visible = false; //------------------------------------ //create special text surface listener - var textSurfaceListener = new LayoutFarm.TextEditing.TextSurfaceEventListener(); + var textSurfaceListener = new TextSurfaceEventListener(); textSurfaceListener.CharacterAdded += (s, e) => UpdateSuggestionList(); textSurfaceListener.CharacterRemoved += (s, e) => UpdateSuggestionList(); - textSurfaceListener.PreviewArrowKeyDown += new EventHandler(textSurfaceListener_PreviewArrowKeyDown); - textSurfaceListener.PreviewEnterKeyDown += new EventHandler(textSurfaceListener_PreviewEnterKeyDown); + textSurfaceListener.PreviewArrowKeyDown += textSurfaceListener_PreviewArrowKeyDown; + textSurfaceListener.PreviewEnterKeyDown += textSurfaceListener_PreviewEnterKeyDown; _textbox.TextEventListener = textSurfaceListener; //------------------------------------ host.AddChild(_textbox); @@ -42,7 +43,7 @@ protected override void OnStart(AppHost host) //------------------------------------ BuildSampleCountryList(); } - void textSurfaceListener_PreviewArrowKeyDown(object sender, TextEditing.TextDomEventArgs e) + void textSurfaceListener_PreviewArrowKeyDown(object sender, TextDomEventArgs e) { //update selection in list box switch (e.Key) @@ -69,7 +70,7 @@ void textSurfaceListener_PreviewArrowKeyDown(object sender, TextEditing.TextDomE break; } } - void textSurfaceListener_PreviewEnterKeyDown(object sender, TextEditing.TextDomEventArgs e) + void textSurfaceListener_PreviewEnterKeyDown(object sender, TextDomEventArgs e) { //accept selected text if (!_listbox.Visible || _listbox.SelectedIndex < 0) @@ -116,7 +117,7 @@ void UpdateSuggestionList() //find suggestion words _currentLocalText = null; _listbox.ClearItems(); - TextEditing.Run currentSpan = _textbox.CurrentTextSpan; + Run currentSpan = _textbox.CurrentTextSpan; if (currentSpan == null) { _listbox.Visible = false; @@ -131,7 +132,7 @@ void UpdateSuggestionList() //int startAt, len; //textbox.FindCurrentUnderlyingWord(out startAt, out len); - string currentTextSpanText = currentSpan.GetText().ToUpper(); + string currentTextSpanText = currentSpan.GetUpperString(); //analyze content char[] textBuffer = currentTextSpanText.ToCharArray(); _textSplitBoundsList.Clear(); diff --git a/src/Tests/TestSamples_RenderTreeFocus/Demo2/2.6_Demo_MultiLineText_WithSuggestionPopupWin.cs b/src/Tests/TestSamples_RenderTreeFocus/Demo2/2.6_Demo_MultiLineText_WithSuggestionPopupWin.cs index 04d15c821..5ba4f7b8b 100644 --- a/src/Tests/TestSamples_RenderTreeFocus/Demo2/2.6_Demo_MultiLineText_WithSuggestionPopupWin.cs +++ b/src/Tests/TestSamples_RenderTreeFocus/Demo2/2.6_Demo_MultiLineText_WithSuggestionPopupWin.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using PixelFarm.Drawing; using LayoutFarm.UI; +using LayoutFarm.TextFlow; namespace LayoutFarm { [DemoNote("2.6 Demo_MultiLineText_WithSuggestionPopupWin")] @@ -19,7 +20,7 @@ protected override void OnStart(AppHost host) { _textbox = new LayoutFarm.CustomWidgets.TextBox(400, 300, true); _textbox.SetLocation(20, 20); - var style1 = new TextEditing.TextSpanStyle(); + var style1 = new TextSpanStyle(); style1.ReqFont = new PixelFarm.Drawing.RequestFont("tahoma", 14); style1.FontColor = new PixelFarm.Drawing.Color(0, 0, 0); _textbox.DefaultSpanStyle = style1; @@ -27,16 +28,16 @@ protected override void OnStart(AppHost host) var textSplitter = new CustomWidgets.ContentTextSplitter(); _textbox.TextSplitter = textSplitter; _sgBox = new SuggestionWindowMx(300, 200); - _sgBox.UserConfirmSelectedItem += new EventHandler(sgBox_UserConfirmSelectedItem); - _sgBox.ListItemKeyboardEvent += new EventHandler(sgBox_ListItemKeyboardEvent); + _sgBox.UserConfirmSelectedItem += sgBox_UserConfirmSelectedItem; + _sgBox.ListItemKeyboardEvent += sgBox_ListItemKeyboardEvent; _sgBox.Hide(); //------------------------------------ //create special text surface listener - var textSurfaceListener = new LayoutFarm.TextEditing.TextSurfaceEventListener(); + var textSurfaceListener = new TextSurfaceEventListener(); textSurfaceListener.CharacterAdded += (s, e) => UpdateSuggestionList(); textSurfaceListener.CharacterRemoved += (s, e) => UpdateSuggestionList(); - textSurfaceListener.PreviewArrowKeyDown += new EventHandler(textSurfaceListener_PreviewArrowKeyDown); - textSurfaceListener.PreviewEnterKeyDown += new EventHandler(textSurfaceListener_PreviewEnterKeyDown); + textSurfaceListener.PreviewArrowKeyDown += textSurfaceListener_PreviewArrowKeyDown; + textSurfaceListener.PreviewEnterKeyDown += textSurfaceListener_PreviewEnterKeyDown; _textbox.TextEventListener = textSurfaceListener; //------------------------------------ @@ -79,7 +80,7 @@ void sgBox_ListItemKeyboardEvent(object sender, UIKeyEventArgs e) } - void textSurfaceListener_PreviewArrowKeyDown(object sender, TextEditing.TextDomEventArgs e) + void textSurfaceListener_PreviewArrowKeyDown(object sender, TextDomEventArgs e) { //update selection in list box switch (e.Key) @@ -104,7 +105,7 @@ void textSurfaceListener_PreviewArrowKeyDown(object sender, TextEditing.TextDomE break; } } - void textSurfaceListener_PreviewEnterKeyDown(object sender, TextEditing.TextDomEventArgs e) + void textSurfaceListener_PreviewEnterKeyDown(object sender, TextDomEventArgs e) { //accept selected text if (!_sgBox.Visible || _sgBox.SelectedIndex < 0) @@ -148,7 +149,7 @@ void UpdateSuggestionList() //------------------------------------------------------------------------- //sample parse ... //In this example all country name start with Captial letter so ... - string currentTextSpanText = _textbox.CurrentTextSpan.GetText().ToUpper(); + string currentTextSpanText = _textbox.CurrentTextSpan.GetUpperString(); //analyze content var textBuffer = currentTextSpanText.ToCharArray(); var results = new List(); diff --git a/src/Tests/TestSamples_RenderTreeFocus/TestSamples_RenderTreeFocus.csproj b/src/Tests/TestSamples_RenderTreeFocus/TestSamples_RenderTreeFocus.csproj index 0c1a894c5..714b87b78 100644 --- a/src/Tests/TestSamples_RenderTreeFocus/TestSamples_RenderTreeFocus.csproj +++ b/src/Tests/TestSamples_RenderTreeFocus/TestSamples_RenderTreeFocus.csproj @@ -11,7 +11,7 @@ Test_RenderTreeFocusExamples v2.0 512 - 8.0 + 8.0 true @@ -78,13 +78,13 @@ {f5a89623-87b9-42a3-a58c-abee7c9bbca2} MiniOpenTK_Net20 - - {12bd3faf-a10b-4e38-9337-f5b28c6543b4} - PaintLab.Svg.One + + {466dd2ae-eadc-4e20-82b3-da6d018006c5} + PaintLab.Svg - - {662f2274-d6f8-413a-a908-1b2f10c01348} - PixelFarm.One.HtmlRenderer + + {48687c19-8f1a-46a5-8a3a-31c3abd78b5d} + PixelFarm.One {9060957d-ff0b-4b14-bb87-ee24b5170365} diff --git a/src/Tests/Test_GlyphTess.MiniAggWinForms/Test_GlyphTess.MiniAggWinForms.csproj b/src/Tests/Test_GlyphTess.MiniAggWinForms/Test_GlyphTess.MiniAggWinForms.csproj index 1f9b19557..cb508650b 100644 --- a/src/Tests/Test_GlyphTess.MiniAggWinForms/Test_GlyphTess.MiniAggWinForms.csproj +++ b/src/Tests/Test_GlyphTess.MiniAggWinForms/Test_GlyphTess.MiniAggWinForms.csproj @@ -10,7 +10,7 @@ Test_WinForm_TessGlyph v2.0 512 - 8.0 + 8.0 @@ -85,9 +85,9 @@ - - {662f2274-d6f8-413a-a908-1b2f10c01348} - PixelFarm.One.HtmlRenderer + + {48687c19-8f1a-46a5-8a3a-31c3abd78b5d} + PixelFarm.One diff --git a/src/PixelFarm/PaintLab.AppHost/RelativePathBuilder.cs b/src/Tests/Test_MiniAgg_GLES_Painting/0_Start/RelativePathBuilder.cs similarity index 100% rename from src/PixelFarm/PaintLab.AppHost/RelativePathBuilder.cs rename to src/Tests/Test_MiniAgg_GLES_Painting/0_Start/RelativePathBuilder.cs diff --git a/src/Tests/Test_MiniAgg_GLES_Painting/Properties/Settings.Designer.cs b/src/Tests/Test_MiniAgg_GLES_Painting/Properties/Settings.Designer.cs index 2c80e0ad4..cb95f9b1a 100644 --- a/src/Tests/Test_MiniAgg_GLES_Painting/Properties/Settings.Designer.cs +++ b/src/Tests/Test_MiniAgg_GLES_Painting/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace Test_MiniAgg_GLES_Painting.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.5.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); diff --git a/src/Tests/Test_MiniAgg_GLES_Painting/Test_MiniAgg_GLES_Painting.csproj b/src/Tests/Test_MiniAgg_GLES_Painting/Test_MiniAgg_GLES_Painting.csproj index d9d64d066..82502940c 100644 --- a/src/Tests/Test_MiniAgg_GLES_Painting/Test_MiniAgg_GLES_Painting.csproj +++ b/src/Tests/Test_MiniAgg_GLES_Painting/Test_MiniAgg_GLES_Painting.csproj @@ -14,7 +14,7 @@ 512 - 8.0 + 8.0 AnyCPU @@ -56,6 +56,7 @@ + Form @@ -163,9 +164,9 @@ {12bd3faf-a10b-4e38-9337-f5b28c6543b4} PaintLab.Svg.One - - {662f2274-d6f8-413a-a908-1b2f10c01348} - PixelFarm.One.HtmlRenderer + + {48687c19-8f1a-46a5-8a3a-31c3abd78b5d} + PixelFarm.One {9060957d-ff0b-4b14-bb87-ee24b5170365} diff --git a/src/Tests/Test_RenderTreeFocus/0_Start/Program.cs b/src/Tests/Test_RenderTreeFocus/0_Start/Program.cs index 2b6aee42f..d402a2590 100644 --- a/src/Tests/Test_RenderTreeFocus/0_Start/Program.cs +++ b/src/Tests/Test_RenderTreeFocus/0_Start/Program.cs @@ -1,6 +1,9 @@ //Apache2, 2014-present, WinterDev + +using PixelFarm.Contours; using System; +using Typography.Text; namespace TestGraphicPackage2 { static class Program @@ -8,7 +11,7 @@ static class Program [STAThread] static void Main(string[] args) - { + { PixelFarm.Platforms.StorageService.RegisterProvider(new YourImplementation.LocalFileStorageProvider("")); @@ -19,7 +22,7 @@ static void Main(string[] args) //string typographyDir = @"brkitr_src/dictionaries"; //string icu_datadir = YourImplementation.RelativePathBuilder.SearchBackAndBuildFolderPath(System.IO.Directory.GetCurrentDirectory(), "PixelFarm", @"..\Typography\Typography.TextBreak\icu62\brkitr"); - + dbugTestBreak(); string icu_datadir = "brkitr"; //see brkitr folder, we link data from Typography project and copy to output if newer if (!System.IO.Directory.Exists(icu_datadir)) { @@ -36,5 +39,135 @@ static void Main(string[] args) //load demo list from specific asm YourImplementation.TestBedStartup.RunDemoList(typeof(LayoutFarm.Demo_SingleButton).Assembly); } + +#if DEBUG + static void dbugTestBreak() + { + + + + + //string msg = "aBこん😁"; + //string msg = "1😁"; + string msg = "1😁\r\n\r\n\r\nxyz"; + + //System.IO.StringReader rre = new System.IO.StringReader(msg); + + //string ln = rre.ReadLine(); + //while (ln != null) + //{ + // ln = rre.ReadLine(); + //} + + + //TextBufferSpan buff; + char[] utf16 = msg.ToCharArray(); + + char[] x1 = "😁".ToCharArray(); + int utf32_x1 = char.ConvertToUtf32(x1[0], x1[1]); + + //https://www.unicode.org/faq/utf_bom.html#utf16-1 + //the first snippet calculates the high (or leading) surrogate from a character code C. + + // const UTF16 HI_SURROGATE_START = 0xD800 + + // UTF16 X = (UTF16) C; + // UTF32 U = (C >> 16) & ((1 << 5) - 1); + // UTF16 W = (UTF16) U - 1; + // UTF16 HiSurrogate = HI_SURROGATE_START | (W << 6) | X >> 10; + + //where X, U and W correspond to the labels used in Table 3-5 UTF-16 Bit Distribution. The next snippet does the same for the low surrogate. + + // const UTF16 LO_SURROGATE_START = 0xDC00 + + // UTF16 X = (UTF16) C; + // UTF16 LoSurrogate = (UTF16) (LO_SURROGATE_START | X & ((1 << 10) - 1)); + + //Finally, the reverse, where hi and lo are the high and low surrogate, and C the resulting character + + // UTF32 X = (hi & ((1 << 6) -1)) << 10 | lo & ((1 << 10) -1); + // UTF32 W = (hi >> 6) & ((1 << 5) - 1); + // UTF32 U = W + 1; + + // UTF32 C = U << 16 | X; + + //------------------ + // constants + const int LEAD_OFFSET = 0xD800 - (0x10000 >> 10); + const int SURROGATE_OFFSET = 0x10000 - (0xD800 << 10) - 0xDC00; + + //from codepoint to upper and lower + ushort lead = (ushort)(LEAD_OFFSET + (utf32_x1 >> 10)); + ushort trail = (ushort)(0xDC00 + (utf32_x1 & 0x3FF)); + + //compute back + int codepoint_x = (lead << 10) + trail + SURROGATE_OFFSET; + //UTF32 codepoint = (lead << 10) + trail + SURROGATE_OFFSET; + + + + char x1_0 = (char)(utf32_x1 >> 16); + char x1_1 = (char)(utf32_x1); + + + int[] utf32 = GetUtf32Buffer(msg, out int utf32Len); + var reader = new Typography.TextBreak.InputReader(utf32, 0, utf32Len); + //var reader = new Typography.TextBreak.InputReader(utf16); + + while (reader.ReadLine( + out int begin, + out int len, + out Typography.TextBreak.InputReader.LineEnd endlineWith)) + { + System.Diagnostics.Debug.WriteLine(begin + "," + len); + } + + + //buff = new TextBufferSpan(utf32, 1, utf32Len - 1); + ////buff = new TextBufferSpan(msg_buffer, 1, 2); + //Typography.TextLayout.LayoutWordVisitor visitor = new Typography.TextLayout.LayoutWordVisitor(); + + //var line_segs = new Typography.TextLayout.LineSegmentList(); + //visitor.SetLineSegmentList(line_segs); + + ////mew text service + //var openFontTextService = new Typography.Text.OpenFontTextService(); + //Typography.Text.GlobalTextService.TxtClient = openFontTextService.CreateNewServiceClient(); + //Typography.Text.GlobalTextService.TxtClient.BreakToLineSegments(buff, visitor); + + } + static int[] GetUtf32Buffer(string str, out int output_i) + { + char[] buffer = str.ToCharArray(); + int[] buffer2 = new int[buffer.Length]; + + + output_i = 0; + for (int i = 0; i < buffer.Length; ++i) + { + char c = buffer[i]; + if (char.IsHighSurrogate(c)) + { + if (i < buffer.Length - 1 && char.IsLowSurrogate(buffer[i + 1])) + { + buffer2[output_i] = char.ConvertToUtf32(c, buffer[i + 1]); + output_i++; + i++; + } + else + { + //error + } + } + else + { + buffer2[output_i] = c; + output_i++; + } + } + + return buffer2; + } +#endif } } diff --git a/src/Tests/Test_RenderTreeFocus/Test_RenderTree_Focus.csproj b/src/Tests/Test_RenderTreeFocus/Test_RenderTree_Focus.csproj index 01439e3f8..9bccb472c 100644 --- a/src/Tests/Test_RenderTreeFocus/Test_RenderTree_Focus.csproj +++ b/src/Tests/Test_RenderTreeFocus/Test_RenderTree_Focus.csproj @@ -11,7 +11,7 @@ Test_RenderTree_Focus v2.0 512 - 8.0 + 8.0 @@ -86,9 +86,9 @@ {12bd3faf-a10b-4e38-9337-f5b28c6543b4} PaintLab.Svg.One - - {662f2274-d6f8-413a-a908-1b2f10c01348} - PixelFarm.One.HtmlRenderer + + {48687c19-8f1a-46a5-8a3a-31c3abd78b5d} + PixelFarm.One {e906647b-3216-4cc1-b849-dd249f6737f4} diff --git a/src/Tests/WinFormTestBed2/TestBedStartup.cs b/src/Tests/WinFormTestBed2/TestBedStartup.cs index 8ebc1db3a..18a8858d0 100644 --- a/src/Tests/WinFormTestBed2/TestBedStartup.cs +++ b/src/Tests/WinFormTestBed2/TestBedStartup.cs @@ -28,16 +28,16 @@ public static void Setup() s_intalledTypefaces = new InstalledTypefaceCollection(); s_intalledTypefaces.SetFontNameDuplicatedHandler((existing, newone) => FontNameDuplicatedDecision.Skip); - s_intalledTypefaces.SetFontNotFoundHandler((InstalledTypefaceCollection collection, - string fontName, - TypefaceStyle style, - ushort weightClass, - InstalledTypeface available, - List availableList) => + s_intalledTypefaces.SetFontNotFoundHandler(req => { - //This is application specific *** - // - switch (fontName.ToUpper()) + if (req.foundSameNames != null) + { + //weight may not match-- + return InstalledTypefaceCollectionExtensions.ResolveFontWeightMissing(req, req.foundSameNames); + } + + //This is application specific *** + switch (req.fontName.ToUpper()) { default: { @@ -47,7 +47,7 @@ public static void Setup() case "SANS-SERIF": { //temp fix - InstalledTypeface ss = collection.GetInstalledTypeface("Microsoft Sans Serif", TypefaceStyle.Regular, (ushort)RequestFontWeight.Normal); + InstalledTypeface ss = req.typefaceCollection.GetInstalledTypeface("Microsoft Sans Serif", TypefaceStyle.Regular, (ushort)RequestFontWeight.Normal); if (ss != null) { return ss; @@ -57,7 +57,7 @@ public static void Setup() case "SERIF": { //temp fix - InstalledTypeface ss = collection.GetInstalledTypeface("Palatino linotype", TypefaceStyle.Regular, (ushort)RequestFontWeight.Normal); + InstalledTypeface ss = req.typefaceCollection.GetInstalledTypeface("Palatino linotype", TypefaceStyle.Regular, (ushort)RequestFontWeight.Normal); if (ss != null) { return ss; @@ -66,11 +66,11 @@ public static void Setup() break; case "TAHOMA": { - switch (style) + switch (req.style) { case TypefaceStyle.Italic: { - InstalledTypeface anotherCandidate = collection.GetInstalledTypeface(fontName, TypefaceStyle.Italic, (ushort)RequestFontWeight.Normal); + InstalledTypeface anotherCandidate = req.typefaceCollection.GetInstalledTypeface(req.fontName, TypefaceStyle.Italic, (ushort)RequestFontWeight.Normal); if (anotherCandidate != null) { return anotherCandidate; @@ -82,9 +82,9 @@ public static void Setup() break; case "MONOSPACE": //use Courier New - return collection.GetInstalledTypeface("Courier New", TypefaceStyle.Regular, (ushort)RequestFontWeight.Normal); + return req.typefaceCollection.GetInstalledTypeface("Courier New", TypefaceStyle.Regular, (ushort)RequestFontWeight.Normal); case "HELVETICA": - return collection.GetInstalledTypeface("Arial", TypefaceStyle.Regular, (ushort)RequestFontWeight.Normal); + return req.typefaceCollection.GetInstalledTypeface("Arial", TypefaceStyle.Regular, (ushort)RequestFontWeight.Normal); } return null; }); diff --git a/src/Tests/WinFormTestBed2/YourImplementation.WinForms/FormCanvasHelper.cs b/src/Tests/WinFormTestBed2/YourImplementation.WinForms/FormCanvasHelper.cs index a03893543..a8c97dc1c 100644 --- a/src/Tests/WinFormTestBed2/YourImplementation.WinForms/FormCanvasHelper.cs +++ b/src/Tests/WinFormTestBed2/YourImplementation.WinForms/FormCanvasHelper.cs @@ -118,13 +118,13 @@ public static void CreateCanvasControlOnExistingControl( InitWinform(); IInstalledTypefaceProvider fontLoader = YourImplementation.CommonTextServiceSetup.FontLoader; //2. - + switch (internalViewportKind) { default: //gdi, gdi on gles - + break; case InnerViewportKind.PureAgg: @@ -136,8 +136,30 @@ public static void CreateCanvasControlOnExistingControl( PixelFarm.Drawing.GLES2.GLES2Platform.TextService = openFontTextService; - Typography.Text.GlobalTextService.TxtClient = openFontTextService.CreateNewServiceClient(); - + Typography.Text.GlobalTextService.TxtClient = openFontTextService.CreateNewServiceClient(); + { + var myAlternativeTypefaceSelector = new Typography.Text.AlternativeTypefaceSelector(); + { + var preferTypefaces = new Typography.FontCollections.PreferredTypefaceList(); + preferTypefaces.AddTypefaceName("Source Sans Pro"); + preferTypefaces.AddTypefaceName("Sarabun"); + + + myAlternativeTypefaceSelector.SetPreferredTypefaces( + new[]{Typography.TextBreak.Unicode13RangeInfoList.C0_Controls_and_Basic_Latin, + Typography.TextBreak.Unicode13RangeInfoList.C1_Controls_and_Latin_1_Supplement, + Typography.TextBreak.Unicode13RangeInfoList.Latin_Extended_A, + Typography.TextBreak.Unicode13RangeInfoList.Latin_Extended_B, + }, + preferTypefaces); + } + { + var preferTypefaces = new Typography.FontCollections.PreferredTypefaceList(); + preferTypefaces.AddTypefaceName("Twitter Color Emoji"); + myAlternativeTypefaceSelector.SetPerferredEmoji(preferTypefaces); + } + Typography.Text.GlobalTextService.TxtClient.AlternativeTypefaceSelector = myAlternativeTypefaceSelector; + } } break; } @@ -163,20 +185,29 @@ public static void CreateCanvasControlOnExistingControl( landingControl.Controls.Add(actualWinUI); - //so we create abstraction of actual UI + //so we create abstraction of actual UI IGpuOpenGLSurfaceView viewAbstraction = actualWinUI.CreateWindowWrapper(bridge); + //all GL funcs are loaded. var viewRoot = view_root = new GraphicsViewRoot( screenClientAreaRect.Width, screenClientAreaRect.Height); - +#if DEBUG + System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch(); + sw.Start(); +#endif view_root.InitRootGraphics( myRootGfx, myRootGfx.TopWinEventPortal, internalViewportKind, viewAbstraction, bridge); - + //all shaders are compiled(or loaded from cache) + //see 'EnableProgramBinaryCache' +#if DEBUG + sw.Stop(); + long ms0 = sw.ElapsedMilliseconds; +#endif //TODO: review here again myRootGfx.SetDrawboardReqDelegate(view_root.GetDrawBoard); //------ @@ -187,6 +218,7 @@ public static void CreateCanvasControlOnExistingControl( // Form ownerForm = landingControl.FindForm(); + if (ownerForm != null) { ownerForm.FormClosing += (s, e) => diff --git a/src/Tests/WinFormTestBed2/YourImplementation.WinForms/UIPlatformWinForm.cs b/src/Tests/WinFormTestBed2/YourImplementation.WinForms/UIPlatformWinForm.cs index ea53a1140..88683a48b 100644 --- a/src/Tests/WinFormTestBed2/YourImplementation.WinForms/UIPlatformWinForm.cs +++ b/src/Tests/WinFormTestBed2/YourImplementation.WinForms/UIPlatformWinForm.cs @@ -211,7 +211,8 @@ public override Image GetClipboardImage() if (System.Windows.Forms.Clipboard.GetImage() is System.Drawing.Bitmap bmp) { MemBitmap memBmp = new MemBitmap(bmp.Width, bmp.Height); - BitmapHelper.CopyFromGdiPlusBitmapSameSizeTo32BitsBuffer(bmp, memBmp); + + PixelFarm.CpuBlit.BitmapHelper.CopyFromGdiPlusBitmapSameSizeTo32BitsBuffer(bmp, memBmp); return memBmp; } return null; @@ -224,7 +225,7 @@ public override void SetClipboardImage(Image img) System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(memBmp.Width, memBmp.Height); using (TempMemPtr tmp = MemBitmap.GetBufferPtr(memBmp)) { - BitmapHelper.CopyToGdiPlusBitmapSameSize(tmp.Ptr, bmp); + PixelFarm.CpuBlit.BitmapHelper.CopyToGdiPlusBitmapSameSize(tmp.Ptr, bmp); } } } diff --git a/src/Tools/PaintLabResTool/Builders.cs b/src/Tools/PaintLabResTool/Builders.cs index 2dc99e0ab..038bf4062 100644 --- a/src/Tools/PaintLabResTool/Builders.cs +++ b/src/Tools/PaintLabResTool/Builders.cs @@ -9,6 +9,7 @@ using PixelFarm.Drawing; using PaintLab; +using Typography.OpenFont; namespace Mini { @@ -142,6 +143,7 @@ public static void BuildBitmapAtlas(AtlasProject atlasProj, Func fileList = atlasProj.Items; //1. create builder var bmpAtlasBuilder = new SimpleBitmapAtlasBuilder(); + bmpAtlasBuilder.SpaceCompactOption = SimpleBitmapAtlasBuilder.CompactOption.ArrangeByHeight; ushort index = 0; Dictionary imgDic = new Dictionary(); @@ -160,12 +162,13 @@ public static void BuildBitmapAtlas(AtlasProject atlasProj, Func selectedIt } } + struct FontAtlasBuilderHelper + { + public string TextureInfoFilename { get; set; } + public string OutputImgFilename { get; set; } + +#if DEBUG + public long dbugBuildTimeMillisec { get; set; } +#endif + public void Build( + GlyphTextureBitmapGenerator glyphTextureGen, + Typeface typeface, float fontSizeInPoints, + TextureKind textureKind, + GlyphTextureBuildDetail[] buildDetails) + { +#if DEBUG + //overall, glyph atlas generation time + System.Diagnostics.Stopwatch dbugStopWatch = new System.Diagnostics.Stopwatch(); + dbugStopWatch.Start(); +#endif + var atlasBuilder = new SimpleBitmapAtlasBuilder(); + glyphTextureGen.CreateTextureFontFromBuildDetail( + atlasBuilder, + typeface, + fontSizeInPoints, + textureKind, + buildDetails); + + //3. set information before write to font-info + atlasBuilder.SpaceCompactOption = SimpleBitmapAtlasBuilder.CompactOption.ArrangeByHeight; + atlasBuilder.SetAtlasFontInfo(typeface.Name, fontSizeInPoints); + + //4. merge all glyph in the builder into a single image + using (MemBitmap totalGlyphsImg = atlasBuilder.BuildSingleImage(true)) + { + + if (TextureInfoFilename == null) + { + //use random suffix + string random_suffix = Guid.NewGuid().ToString().Substring(0, 7); + string textureName = typeface.Name.ToLower() + "_" + random_suffix + ".info"; + string output_imgFilename = textureName + ".png"; + + TextureInfoFilename = textureName; + OutputImgFilename = output_imgFilename; + } + + + //5. save atlas info to disk + using (FileStream fs = new FileStream(TextureInfoFilename, FileMode.Create)) + { + atlasBuilder.SaveAtlasInfo(fs); + } + + //6. save total-glyph-image to disk + totalGlyphsImg.SaveImage(OutputImgFilename); + } + +#if DEBUG + dbugStopWatch.Stop(); + dbugBuildTimeMillisec = dbugStopWatch.ElapsedMilliseconds; +#endif + + } + + } } \ No newline at end of file diff --git a/src/Tools/PaintLabResTool/FormBitmapAtlasBuilder.cs b/src/Tools/PaintLabResTool/FormBitmapAtlasBuilder.cs index 4a22e495d..e2d22a55c 100644 --- a/src/Tools/PaintLabResTool/FormBitmapAtlasBuilder.cs +++ b/src/Tools/PaintLabResTool/FormBitmapAtlasBuilder.cs @@ -116,8 +116,9 @@ private void ListBox3_SelectedIndexChanged(object sender, EventArgs e) { if (listBox3.SelectedItem is string atlasFile) { - string file = Path.GetFileNameWithoutExtension(atlasFile); - TestLoadBitmapAtlas(file); + string dir = Path.GetDirectoryName(atlasFile); + string filename = Path.GetFileNameWithoutExtension(atlasFile); + TestLoadBitmapAtlas(dir + "\\" + filename); } } @@ -267,7 +268,7 @@ void TestLoadBitmapAtlas(string atlas_file) _totalAtlasImg = LoadBmp(atlas_file + ".png"); //----- - int count = _bitmapAtlas.ImgUrlDict.Count; + //int count = _bitmapAtlas.ImgUrlDict.Count; listBox2.Items.Clear(); foreach (var kv in _bitmapAtlas.ImgUrlDict) diff --git a/src/Tools/PaintLabResTool/PaintLabResTool.csproj b/src/Tools/PaintLabResTool/PaintLabResTool.csproj index 86e69cf76..0fa853866 100644 --- a/src/Tools/PaintLabResTool/PaintLabResTool.csproj +++ b/src/Tools/PaintLabResTool/PaintLabResTool.csproj @@ -10,8 +10,8 @@ PaintLabResTool v2.0 512 - 8.0 - true + 8.0 + true @@ -34,6 +34,9 @@ 4 + + ..\..\PixelFarm\PaintLab.Svg.One\bin\Debug\PaintLab.Svg.One.dll + @@ -120,13 +123,9 @@ {e5f2b317-2205-4727-92c4-6190a2fa3ddc} PaintLab.Platforms.Win32 - - {12bd3faf-a10b-4e38-9337-f5b28c6543b4} - PaintLab.Svg.One - - - {662f2274-d6f8-413a-a908-1b2f10c01348} - PixelFarm.One.HtmlRenderer + + {48687c19-8f1a-46a5-8a3a-31c3abd78b5d} + PixelFarm.One diff --git a/src/x_autogen/PixelFarm.MiniAgg.One/PixelFarm.MiniAgg.One.csproj b/src/x_autogen/PixelFarm.MiniAgg.One/PixelFarm.MiniAgg.One.csproj index 71af9799c..d2cf6f58a 100644 --- a/src/x_autogen/PixelFarm.MiniAgg.One/PixelFarm.MiniAgg.One.csproj +++ b/src/x_autogen/PixelFarm.MiniAgg.One/PixelFarm.MiniAgg.One.csproj @@ -162,7 +162,6 @@ - @@ -170,8 +169,6 @@ - - diff --git a/src/x_autogen/PixelFarm.One.HtmlRenderer/PixelFarm.One.HtmlRenderer.csproj b/src/x_autogen/PixelFarm.One.HtmlRenderer/PixelFarm.One.HtmlRenderer.csproj index d0624c562..6410cd3ca 100644 --- a/src/x_autogen/PixelFarm.One.HtmlRenderer/PixelFarm.One.HtmlRenderer.csproj +++ b/src/x_autogen/PixelFarm.One.HtmlRenderer/PixelFarm.One.HtmlRenderer.csproj @@ -360,7 +360,6 @@ - @@ -368,8 +367,6 @@ - - @@ -731,8 +728,9 @@ + + - @@ -900,6 +898,7 @@ + diff --git a/src/x_autogen/PixelFarm.One/PixelFarm.One.csproj b/src/x_autogen/PixelFarm.One/PixelFarm.One.csproj new file mode 100644 index 000000000..5bcd55f2a --- /dev/null +++ b/src/x_autogen/PixelFarm.One/PixelFarm.One.csproj @@ -0,0 +1,1074 @@ + + + + Debug + AnyCPU + 2.0 + Library + v2.0 + 512 + PixelFarm.One + 8.0 + + + true + prompt + 4 + bin\Debug\ + false + full + true + TRACE; DEBUG; PIXEL_FARM; PIXEL_FARM_NET20; NET20; MINIMAL; GLES; WIN32; GL_ENABLE; SHARPZIPLIB; + + + true + prompt + 4 + bin\Release\ + true + pdbonly + TRACE; PIXEL_FARM; PIXEL_FARM_NET20; NET20; MINIMAL; GLES; WIN32; GL_ENABLE; SHARPZIPLIB; + + + + {f5a89623-87b9-42a3-a58c-abee7c9bbca2} + MiniOpenTK_Net20 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/x_autogen2/PixelFarm.MiniAgg.One/PixelFarm.MiniAgg.One.csproj b/src/x_autogen2/PixelFarm.MiniAgg.One/PixelFarm.MiniAgg.One.csproj index 26ec50354..e35ec42d6 100644 --- a/src/x_autogen2/PixelFarm.MiniAgg.One/PixelFarm.MiniAgg.One.csproj +++ b/src/x_autogen2/PixelFarm.MiniAgg.One/PixelFarm.MiniAgg.One.csproj @@ -420,9 +420,6 @@ PixelFarm\PixelFarm.Painter_Layer2_SH\Drawing\DrawBoard.cs - - PixelFarm\PixelFarm.Painter_Layer2_SH\Drawing\ITextPrinter.cs - PixelFarm\PixelFarm.Painter_Layer2_SH\Drawing\Painter.cs @@ -444,12 +441,6 @@ PixelFarm\PixelFarm.Painter_Layer2_SH\_ESS_LINK_WITH_TY\RequestFont.cs - - PixelFarm\PixelFarm.Painter_Layer2_SH\_ESS_LINK_WITH_TY\TextBufferSpan.cs - - - PixelFarm\PixelFarm.Painter_Layer2_SH\_ESS_LINK_WITH_TY\TextSpanMeasureResult.cs - PixelFarm\PixelFarm.Vectors_SH\1_VectorMaths\AggMath.cs diff --git a/src/x_autogen2/PixelFarm.One.HtmlRenderer/PixelFarm.One.HtmlRenderer.sln b/src/x_autogen2/PixelFarm.One.HtmlRenderer/PixelFarm.One.HtmlRenderer.sln deleted file mode 100644 index 39d25b173..000000000 --- a/src/x_autogen2/PixelFarm.One.HtmlRenderer/PixelFarm.One.HtmlRenderer.sln +++ /dev/null @@ -1,25 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27428.2043 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PixelFarm.One.HtmlRenderer", "PixelFarm.One.HtmlRenderer.csproj", "{367AE189-BEDE-436C-8186-362A771F35B2}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {367AE189-BEDE-436C-8186-362A771F35B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {367AE189-BEDE-436C-8186-362A771F35B2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {367AE189-BEDE-436C-8186-362A771F35B2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {367AE189-BEDE-436C-8186-362A771F35B2}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {B6D832F7-EE8C-4EC2-975C-23F0E6AE4636} - EndGlobalSection -EndGlobal diff --git a/src/x_autogen2/PixelFarm.One.HtmlRenderer/PixelFarm.One.HtmlRenderer.csproj b/src/x_autogen2/PixelFarm.One/PixelFarm.One.csproj similarity index 98% rename from src/x_autogen2/PixelFarm.One.HtmlRenderer/PixelFarm.One.HtmlRenderer.csproj rename to src/x_autogen2/PixelFarm.One/PixelFarm.One.csproj index 95bbac805..24bdd4ed7 100644 --- a/src/x_autogen2/PixelFarm.One.HtmlRenderer/PixelFarm.One.HtmlRenderer.csproj +++ b/src/x_autogen2/PixelFarm.One/PixelFarm.One.csproj @@ -7,8 +7,9 @@ Library v2.0 512 - PixelFarm.One.HtmlRenderer + PixelFarm.One 8.0 + {48687C19-8F1A-46A5-8A3A-31C3ABD78B5D} true @@ -337,6 +338,21 @@ PixelFarm\BackEnd.Triangulation\Util\PolygonGenerator.cs + + PixelFarm\LayoutFarm.TextFlow_SH\DocumentActions.cs + + + PixelFarm\LayoutFarm.TextFlow_SH\ForwardOnlyCharSource.cs + + + PixelFarm\LayoutFarm.TextFlow_SH\ObjectPools.cs + + + PixelFarm\LayoutFarm.TextFlow_SH\PlainTextDocument.cs + + + PixelFarm\LayoutFarm.TextFlow_SH\SeletionRangeSnapshot.cs + PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\0_CustomRenderElements\CustomImageRenderBox.cs @@ -1000,9 +1016,6 @@ PixelFarm\PixelFarm.Painter_Layer2_SH\Drawing\DrawBoard.cs - - PixelFarm\PixelFarm.Painter_Layer2_SH\Drawing\ITextPrinter.cs - PixelFarm\PixelFarm.Painter_Layer2_SH\Drawing\Painter.cs @@ -1024,12 +1037,6 @@ PixelFarm\PixelFarm.Painter_Layer2_SH\_ESS_LINK_WITH_TY\RequestFont.cs - - PixelFarm\PixelFarm.Painter_Layer2_SH\_ESS_LINK_WITH_TY\TextBufferSpan.cs - - - PixelFarm\PixelFarm.Painter_Layer2_SH\_ESS_LINK_WITH_TY\TextSpanMeasureResult.cs - PixelFarm\PixelFarm.Vectors_SH\1_VectorMaths\AggMath.cs @@ -2014,9 +2021,6 @@ PixelFarm\BackEnd.TreeCollection\General\SegmentTree.cs - - PixelFarm\BackEnd.TreeCollection\PlainDocument\PlainTextDocument.cs - PixelFarm\BackEnd.TypeMirror\SimpleReflectionHelper.cs @@ -2059,12 +2063,6 @@ PixelFarm\PaintLab.RenderTree.TextSurface\1.0_Common\DoubleBufferCustomRenderBox.cs - - PixelFarm\PaintLab.RenderTree.TextSurface\1.0_Common\PlainTextDocumentHelper.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.0_Common\StringBuilderPool.cs - PixelFarm\PaintLab.RenderTree.TextSurface\1.1_Runs\CharLocation.cs @@ -2098,12 +2096,6 @@ PixelFarm\PaintLab.RenderTree.TextSurface\1.2_Lines\1_TextLine_CORE_Collection.cs - - PixelFarm\PaintLab.RenderTree.TextSurface\1.2_Lines\2_TextLine_PRIVATE_CollectionFeatures2.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.2_Lines\3_TextLine_PUBLIC_CollectionFeatures.cs - PixelFarm\PaintLab.RenderTree.TextSurface\1.2_Lines\4_TextLine_ArrangeAndResizingMechanism.cs @@ -2113,12 +2105,12 @@ PixelFarm\PaintLab.RenderTree.TextSurface\1.2_Lines\debugActivityRecorder.cs + + PixelFarm\PaintLab.RenderTree.TextSurface\1.2_Lines\RunListPool.cs + PixelFarm\PaintLab.RenderTree.TextSurface\1.2_Lines\TextLineWalker.cs - - PixelFarm\PaintLab.RenderTree.TextSurface\1.2_Lines\TextRangeCopy.cs - PixelFarm\PaintLab.RenderTree.TextSurface\1.3_Layer\ITextFlowOwner.cs @@ -2128,18 +2120,15 @@ PixelFarm\PaintLab.RenderTree.TextSurface\1.3_Layer\TextFlowLayer.cs - - PixelFarm\PaintLab.RenderTree.TextSurface\2.1_MultiLineController\DocumentActions.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\2.1_MultiLineController\TextFlowEditSession.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\2.1_MultiLineController\TextFlowSelectSession.cs - PixelFarm\PaintLab.RenderTree.TextSurface\2.1_MultiLineController\TextSurfaceEventListener.cs + + PixelFarm\PaintLab.RenderTree.TextSurface\2.1_MultiLineController\VisualTextFlowEditSession_part1.cs + + + PixelFarm\PaintLab.RenderTree.TextSurface\2.1_MultiLineController\VisualTextFlowEditSession_part2.cs + PixelFarm\PaintLab.RenderTree.TextSurface\2.2_TextRenderBox\EditorCaret.cs @@ -2614,8 +2603,8 @@ PixelFarm\PixelFarm.Drawing\7_BitmapAtlas\SimpleBitmapAtlasBuilder.cs - - Typography\Build\N20\Typography.OpenFont\System.Numerics.ForNet20.cs + + PixelFarm\Typography.One\NumericForNet20.cs Typography\PixelFarm.Typography\1_General\AlternativeTypefaceSelector.cs @@ -3130,6 +3119,12 @@ Typography\Typography.TextServices\Text\TextBufferSpan.cs + + Typography\Typography.TextServices\Text\TextBuilder.cs + + + Typography\Typography.TextServices\Text\TextCopyBuffers.cs + Typography\Typography.TextServices\Text\VirtualTextSpanPrinter.cs diff --git a/src/x_autogen_netstandard2.0/PixelFarm.MiniAgg.One/PixelFarm.MiniAgg.One.csproj b/src/x_autogen_netstandard2.0/PixelFarm.MiniAgg.One/PixelFarm.MiniAgg.One.csproj index 62c8e4dec..b5e39ae8b 100644 --- a/src/x_autogen_netstandard2.0/PixelFarm.MiniAgg.One/PixelFarm.MiniAgg.One.csproj +++ b/src/x_autogen_netstandard2.0/PixelFarm.MiniAgg.One/PixelFarm.MiniAgg.One.csproj @@ -160,7 +160,6 @@ - @@ -168,8 +167,6 @@ - - diff --git a/src/x_autogen_netstandard2.0/PixelFarm.One.HtmlRenderer/PixelFarm.One.HtmlRenderer.csproj b/src/x_autogen_netstandard2.0/PixelFarm.One.HtmlRenderer/PixelFarm.One.HtmlRenderer.csproj deleted file mode 100644 index 7fa92fefa..000000000 --- a/src/x_autogen_netstandard2.0/PixelFarm.One.HtmlRenderer/PixelFarm.One.HtmlRenderer.csproj +++ /dev/null @@ -1,1242 +0,0 @@ - - - netstandard2.0 - - - Debug - AnyCPU - 2.0 - Library - 512 - PixelFarm.One.HtmlRenderer - 8.0 - - - true - prompt - 4 - bin\Debug\ - false - full - true - TRACE; DEBUG; PIXEL_FARM; PIXEL_FARM_NET20; NET20; MINIMAL; GLES; WIN32; GL_ENABLE; SHARPZIPLIB; - - - true - prompt - 4 - bin\Release\ - true - pdbonly - TRACE; PIXEL_FARM; PIXEL_FARM_NET20; NET20; MINIMAL; GLES; WIN32; GL_ENABLE; SHARPZIPLIB; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/x_autogen_xamarin_droid/PixelFarm.One.HtmlRenderer/AndroidManifest.xml b/src/x_autogen_xamarin_droid/PixelFarm.One.HtmlRenderer/AndroidManifest.xml deleted file mode 100644 index dd9e19320..000000000 --- a/src/x_autogen_xamarin_droid/PixelFarm.One.HtmlRenderer/AndroidManifest.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/x_autogen_xamarin_droid/PixelFarm.One.HtmlRenderer/PixelFarm.One.HtmlRenderer.csproj b/src/x_autogen_xamarin_droid/PixelFarm.One.HtmlRenderer/PixelFarm.One.HtmlRenderer.csproj deleted file mode 100644 index 1636a03f7..000000000 --- a/src/x_autogen_xamarin_droid/PixelFarm.One.HtmlRenderer/PixelFarm.One.HtmlRenderer.csproj +++ /dev/null @@ -1,2781 +0,0 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - {9ef11e43-1701-4396-8835-8392d57abb70} - Library - Properties - PixelFarm.One.HtmlRenderer.Droid - PixelFarm.One.HtmlRenderer.Droid - 512 - Resources\Resource.designer.cs - Off - v8.1 - - - true - portable - false - bin\Debug\ - DEBUG;TRACE;PIXEL_FARM; PIXEL_FARM_NET20; NET20; GL_ENABLE; SHARPZIPLIB;NETSTANDARD; - prompt - 4 - true - - - pdbonly - true - bin\Release\ - TRACE;PIXEL_FARM; PIXEL_FARM_NET20; NET20; GL_ENABLE; SHARPZIPLIB;NETSTANDARD; - prompt - 4 - true - - - - - - - - - - - - - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\Color\ColorBgra.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\Color\HsvColor.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\Color\RgbColor.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\PdnResources.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\PixelOps\BinaryPixelOp.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\PixelOps\BinaryPixelOps.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\PixelOps\IPixelOp.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\PixelOps\PixelOp.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\PixelOps\UnaryPixelOp.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\PixelOps\UnaryPixelOps.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\RenderArgs.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\Renderer\GradientRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\Renderer\GradientRenderers.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\Renderer\Histogram.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\Renderer\HistogramLuminosity.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\Renderer\HistogramRGB.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\ResamplingAlgorithm.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\Scanline.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\Surface.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\UserBlendOps\UserBlendOp.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\UserBlendOps\UserBlendOps.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\UserBlendOps\UserBlendOps.Generated.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\Utility.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Blur\BrightnessAndContrastRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Blur\MotionBlurRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Blur\ZoomBlurEffRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Convolution\ColorDiffEffect.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Convolution\ConvolutionRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Convolution\EdgeDetectRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Convolution\EmbossRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Convolution\GaussainBlurRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Convolution\ReliefEffectRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Histogram\HistogramRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Histogram\MedianRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Histogram\OutlineRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Histogram\ReduceNoiseRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Histogram\SharpenRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Histogram\UnfocusRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Levels\AutoLevelRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Levels\SepiaRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Material\BlugeEffectRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Material\CloudEffect.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Material\GlowRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Material\OilPaintRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Material\PencilSketchRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Material\TileRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Material\TwistRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Others\InkSketchRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Others\JulianFractalRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Others\PerlinNoise2D.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Others\RotateAndZoomRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\PixelOps\HueAndSatRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\PixelOps\InvertColorRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\PixelOps\PosterizeRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\TransformEffect\RotateZoomEffect.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\TransformEffect\RotateZoomEffectConfigToken.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Wrap\PolarInversionEffect.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Wrap\WarpEdgeBehavior.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Wrap\WrapBasedEffRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\EffectRendererBase.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\PlatformMemory.cs - - - PixelFarm\BackEnd.Triangulation\Delaunay\AdvancingFront.cs - - - PixelFarm\BackEnd.Triangulation\Delaunay\AdvancingFrontNode.cs - - - PixelFarm\BackEnd.Triangulation\Delaunay\DelaunayTriangle.cs - - - PixelFarm\BackEnd.Triangulation\Delaunay\DTSweep.cs - - - PixelFarm\BackEnd.Triangulation\Delaunay\DTSweepConstraint.cs - - - PixelFarm\BackEnd.Triangulation\Delaunay\DTSweepContext.cs - - - PixelFarm\BackEnd.Triangulation\Delaunay\DTSweepDebugContext.cs - - - PixelFarm\BackEnd.Triangulation\Delaunay\PointOnEdgeException.cs - - - PixelFarm\BackEnd.Triangulation\P2T.cs - - - PixelFarm\BackEnd.Triangulation\Polygon\Polygon.cs - - - PixelFarm\BackEnd.Triangulation\Sets\ConstrainedPointSet.cs - - - PixelFarm\BackEnd.Triangulation\Sets\PointSet.cs - - - PixelFarm\BackEnd.Triangulation\Triangulation\ITriangulatable.cs - - - PixelFarm\BackEnd.Triangulation\Triangulation\Orientation.cs - - - PixelFarm\BackEnd.Triangulation\Triangulation\TriangulationAlgorithm.cs - - - PixelFarm\BackEnd.Triangulation\Triangulation\TriangulationContext.cs - - - PixelFarm\BackEnd.Triangulation\Triangulation\TriangulationDebugContext.cs - - - PixelFarm\BackEnd.Triangulation\Triangulation\TriangulationMode.cs - - - PixelFarm\BackEnd.Triangulation\Triangulation\TriangulationPoint.cs - - - PixelFarm\BackEnd.Triangulation\Triangulation\TriangulationUtil.cs - - - PixelFarm\BackEnd.Triangulation\Util\PointGenerator.cs - - - PixelFarm\BackEnd.Triangulation\Util\PolygonGenerator.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\0_CustomRenderElements\CustomContainerRenderBox.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\0_CustomRenderElements\CustomImageRenderBox.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\0_CustomRenderElements\CustomRenderElements.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\0_CustomRenderElements\CustomTextRun.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\0_CustomRenderElements\RenderElementExtension.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\1_UIElement\1_UIElement.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\1_UIElement\2_UIElement_EventListener.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\1_UIElement\3_AbstractRect.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\1_UIElement\4_UICollection.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\1_UIElement\5_IScrollable.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\1_UIElement\UIDragHitCollection.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\1_UIElement\UIVisitor.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\2_Basic\0_AbstractBox.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\2_Basic\1_ImageBox.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\2_Basic\2_TextBox.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\2_Basic\3_Box.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\2_Basic\4_Label.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\3_Grid\2_GridLayer.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\3_Grid\3_GridTable.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\3_Grid\5_GridBox.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\4.1_Composites\CheckBox.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\4.1_Composites\ComboBox.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\4.1_Composites\HingeBox.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\4.1_Composites\HingeRelation.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\4.1_Composites\ListView.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\4.1_Composites\Menu.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\4.1_Composites\ScrollBar.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\4.1_Composites\TextBoxContainer.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\4.1_Composites\TreeView.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\6_InternalResourceMx\ClientBinder.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\6_InternalResourceMx\ResImageList.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\7_WindowUI\UIFloatWindow.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\8.2_Canvas\MiniAggCanvasBox.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\8.2_Canvas\MiniAggCanvasRenderElement.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\9_TextContentSplitter\ContentTextSplitter.cs - - - PixelFarm\ImgCodec.Core\Color.cs - - - PixelFarm\ImgCodec.Core\ExtendedImage.cs - - - PixelFarm\ImgCodec.Core\ExtraImageInfo.cs - - - PixelFarm\ImgCodec.Core\FlippingType.cs - - - PixelFarm\ImgCodec.Core\Helpers\ExtensionAttribute.cs - - - PixelFarm\ImgCodec.Core\Helpers\ForNet20.cs - - - PixelFarm\ImgCodec.Core\Helpers\Guard.cs - - - PixelFarm\ImgCodec.Core\ImageFormatException.cs - - - PixelFarm\ImgCodec.Core\ImageFrameCollection.cs - - - PixelFarm\ImgCodec.Core\ImageProperty.cs - - - PixelFarm\ImgCodec.Core\ImagePropertyCollection.cs - - - PixelFarm\ImgCodec.Core\ImgExtensionMethods.cs - - - PixelFarm\ImgCodec.Core\IO\Decoders.cs - - - PixelFarm\ImgCodec.Core\IO\Encoders.cs - - - PixelFarm\ImgCodec.Core\IO\IImageDecoder.cs - - - PixelFarm\ImgCodec.Core\IO\IImageEncoder.cs - - - PixelFarm\ImgCodec.Core\IO\UnsupportedImageFormatException.cs - - - PixelFarm\ImgCodec.Core\Rectangle.cs - - - PixelFarm\ImgCodec.Core\RotationType.cs - - - PixelFarm\ImgCodec.Core\SimpleImage.cs - - - PixelFarm\ImgCodec.Gif\DisposalMethod.cs - - - PixelFarm\ImgCodec.Gif\GifDecoder.cs - - - PixelFarm\ImgCodec.Gif\GifGraphicsControlExtension.cs - - - PixelFarm\ImgCodec.Gif\GifImageDescriptor.cs - - - PixelFarm\ImgCodec.Gif\GifLogicalScreenDescriptor.cs - - - PixelFarm\ImgCodec.Gif\LZWDecoder.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\DCT.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\DecodedJpeg.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\Decoder\HuffmanTable.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\Decoder\JpegComponent.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\Decoder\JpegDecoder.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\Decoder\JpegFrame.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\Decoder\JpegHuffmanTable.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\Decoder\JpegQuantizationTable.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\Decoder\JpegScan.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\Encoder\JpegEncoder.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\FDCT.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\Image.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\IO\BinaryReader.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\IO\BinaryWriter.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\IO\JpegBinaryReader.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\JpegMarker.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\YCbCr.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\ZigZag.cs - - - PixelFarm\ImgCodec.Jpeg\JpegDecoder.cs - - - PixelFarm\ImgCodec.Jpeg\JpegEncoder.cs - - - PixelFarm\ImgCodec.LibJpeg\BitmapDestination.cs - - - PixelFarm\ImgCodec.LibJpeg\BitStream.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\DensityUnit.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\arith_entropy_decoder.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\arith_entropy_encoder.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\bitread_perm_state.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\bitread_working_state.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\ComponentBuffer.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\d_derived_tbl.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\huff_entropy_decoder.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\huff_entropy_encoder.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\JpegUtils.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_color_converter.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_color_deconverter.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_color_quantizer.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_comp_master.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_c_coef_controller.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_c_main_controller.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_c_prep_controller.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_decomp_master.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_downsampler.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_d_coef_controller.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_d_main_controller.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_d_post_controller.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_entropy_decoder.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_entropy_encoder.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_forward_dct.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_input_controller.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_inverse_dct.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_marker_reader.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_marker_writer.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_scan_info.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_upsampler.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\J_BUF_MODE.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\my_1pass_cquantizer.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\my_2pass_cquantizer.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\my_c_coef_controller.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\my_destination_mgr.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\my_merged_upsampler.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\my_source_mgr.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\my_trans_c_coef_controller.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\my_upsampler.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\JBLOCK.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\JHUFF_TBL.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\JpegConstants.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\jpeg_common_struct.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\jpeg_component_info.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\jpeg_compress_struct.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\jpeg_decompress_struct.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\jpeg_destination_mgr.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\jpeg_error_mgr.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\JPEG_MARKER.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\jpeg_marker_struct.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\jpeg_progress_mgr.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\jpeg_source_mgr.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\JQUANT_TBL.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\jvirt_array.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\J_COLOR_SPACE.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\J_COLOR_TRANSFORM.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\J_DCT_METHOD.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\J_DITHER_MODE.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\J_MESSAGE_CODE.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\ReadResult.cs - - - PixelFarm\ImgCodec.LibJpeg\CompressionParameters.cs - - - PixelFarm\ImgCodec.LibJpeg\DecompressionParameters.cs - - - PixelFarm\ImgCodec.LibJpeg\DecompressorToJpegImage.cs - - - PixelFarm\ImgCodec.LibJpeg\Enumerations.cs - - - PixelFarm\ImgCodec.LibJpeg\IDecompressDestination.cs - - - PixelFarm\ImgCodec.LibJpeg\IRawImage.cs - - - PixelFarm\ImgCodec.LibJpeg\Jpeg.cs - - - PixelFarm\ImgCodec.LibJpeg\JpegImage.cs - - - PixelFarm\ImgCodec.LibJpeg\RawImage.cs - - - PixelFarm\ImgCodec.LibJpeg\SampleRow.cs - - - PixelFarm\ImgCodec.LibJpeg\Utils.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\BufferedStreamReader.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\ChunkReader.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\ChunkReaderMode.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\ChunkCopyBehaviour.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\ChunkHelper.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\ChunkLoadBehaviour.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\ChunkPredicate.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\ChunkPredicateEquiv.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\ChunkPredicateId.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\ChunkPredicateId2.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\ChunkRaw.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\ChunksList.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\ChunksListForWrite.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunk.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkBKGD.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkCHRM.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkGAMA.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkHIST.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkICCP.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkIDAT.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkIEND.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkIHDR.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkITXT.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkMultiple.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkOFFS.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkPHYS.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkPLTE.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkSBIT.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkSingle.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkSkipped.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkSPLT.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkSRGB.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkSTER.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkTEXT.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkTextVar.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkTIME.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkTRNS.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkUNKNOWN.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkZTXT.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngMetadata.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\FileHelper.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\FilterType.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\FilterWriteStrategy.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\IBytesConsumer.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\ImageInfo.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\ImageLine.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\ImageLineHelper.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\ImageLines.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\PngCsUtils.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\PngDeinterlacer.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\PngHelperInternal.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\PngIDatChunkInputStream.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\PngIDatChunkOutputStream.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\PngjBadCrcException.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\PngjException.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\PngjExceptionInternal.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\PngjInputException.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\PngjOutputException.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\PngjUnsupportedException.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\PngReader.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\PngWriter.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\ProgressiveOutputStream.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Zlib\Adler32.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Zlib\AZlibInputStream.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Zlib\AZlibOutputStream.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Zlib\CRC32.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Zlib\DeflateCompressLevel.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Zlib\EDeflateCompressStrategy.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Zlib\ZlibInputStreamIs.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Zlib\ZlibInputStreamMs.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Zlib\ZlibOutputStreamIs.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Zlib\ZlibOutputStreamMs.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Zlib\ZlibStreamFactory.cs - - - PixelFarm\ImgCodec.Png\GrayscaleReader.cs - - - PixelFarm\ImgCodec.Png\IColorReader.cs - - - PixelFarm\ImgCodec.Png\Ionic.Zlib\CRC32.cs - - - PixelFarm\ImgCodec.Png\Ionic.Zlib\Deflate.cs - - - PixelFarm\ImgCodec.Png\Ionic.Zlib\DeflateStream.cs - - - PixelFarm\ImgCodec.Png\Ionic.Zlib\GZipStream.cs - - - PixelFarm\ImgCodec.Png\Ionic.Zlib\Inflate.cs - - - PixelFarm\ImgCodec.Png\Ionic.Zlib\InfTree.cs - - - PixelFarm\ImgCodec.Png\Ionic.Zlib\ParallelDeflateOutputStream.cs - - - PixelFarm\ImgCodec.Png\Ionic.Zlib\Tree.cs - - - PixelFarm\ImgCodec.Png\Ionic.Zlib\Zlib.cs - - - PixelFarm\ImgCodec.Png\Ionic.Zlib\ZlibBaseStream.cs - - - PixelFarm\ImgCodec.Png\Ionic.Zlib\ZlibCodec.cs - - - PixelFarm\ImgCodec.Png\Ionic.Zlib\ZlibConstants.cs - - - PixelFarm\ImgCodec.Png\Ionic.Zlib\ZlibStream.cs - - - PixelFarm\ImgCodec.Png\MyCrc32.cs - - - PixelFarm\ImgCodec.Png\PaletteIndexReader.cs - - - PixelFarm\ImgCodec.Png\PngChunk.cs - - - PixelFarm\ImgCodec.Png\PngColorTypeInformation.cs - - - PixelFarm\ImgCodec.Png\PngDecoder.cs - - - PixelFarm\ImgCodec.Png\PngEncoder.cs - - - PixelFarm\ImgCodec.Png\PngHeader.cs - - - PixelFarm\ImgCodec.Png\TruecolorReader.cs - - - PixelFarm\BackEnd.SharpZipLib\BZip2\BZip2.cs - - - PixelFarm\BackEnd.SharpZipLib\BZip2\BZip2Constants.cs - - - PixelFarm\BackEnd.SharpZipLib\BZip2\BZip2Exception.cs - - - PixelFarm\BackEnd.SharpZipLib\BZip2\BZip2InputStream.cs - - - PixelFarm\BackEnd.SharpZipLib\BZip2\BZip2OutputStream.cs - - - PixelFarm\BackEnd.SharpZipLib\Checksum\Adler32.cs - - - PixelFarm\BackEnd.SharpZipLib\Checksum\BZip2Crc.cs - - - PixelFarm\BackEnd.SharpZipLib\Checksum\Crc32.cs - - - PixelFarm\BackEnd.SharpZipLib\Checksum\IChecksum.cs - - - PixelFarm\BackEnd.SharpZipLib\Core\FileSystemScanner.cs - - - PixelFarm\BackEnd.SharpZipLib\Core\INameTransform.cs - - - PixelFarm\BackEnd.SharpZipLib\Core\IScanFilter.cs - - - PixelFarm\BackEnd.SharpZipLib\Core\NameFilter.cs - - - PixelFarm\BackEnd.SharpZipLib\Core\PathFilter.cs - - - PixelFarm\BackEnd.SharpZipLib\Core\StreamUtils.cs - - - PixelFarm\BackEnd.SharpZipLib\Core\WindowsPathUtils.cs - - - PixelFarm\BackEnd.SharpZipLib\Encryption\PkzipClassic.cs - - - PixelFarm\BackEnd.SharpZipLib\Encryption\ZipAESStream.cs - - - PixelFarm\BackEnd.SharpZipLib\Encryption\ZipAESTransform.cs - - - PixelFarm\BackEnd.SharpZipLib\GZip\GZip.cs - - - PixelFarm\BackEnd.SharpZipLib\GZip\GZipConstants.cs - - - PixelFarm\BackEnd.SharpZipLib\GZip\GZipException.cs - - - PixelFarm\BackEnd.SharpZipLib\GZip\GzipInputStream.cs - - - PixelFarm\BackEnd.SharpZipLib\GZip\GzipOutputStream.cs - - - PixelFarm\BackEnd.SharpZipLib\Lzw\LzwConstants.cs - - - PixelFarm\BackEnd.SharpZipLib\Lzw\LzwException.cs - - - PixelFarm\BackEnd.SharpZipLib\Lzw\LzwInputStream.cs - - - PixelFarm\BackEnd.SharpZipLib\SharpZipBaseException.cs - - - PixelFarm\BackEnd.SharpZipLib\Tar\InvalidHeaderException.cs - - - PixelFarm\BackEnd.SharpZipLib\Tar\TarArchive.cs - - - PixelFarm\BackEnd.SharpZipLib\Tar\TarBuffer.cs - - - PixelFarm\BackEnd.SharpZipLib\Tar\TarEntry.cs - - - PixelFarm\BackEnd.SharpZipLib\Tar\TarException.cs - - - PixelFarm\BackEnd.SharpZipLib\Tar\TarHeader.cs - - - PixelFarm\BackEnd.SharpZipLib\Tar\TarInputStream.cs - - - PixelFarm\BackEnd.SharpZipLib\Tar\TarOutputStream.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\Compression\Deflater.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\Compression\DeflaterConstants.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\Compression\DeflaterEngine.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\Compression\DeflaterHuffman.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\Compression\DeflaterPending.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\Compression\Inflater.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\Compression\InflaterDynHeader.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\Compression\InflaterHuffmanTree.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\Compression\PendingBuffer.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\Compression\Streams\DeflaterOutputStream.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\Compression\Streams\InflaterInputStream.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\Compression\Streams\OutputWindow.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\Compression\Streams\StreamManipulator.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\FastZip.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\IEntryFactory.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\WindowsNameTransform.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\ZipConstants.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\ZipEntry.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\ZipEntryFactory.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\ZipException.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\ZipExtraData.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\ZipFile.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\ZipHelperStream.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\ZipInputStream.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\ZipNameTransform.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\ZipOutputStream.cs - - - PixelFarm\BackEnd.Tesselate\ActiveRegion.cs - - - PixelFarm\BackEnd.Tesselate\ContourVertex.cs - - - PixelFarm\BackEnd.Tesselate\Dictionary.cs - - - PixelFarm\BackEnd.Tesselate\Face.cs - - - PixelFarm\BackEnd.Tesselate\HalfEdge.cs - - - PixelFarm\BackEnd.Tesselate\MaxFirstList.cs - - - PixelFarm\BackEnd.Tesselate\Mesh.cs - - - PixelFarm\BackEnd.Tesselate\Tesselator.cs - - - PixelFarm\BackEnd.Triangulation\x_notused\DTSweepBasin.cs - - - PixelFarm\BackEnd.Triangulation\x_notused\DTSweepEdgeEvent.cs - - - PixelFarm\BackEnd.Triangulation\x_notused\DTSweepPointComparator.cs - - - PixelFarm\BackEnd.Triangulation\x_notused\FixedArray3.cs - - - PixelFarm\BackEnd.Triangulation\x_notused\FixedBitArray3.cs - - - PixelFarm\BackEnd.Triangulation\x_notused\PolygonSet.cs - - - PixelFarm\BackEnd.Triangulation\x_notused\TriangulationConstraint.cs - - - PixelFarm\BackEnd.TypeMirror\SimpleReflectionHelper.cs - - - PixelFarm\PaintLab.PlatformBridge\Common\Clipboard.cs - - - PixelFarm\PaintLab.PlatformBridge\Common\GeneralEventListener.cs - - - PixelFarm\PaintLab.PlatformBridge\Common\IPlatformWindowBox.cs - - - PixelFarm\PaintLab.PlatformBridge\Common\Keys.cs - - - PixelFarm\PaintLab.PlatformBridge\Common\UIPlatform.cs - - - PixelFarm\PaintLab.PlatformBridge\Common\UITimerTask.cs - - - PixelFarm\PaintLab.PlatformBridge\Events\IEventListener.cs - - - PixelFarm\PaintLab.PlatformBridge\Events\IEventPortal.cs - - - PixelFarm\PaintLab.PlatformBridge\Events\ITopWindowEventRoot.cs - - - PixelFarm\PaintLab.PlatformBridge\Events\ScrollSurfaceRequestEventArgs.cs - - - PixelFarm\PaintLab.PlatformBridge\Events\UIEventArgs.cs - - - PixelFarm\PaintLab.PlatformBridge\Events\UIEventNames.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.1_EditableRuns\EditableRun.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.1_EditableRuns\EditableRunCharLocation.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.1_EditableRuns\EditableTextRun.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.1_EditableRuns\SolidTextRun.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.1_EditableRuns\TextSpanSytle.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.1_EditableRuns\VisualPointInfo.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.1_EditableRuns\VisualSelectionRange.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.2_Lines\0_EditableTextLine.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.2_Lines\1_EditableTextLine_CORE_Collection.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.2_Lines\2_EditableTextLine_PRIVATE_CollectionFeatures2.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.2_Lines\3_EditableTextLine_PUBLIC_CollectionFeatures.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.2_Lines\4_EditableTextLine_ArrangeAndResizingMechanism.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.2_Lines\6_EditableTextLine_Advanced.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.2_Lines\debugActivityRecorder.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.2_Lines\TextLineReaderWriter.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.3_Layer\1_EditableTextFlowLayer.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.3_Layer\1_EditableTextFlowLayer_CORE_Collection.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\2.1_MultiLineController\DocumentActions.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\2.1_MultiLineController\TextLayerController.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\2.1_MultiLineController\TextLayerController.KeyboardFunctions.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\2.1_MultiLineController\TextLayerController.TextFunctions.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\2.1_MultiLineController\TextSurfaceEventListener.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\2.2_TextRenderBox\CaretRenderElement.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\2.2_TextRenderBox\GlobalCaretController.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\2.2_TextRenderBox\TextEditRenderBox.BaseFunctions.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\2.2_TextRenderBox\TextEditRenderBox.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\2.2_TextRenderBox\TextEditRenderBox.TextSurfaceFuntions.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\2.2_TextRenderBox\VisualPaintEventArgs.cs - - - PixelFarm\PaintLab.RenderTree\1_Root\1_RootGraphic.cs - - - PixelFarm\PaintLab.RenderTree\1_Root\1_RootGraphic_p1_dbug.cs - - - PixelFarm\PaintLab.RenderTree\1_Root\1_RootGraphic_p2_dbug.cs - - - PixelFarm\PaintLab.RenderTree\1_Root\2_RenderRequest.cs - - - PixelFarm\PaintLab.RenderTree\1_Root\3_GraphicsTimerTask.cs - - - PixelFarm\PaintLab.RenderTree\2_RenderElement\0_RenderElement.cs - - - PixelFarm\PaintLab.RenderTree\2_RenderElement\1_RenderElement.ElementPositioning_NoBoundChanged.cs - - - PixelFarm\PaintLab.RenderTree\2_RenderElement\2_RenderElement.ElementPositioning_1_WithSizeChanged.cs - - - PixelFarm\PaintLab.RenderTree\2_RenderElement\3_RenderElement.Bubble_Layout.cs - - - PixelFarm\PaintLab.RenderTree\2_RenderElement\4_RenderElement.Bubble_Repaint.cs - - - PixelFarm\PaintLab.RenderTree\2_RenderElement\RenderElementConst.cs - - - PixelFarm\PaintLab.RenderTree\2_RenderElement\RenderElement_IParentLink.cs - - - PixelFarm\PaintLab.RenderTree\2_RenderElement\x_RenderElement.debug.cs - - - PixelFarm\PaintLab.RenderTree\2_RenderElement\x_RenderElement_LocationHelper.cs - - - PixelFarm\PaintLab.RenderTree\3_Layers\0_IParentLink.cs - - - PixelFarm\PaintLab.RenderTree\3_Layers\1_RenderElementLayer.cs - - - PixelFarm\PaintLab.RenderTree\3_Layers\2_PlainLayer.cs - - - PixelFarm\PaintLab.RenderTree\4_Boxes\IBoxElement.cs - - - PixelFarm\PaintLab.RenderTree\4_Boxes\RenderBoxBase.cs - - - PixelFarm\PaintLab.RenderTree\5_HitTest\HitChain.cs - - - PixelFarm\PaintLab.RenderTree\6_debug\dbug.cs - - - PixelFarm\PaintLab.RenderTree\6_debug\dbugCoreConst.cs - - - PixelFarm\PaintLab.RenderTree\6_debug\dbugHitTracker.cs - - - PixelFarm\PaintLab.RenderTree\6_debug\dbugVisitorMessage.cs - - - PixelFarm\PaintLab.RenderTree\6_debug\dbugVisualEvalScrollBarTrace.cs - - - PixelFarm\PaintLab.RenderTree\6_debug\dbugVisualInvalidationTracer.cs - - - PixelFarm\PaintLab.RenderTree\6_debug\dbugVisualLayoutTracer.cs - - - PixelFarm\PaintLab.RenderTree\6_debug\IdbugOutputWindow.cs - - - PixelFarm\PaintLab.RenderTree\8_EventQueue\EventQueueSystem.cs - - - PixelFarm\PaintLab.AbstractPlatform\Accessories\KnownColors.cs - - - PixelFarm\PaintLab.AbstractPlatform\TempContext.cs - - - PixelFarm\PaintLab.YourImplementation\0_FrameworkInit\CommonTextServiceSetup.cs - - - PixelFarm\PaintLab.YourImplementation\0_FrameworkInit\FrameworkInitGLES.cs - - - PixelFarm\PaintLab.YourImplementation\0_FrameworkInit\ImgCodecMemBitmapIO.cs - - - PixelFarm\PaintLab.YourImplementation\0_FrameworkInit\StorageProviderImpl.cs - - - PixelFarm\PaintLab.YourImplementation\1_Events\GraphicsTimerTasksManager.cs - - - PixelFarm\PaintLab.YourImplementation\1_Events\MyIntervalTaskEventArgs.cs - - - PixelFarm\PaintLab.YourImplementation\1_Events\RenderElementEventPortal.cs - - - PixelFarm\PaintLab.YourImplementation\1_Events\TopWindowEventRoot.cs - - - PixelFarm\PaintLab.YourImplementation\1_Events\UIHoverMonitor.cs - - - PixelFarm\PaintLab.YourImplementation\2_ContentManagers\ImageCacheSystem.cs - - - PixelFarm\PaintLab.YourImplementation\2_ContentManagers\ImageContentManager.cs - - - PixelFarm\PaintLab.YourImplementation\2_ContentManagers\TextContentManager.cs - - - PixelFarm\PaintLab.YourImplementation\3_RenderTreeRoot\0_MyRootGraphic.cs - - - PixelFarm\PaintLab.YourImplementation\3_RenderTreeRoot\TopWindowRenderBox.cs - - - PixelFarm\PixelFarm.Vectors\3_Transform\1_Affine.cs - - - PixelFarm\PixelFarm.Vectors\3_Transform\2_Bilinear.cs - - - PixelFarm\PixelFarm.Vectors\3_Transform\3_Perspective.cs - - - PixelFarm\PixelFarm.Vectors\3_Transform\4_SimulEqGeneral.cs - - - PixelFarm\PixelFarm.BitmapBufferEx\BitmapBufferEx\00_Porting\NativeMethods.cs - - - PixelFarm\PixelFarm.BitmapBufferEx\BitmapBufferEx\BitmapBuffer.cs - - - PixelFarm\PixelFarm.BitmapBufferEx\BitmapBufferEx\BitmapBufferExtensions\AntialiasingExtensions.cs - - - PixelFarm\PixelFarm.BitmapBufferEx\BitmapBufferEx\BitmapBufferExtensions\BaseExtensions.cs - - - PixelFarm\PixelFarm.BitmapBufferEx\BitmapBufferEx\BitmapBufferExtensions\BlitExtensions.cs - - - PixelFarm\PixelFarm.BitmapBufferEx\BitmapBufferEx\BitmapBufferExtensions\ConvertExtensions.cs - - - PixelFarm\PixelFarm.BitmapBufferEx\BitmapBufferEx\BitmapBufferExtensions\FillExtensions.cs - - - PixelFarm\PixelFarm.BitmapBufferEx\BitmapBufferEx\BitmapBufferExtensions\FilterExtensions.cs - - - PixelFarm\PixelFarm.BitmapBufferEx\BitmapBufferEx\BitmapBufferExtensions\LineAaExtensions.cs - - - PixelFarm\PixelFarm.BitmapBufferEx\BitmapBufferEx\BitmapBufferExtensions\LineExtensions.cs - - - PixelFarm\PixelFarm.BitmapBufferEx\BitmapBufferEx\BitmapBufferExtensions\ShapeExtensions.cs - - - PixelFarm\PixelFarm.BitmapBufferEx\BitmapBufferEx\BitmapBufferExtensions\SplineExtensions.cs - - - PixelFarm\PixelFarm.BitmapBufferEx\BitmapBufferEx\BitmapBufferExtensions\TransformationExtensions.cs - - - PixelFarm\PixelFarm.BitmapBufferEx\BitmapBufferEx\BitmapBufferFactory.cs - - - PixelFarm\PixelFarm.BitmapBufferEx\BitmapBufferEx\BitmapContext.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\EsUtils\ES2Utils.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\EsUtils\ES3Utils.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\EsUtils\GeometryUtils.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\EsUtils\MiniShaderProgram.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\GLShader\ColorFillShaderBase.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\GLShader\FilterEffectShaders.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\GLShader\GradientShaders.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\GLShader\InvertAlphaLineSmoothShader.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\GLShader\ShaderBase.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\GLShader\SignedDistanceFieldShader.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\GLShader\SimpleRectTextureShader.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\GLShader\SmoothLineShader.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\GLShader\SolidColorFillShader.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\GLTexture\FrameBuffer.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\GLTexture\GLBitmap.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\RenderSuface\GLGradientColorProvider.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\RenderSuface\GLRenderSurface.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\RenderSuface\ImageFillStyle.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\RenderSuface\InternalGraphicsPath.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\RenderSuface\ShaderSharedResource.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\RenderSuface\SmoothMode.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\RenderSuface\VertexBufferObject.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\RenderSuface\VertexPositionColor.cs - - - PixelFarm\PixelFarm.Drawing.GLES\0_Start\GLES2Platform.cs - - - PixelFarm\PixelFarm.Drawing.GLES\0_Start\GLES2PlatformFontMx.cs - - - PixelFarm\PixelFarm.Drawing.GLES\BitmapAtlasPainter\BitmapAtlasManager.cs - - - PixelFarm\PixelFarm.Drawing.GLES\BitmapAtlasPainter\BitmapAtlasPainter.cs - - - PixelFarm\PixelFarm.Drawing.GLES\DrawBoard\1_MyGLDrawBoard_Specific.cs - - - PixelFarm\PixelFarm.Drawing.GLES\DrawBoard\2_MyGLDrawBoard_CoordinateAndClip.cs - - - PixelFarm\PixelFarm.Drawing.GLES\DrawBoard\3_MyGLDrawBoard_DrawGraphics.cs - - - PixelFarm\PixelFarm.Drawing.GLES\DrawBoard\4_MyGLDrawBoard_TextAndFonts.cs - - - PixelFarm\PixelFarm.Drawing.GLES\GLPainter\GLPainter.cs - - - PixelFarm\PixelFarm.Drawing.GLES\GLPainter\GLPainter_BrushAndFill.cs - - - PixelFarm\PixelFarm.Drawing.GLES\GLPainter\GLPainter_Imgs.cs - - - PixelFarm\PixelFarm.Drawing.GLES\GLPainter\GLPainter_MaskAndClipping.cs - - - PixelFarm\PixelFarm.Drawing.GLES\GLPainter\GLPainter_PenAndStroke.cs - - - PixelFarm\PixelFarm.Drawing.GLES\GLPainter\GLPainter_TextAndFont.cs - - - PixelFarm\PixelFarm.Drawing.GLES\TextPrinter\GLBitmapGlyphTextPrinter.cs - - - PixelFarm\PixelFarm.Drawing.GLES\TextPrinter\MySimpleGLBitmapFontManager.cs - - - PixelFarm\BackEnd.BurningMineCurve\curveutils\CubicBezier.cs - - - PixelFarm\BackEnd.BurningMineCurve\curveutils\CurveBuilder.cs - - - PixelFarm\BackEnd.BurningMineCurve\curveutils\CurveFit.cs - - - PixelFarm\BackEnd.BurningMineCurve\curveutils\CurveFitBase.cs - - - PixelFarm\BackEnd.BurningMineCurve\curveutils\CurvePreprocess.cs - - - PixelFarm\BackEnd.BurningMineCurve\curveutils\Spline.cs - - - PixelFarm\BackEnd.BurningMineCurve\curveutils\SplineBuilder.cs - - - PixelFarm\BackEnd.BurningMineCurve\curveutils\VectorHelper.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization\0_ScanlineSpan.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization\1_Scanline.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization\2_ScanlinePacked8.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization\3_ScanlineUnpacked8.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization\4.1_ScanlineRasterizer.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization\4.2_CellAARasterizer.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization\4.3_VectorClipper.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization\5_DestBitmapRasterizer.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization\SubPixConst.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization_lines\1.1_LinesAA.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization_lines\1.2_PatternFilter.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization_lines\1.3_LineParameters.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization_lines\2.1_DistanceInterpolators.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization_lines\2.2_LineInterpolators.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization_lines\2.3_EllipseBrensenhemInterpolator.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization_lines\3.1_LineRenderer.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization_lines\3.2_OutlineRenderer.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization_lines\3.3_ImageLineRenderer.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization_lines\4_OutlineAARasterizer.cs - - - PixelFarm\PixelFarm.CpuBlit\04_fragmentprocessing\0_ISpanGenerator.cs - - - PixelFarm\PixelFarm.CpuBlit\04_fragmentprocessing\1_ImgSpanGen.cs - - - PixelFarm\PixelFarm.CpuBlit\04_fragmentprocessing\3_ImgSpanGenRGBA.cs - - - PixelFarm\PixelFarm.CpuBlit\04_fragmentprocessing\GammaLookUpTable.cs - - - PixelFarm\PixelFarm.CpuBlit\04_fragmentprocessing\IGammaFunction.cs - - - PixelFarm\PixelFarm.CpuBlit\04_fragmentprocessing\ISpanInterpolator.cs - - - PixelFarm\PixelFarm.CpuBlit\04_FragmentProcessing\LineInterpolators.cs - - - PixelFarm\PixelFarm.CpuBlit\04_FragmentProcessing\SpanInterpolatorLinear.cs - - - PixelFarm\PixelFarm.CpuBlit\04_FragmentProcessing\SpanInterpolatorPerspectiveLerp.cs - - - PixelFarm\PixelFarm.CpuBlit\04_FragmentProcessing_Gradient\GouraudVerticeBuilder.cs - - - PixelFarm\PixelFarm.CpuBlit\04_FragmentProcessing_Gradient\RGBAGouraudSpanGen.cs - - - PixelFarm\PixelFarm.CpuBlit\05_PixelProcessing\BitmapBlenderBase.cs - - - PixelFarm\PixelFarm.CpuBlit\05_PixelProcessing\IBitmapBlender.cs - - - PixelFarm\PixelFarm.CpuBlit\05_PixelProcessing\MemBitmapBinder.cs - - - PixelFarm\PixelFarm.CpuBlit\05_PixelProcessing\PixelBlender32.cs - - - PixelFarm\PixelFarm.CpuBlit\05_PixelProcessing\PixelBlenderBGRA.cs - - - PixelFarm\PixelFarm.CpuBlit\05_pixelprocessing\PixelBlenderOthers.cs - - - PixelFarm\PixelFarm.CpuBlit\05_pixelprocessing\SubBitmapBlender.cs - - - PixelFarm\PixelFarm.CpuBlit\08_imageresampling\IImageFilter.cs - - - PixelFarm\PixelFarm.CpuBlit\08_imageresampling\ImageFilterLookupTable.cs - - - PixelFarm\PixelFarm.CpuBlit\08_imageresampling\ImageFreeTransform.cs - - - PixelFarm\PixelFarm.CpuBlit\08_imageresampling\ImageInterpolationQuality.cs - - - PixelFarm\PixelFarm.CpuBlit\08_imageresampling\ImageTransform.cs - - - PixelFarm\PixelFarm.DrawingCore\2_Abstract_DrawingElements\Brushes_Pens.cs - - - PixelFarm\PixelFarm.DrawingCore\2_Abstract_DrawingElements\CombineMode.cs - - - PixelFarm\PixelFarm.DrawingCore\2_Abstract_DrawingElements\DashStyle.cs - - - PixelFarm\PixelFarm.DrawingCore\2_Abstract_DrawingElements\GraphicsPath.cs - - - PixelFarm\PixelFarm.DrawingCore\2_Abstract_DrawingElements\Image.cs - - - PixelFarm\PixelFarm.DrawingCore\2_Abstract_DrawingElements\Region.cs - - - PixelFarm\PixelFarm.DrawingCore\3_DrawBoard\0_VertexCommandAndOrientation.cs - - - PixelFarm\PixelFarm.DrawingCore\3_DrawBoard\1_VertexStore.cs - - - PixelFarm\PixelFarm.DrawingCore\3_DrawBoard\CO.cs - - - PixelFarm\PixelFarm.DrawingCore\3_DrawBoard\CRC32Calculator.cs - - - PixelFarm\PixelFarm.DrawingCore\3_DrawBoard\DrawBoard.cs - - - PixelFarm\PixelFarm.DrawingCore\3_DrawBoard\Others.cs - - - PixelFarm\PixelFarm.DrawingCore\3_DrawBoard\Painter.cs - - - PixelFarm\PixelFarm.DrawingCore\3_DrawBoard\RenderVx.cs - - - PixelFarm\PixelFarm.DrawingCore\3_DrawBoard\RequestFont.cs - - - PixelFarm\PixelFarm.Painter\0_Base\ForNet20.cs - - - PixelFarm\PixelFarm.Painter\2_General\ColorEx.cs - - - PixelFarm\PixelFarm.Painter\2_General\ITextPrinter.cs - - - PixelFarm\PixelFarm.Painter\2_General\TempContext.cs - - - PixelFarm\PixelFarm.Painter\3_Cpu_Blit\ColorRGBAf.cs - - - PixelFarm\PixelFarm.Painter\3_Cpu_Blit\MemBitmap.cs - - - PixelFarm\PixelFarm.Painter\3_Cpu_Blit\PainterExtensions.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\BoundingRect.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\CurveFlattener.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\LineWalker.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\PathWriter.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\RoundedRect.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\SimpleRect.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\Stroke.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\StrokeGen.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\StrokeGenerator.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\StrokeMath.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\SvgArcSegment.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\VectorToolBox.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\VertexData.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\VertexHitTester.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\VertexStoreBuilder.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\VertexStoreExtensions.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\VertexStoreTransformExtensions.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\VxsClipping.cs - - - PixelFarm\PixelFarm.PrimitiveGeo\AffinePlan.cs - - - PixelFarm\PixelFarm.PrimitiveGeo\BasicGeometries.cs - - - PixelFarm\PixelFarm.PrimitiveGeo\Color.cs - - - PixelFarm\PixelFarm.PrimitiveGeo\ICoordTransformer.cs - - - PixelFarm\PixelFarm.PrimitiveGeo\MemMx.cs - - - PixelFarm\PixelFarm.PrimitiveGeo\NativeMemMx.cs - - - PixelFarm\PixelFarm.PrimitiveGeo\Rectangle.cs - - - PixelFarm\PixelFarm.PrimitiveGeo\RectangleF.cs - - - PixelFarm\PixelFarm.PrimitiveGeo\RectInt.cs - - - PixelFarm\PixelFarm.Vectors\1_vectormaths\AggMath.cs - - - PixelFarm\PixelFarm.Vectors\1_vectormaths\AxisAlignedBoundingBox.cs - - - PixelFarm\PixelFarm.Vectors\1_vectormaths\BezierCurve.cs - - - PixelFarm\PixelFarm.Vectors\1_vectormaths\BezierCurveCubic.cs - - - PixelFarm\PixelFarm.Vectors\1_vectormaths\BezierCurveQuadric.cs - - - PixelFarm\PixelFarm.Vectors\1_vectormaths\MathHelper.cs - - - PixelFarm\PixelFarm.Vectors\1_vectormaths\Matrix4x4.cs - - - PixelFarm\PixelFarm.Vectors\1_vectormaths\MyVector2.cs - - - PixelFarm\PixelFarm.Vectors\1_vectormaths\Quaternion.cs - - - PixelFarm\PixelFarm.Vectors\1_vectormaths\Ray.cs - - - PixelFarm\PixelFarm.Vectors\1_vectormaths\Vector2.cs - - - PixelFarm\PixelFarm.Vectors\1_vectormaths\Vector3.cs - - - PixelFarm\PixelFarm.Vectors\1_vectormaths\Vector3Float.cs - - - PixelFarm\PixelFarm.Vectors\1_vectormaths\Vector4.cs - - - PixelFarm\PixelFarm.Vectors\2_geometry\Arc.cs - - - PixelFarm\PixelFarm.Vectors\2_geometry\BezireCurve.cs - - - PixelFarm\PixelFarm.Vectors\2_geometry\BSpline.cs - - - PixelFarm\PixelFarm.Vectors\2_geometry\Collections.cs - - - PixelFarm\PixelFarm.Vectors\2_geometry\Curves.cs - - - PixelFarm\PixelFarm.Vectors\2_geometry\Ellipse.cs - - - PixelFarm\PixelFarm.Vectors\2_geometry\RectD.cs - - - PixelFarm\PixelFarm.Vectors\3_transform\Viewport.cs - - - PixelFarm\PixelFarm.Vectors\4_Utils\PolygonSimplifier.cs - - - PixelFarm\PixelFarm.Vectors\4_Utils\SvgArc.cs - - - PixelFarm\PixelFarm.Vectors\4_Utils\TessTool.cs - - - PixelFarm\PixelFarm.Vectors\5_clipper\cliper.cs - - - PixelFarm\PixelFarm.Vectors\5_Clipper\ClipLiangBarsky.cs - - - PixelFarm\PixelFarm.Drawing\4_PlatformServices\StorageService.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\AggPainter\AggPainter.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\AggPainter\AggPainterPool.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\AggPainter\AggPainter_BrushAndFill.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\AggPainter\AggPainter_FontAndText.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\AggPainter\AggPainter_Imgs.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\AggPainter\AggPainter_MaskAndClipping.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\AggPainter\AggPainter_PenAndStroke.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\DrawBoard\AggRenderVx.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\DrawBoard\Canvas2dExtension.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\DrawBoard\CpuBlitRegion.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\DrawBoard\dbugVertexSourceIO.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\DrawBoard\GradientBrushes.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\DrawBoard\LineDashGenerator.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\DrawBoard\RectBorderHelper.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\DrawBoard\SvgRenderVx.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\DrawBoard\VertexStoreExtensions2.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Msdf\BasicElements.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Msdf\ContourCornerAndAnalyzingElems.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Msdf\EdgeBmpLut.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Msdf\EdgeColor.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Msdf\EdgeColoring.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Msdf\EdgeSegment.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Msdf\EquationSolver.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Msdf\MsdfGen.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Msdf\MsdfGen2.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Msdf\MsdfGen3.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Msdf\SignedDistance.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Msdf\SpriteTextureMapData.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Others\1_Base\BorderDouble.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Others\1_Base\ClipProxyImage.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Others\1_Base\GammaFuntions.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Others\1_Base\ImgFilters.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Others\1_Base\ProxyImage.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Others\3_Filter\BrightnesssAndContrast.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Others\3_Filter\ImageFilters.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Others\3_Filter\InternalBrightnessAndContrastAdjustment.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Others\3_Filter\PatternFilterBilnearColorRGBA.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Others\3_Filter\RecursiveBlur.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Others\3_Filter\SharpenFilter.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Others\3_Filter\StackBlur.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Others\3_Filter\Transposer.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\PathReconstruction\BezierCurveReconstruction.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\PathReconstruction\BitmapBasedRegion.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\PathReconstruction\FloodFill.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\PathReconstruction\FloodFillTools.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\PathReconstruction\MixedRegion.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\PathReconstruction\OutlineTracer.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\PathReconstruction\PixelEvaluators.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\PathReconstruction\ReconstructedRegionData.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\PathReconstruction\VxsRegion.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\RenderSurface\AggRenderSurface.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\RenderSurface\AggRenderSurface_RenderImages.cs - - - PixelFarm\PixelFarm.Drawing\8_ImgReaders\ImageReaders.cs - - - PixelFarm\PixelFarm.Drawing\9_BitmapAtlas\AtlasItemImage.cs - - - PixelFarm\PixelFarm.Drawing\9_BitmapAtlas\BinPacker.cs - - - PixelFarm\PixelFarm.Drawing\9_BitmapAtlas\BitmapAtlasFile.cs - - - PixelFarm\PixelFarm.Drawing\9_BitmapAtlas\SimpleBitmapAtlasBuilder.cs - - - PixelFarm\PixelFarm.Drawing\9_BitmapAtlas\SimpleBitmaptAtlas.cs - - - Typography\PixelFarm.Typography\1.1_Drawing_Fonts\FontAtlasTextPrinter.cs - - - Typography\PixelFarm.Typography\1.1_Drawing_Fonts\FontStyleExtensions.cs - - - Typography\PixelFarm.Typography\1.1_Drawing_Fonts\GlyphBitmapStore.cs - - - Typography\PixelFarm.Typography\1.1_Drawing_Fonts\GlyphMeshStore.cs - - - Typography\PixelFarm.Typography\1.1_Drawing_Fonts\GlyphPathBuilder.cs - - - Typography\PixelFarm.Typography\1.1_Drawing_Fonts\GlyphSvgStore.cs - - - Typography\PixelFarm.Typography\1.1_Drawing_Fonts\GlyphTranslatorToVxs.cs - - - Typography\PixelFarm.Typography\1.1_Drawing_Fonts\OpenFontTextService.cs - - - Typography\PixelFarm.Typography\1.1_Drawing_Fonts\VxsTextPrinter.cs - - - Typography\PixelFarm.Typography\1.3_DrawingFonts\ManagedShapingService.cs - - - Typography\PixelFarm.Typography\1.3_DrawingFonts\TextShapingAndLayoutService.cs - - - Typography\PixelFarm.Typography\2_Drawing_Text\ActualFont.cs - - - Typography\PixelFarm.Typography\2_Drawing_Text\FontFace.cs - - - Typography\PixelFarm.Typography\2_Drawing_Text\FontGlyph.cs - - - Typography\PixelFarm.Typography\3_FontFaceImpl\AggGlyphTextureGen.cs - - - Typography\PixelFarm.Typography\3_FontFaceImpl\BitmapFontMx.cs - - - Typography\PixelFarm.Typography\3_FontFaceImpl\GlyphTextureBitmapGenerator.cs - - - Typography\PixelFarm.Typography\3_FontFaceImpl\NOpenFontFace.cs - - - Typography\PixelFarm.Typography\3_FontFaceImpl\OpenFontLoader.cs - - - Typography\PixelFarm.Typography\3_FontFaceImpl\ScriptLangConv.cs - - - Typography\PixelFarm.Typography\3_FontFaceImpl\TextureFontLoader.cs - - - Typography\FontAtlas\BinPacker.cs - - - Typography\FontAtlas\FontAtlasFile.cs - - - Typography\FontAtlas\GlyphImages.cs - - - Typography\FontAtlas\MsdfGlyphGen.cs - - - Typography\FontAtlas\SimpleFontAtlas.cs - - - Typography\FontAtlas\SimpleFontAtlasBuilder.cs - - - Typography\Typography.Contours\GlyphAnalysis\0_GlyphTriangle.cs - - - Typography\Typography.Contours\GlyphAnalysis\1_EdgeLine.cs - - - Typography\Typography.Contours\GlyphAnalysis\2_GlyphCentroidPair.cs - - - Typography\Typography.Contours\GlyphAnalysis\3_GlyphBoneJoint.cs - - - Typography\Typography.Contours\GlyphAnalysis\4_GlyphBone.cs - - - Typography\Typography.Contours\GlyphAnalysis\5_CentroidLineAndHub.cs - - - Typography\Typography.Contours\GlyphAnalysis\CurveGen.cs - - - Typography\Typography.Contours\GlyphAnalysis\GlyphContour.cs - - - Typography\Typography.Contours\GlyphAnalysis\GlyphContourBuilder.cs - - - Typography\Typography.Contours\GlyphAnalysis\GlyphIntermediateOutline.cs - - - Typography\Typography.Contours\GlyphAnalysis\GlyphOutlineAnalyzer.cs - - - Typography\Typography.Contours\GlyphAnalysis\GlyphOutlineWalker.cs - - - Typography\Typography.Contours\GlyphAnalysis\GlyphPartFlattener.cs - - - Typography\Typography.Contours\GlyphAnalysis\GlyphParts.cs - - - Typography\Typography.Contours\GlyphAnalysis\GlyphPoint.cs - - - Typography\Typography.Contours\GlyphAnalysis\MyMath.cs - - - Typography\Typography.Contours\GlyphAnalysis\Rect.cs - - - Typography\Typography.Contours\GlyphDynamicOutline.cs - - - Typography\Typography.Contours\GlyphMeshCollection.cs - - - Typography\Typography.Contours\GlyphPathBuilderBase.cs - - - Typography\Typography.Contours\TextPrinterBase.cs - - - Typography\Typography.GlyphLayout\GlyphIndexList.cs - - - Typography\Typography.GlyphLayout\GlyphLayout.cs - - - Typography\Typography.GlyphLayout\GlyphPosition.cs - - - Typography\Typography.GlyphLayout\GlyphSubstitution.cs - - - Typography\Typography.GlyphLayout\MeasureStringBox.cs - - - Typography\Typography.GlyphLayout\PixelScaleLayoutExtensions.cs - - - Typography\Typography.GlyphLayout\UserCharToGlyphIndexMap.cs - - - Typography\Typography.MsdfGen\BasicElements.cs - - - Typography\Typography.MsdfGen\EdgeColor.cs - - - Typography\Typography.MsdfGen\EdgeColoring.cs - - - Typography\Typography.MsdfGen\EdgeHolder.cs - - - Typography\Typography.MsdfGen\EdgeSegment.cs - - - Typography\Typography.MsdfGen\EquationSolver.cs - - - Typography\Typography.MsdfGen\MsdfGen.cs - - - Typography\Typography.MsdfGen\SignedDistance.cs - - - Typography\Typography.OpenFont\AdditionalInfo\AdobeGlyphList.cs - - - Typography\Typography.OpenFont\AdditionalInfo\AdobeGlyphListForNewFont.cs - - - Typography\Typography.OpenFont\AdditionalInfo\MacPostFormat1.cs - - - Typography\Typography.OpenFont\AdditionalInfo\OS2_IBMFontClassParameters.cs - - - Typography\Typography.OpenFont\Bounds.cs - - - Typography\Typography.OpenFont\CharacterMap.cs - - - Typography\Typography.OpenFont\Geometry.cs - - - Typography\Typography.OpenFont\Glyph.cs - - - Typography\Typography.OpenFont\IGlyphTranslator.cs - - - Typography\Typography.OpenFont\IO\ByteOrderSwappingBinaryReader.cs - - - Typography\Typography.OpenFont\OpenFontReader.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\AttachmentListTable.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\Base.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\ClassDefTable.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\COLR.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\CoverageTable.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\CPAL.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\FeatureInfo.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\FeatureList.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\GDEF.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\GlyphShapingTableEntry.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\GPOS.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\GPOS.Others.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\GSUB.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\IGlyphIndexList.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\JustificationTable.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\LigatureCaretListTable.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\MathTable.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\ScriptLang.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\ScriptList.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\ScriptTable.cs - - - Typography\Typography.OpenFont\Tables.BitmapAndSvgFonts\BitmapFontGlyphSource.cs - - - Typography\Typography.OpenFont\Tables.BitmapAndSvgFonts\BitmapFontsCommon.cs - - - Typography\Typography.OpenFont\Tables.BitmapAndSvgFonts\CBDT.cs - - - Typography\Typography.OpenFont\Tables.BitmapAndSvgFonts\CBLC.cs - - - Typography\Typography.OpenFont\Tables.BitmapAndSvgFonts\EBDT.cs - - - Typography\Typography.OpenFont\Tables.BitmapAndSvgFonts\EBLC.cs - - - Typography\Typography.OpenFont\Tables.BitmapAndSvgFonts\EBSC.cs - - - Typography\Typography.OpenFont\Tables.BitmapAndSvgFonts\SvgTable.cs - - - Typography\Typography.OpenFont\Tables.CFF\CFF.cs - - - Typography\Typography.OpenFont\Tables.CFF\CffEvaluationEngine.cs - - - Typography\Typography.OpenFont\Tables.CFF\CFFTable.cs - - - Typography\Typography.OpenFont\Tables.CFF\Type2CharStringParser.cs - - - Typography\Typography.OpenFont\Tables.Others\HorizontalDeviceMetrics.cs - - - Typography\Typography.OpenFont\Tables.Others\Kern.cs - - - Typography\Typography.OpenFont\Tables.Others\LinearThreashold.cs - - - Typography\Typography.OpenFont\Tables.Others\Merge.cs - - - Typography\Typography.OpenFont\Tables.Others\Meta.cs - - - Typography\Typography.OpenFont\Tables.Others\STAT.cs - - - Typography\Typography.OpenFont\Tables.Others\VerticalDeviceMetrics.cs - - - Typography\Typography.OpenFont\Tables.Others\VerticalMetrics.cs - - - Typography\Typography.OpenFont\Tables.Others\VerticalMetricsHeader.cs - - - Typography\Typography.OpenFont\Tables.TrueType\Cvt_Programs.cs - - - Typography\Typography.OpenFont\Tables.TrueType\Gasp.cs - - - Typography\Typography.OpenFont\Tables.TrueType\Glyf.cs - - - Typography\Typography.OpenFont\Tables.TrueType\GlyphLocations.cs - - - Typography\Typography.OpenFont\Tables.Variations\AVar.cs - - - Typography\Typography.OpenFont\Tables.Variations\Common.ItemVariationStore.cs - - - Typography\Typography.OpenFont\Tables.Variations\Common.TupleVariationStore.cs - - - Typography\Typography.OpenFont\Tables.Variations\CVar.cs - - - Typography\Typography.OpenFont\Tables.Variations\FVar.cs - - - Typography\Typography.OpenFont\Tables.Variations\GVar.cs - - - Typography\Typography.OpenFont\Tables.Variations\HVar.cs - - - Typography\Typography.OpenFont\Tables.Variations\MVar.cs - - - Typography\Typography.OpenFont\Tables.Variations\VVar.cs - - - Typography\Typography.OpenFont\Tables\Cmap.cs - - - Typography\Typography.OpenFont\Tables\Head.cs - - - Typography\Typography.OpenFont\Tables\HorizontalHeader.cs - - - Typography\Typography.OpenFont\Tables\HorizontalMetrics.cs - - - Typography\Typography.OpenFont\Tables\MaxProfile.cs - - - Typography\Typography.OpenFont\Tables\NameEntry.cs - - - Typography\Typography.OpenFont\Tables\OS2.cs - - - Typography\Typography.OpenFont\Tables\Post.cs - - - Typography\Typography.OpenFont\Tables\TableEntry.cs - - - Typography\Typography.OpenFont\Tables\TableEntryCollection.cs - - - Typography\Typography.OpenFont\Tables\TableHeader.cs - - - Typography\Typography.OpenFont\Tables\Utils.cs - - - Typography\Typography.OpenFont\TrueTypeInterperter\ForNet20.cs - - - Typography\Typography.OpenFont\TrueTypeInterperter\Interpreter.cs - - - Typography\Typography.OpenFont\TrueTypeInterperter\InvalidFontException.cs - - - Typography\Typography.OpenFont\Typeface.cs - - - Typography\Typography.OpenFont\WebFont\Woff2Reader.cs - - - Typography\Typography.OpenFont\WebFont\WoffReader.cs - - - Typography\Typography.TextBreak\Typography.TextBreak\BreakBounds.cs - - - Typography\Typography.TextBreak\Typography.TextBreak\BreakEngine.cs - - - Typography\Typography.TextBreak\Typography.TextBreak\BreakingEngine.cs - - - Typography\Typography.TextBreak\Typography.TextBreak\CustomBreaker.cs - - - Typography\Typography.TextBreak\Typography.TextBreak\CustomBreakerBuilder.cs - - - Typography\Typography.TextBreak\Typography.TextBreak\CustomDict.cs - - - Typography\Typography.TextBreak\Typography.TextBreak\DictionaryBasedBreakingEngine\BurneseBreakingEngine.cs - - - Typography\Typography.TextBreak\Typography.TextBreak\DictionaryBasedBreakingEngine\CJBreakingEngine.cs - - - Typography\Typography.TextBreak\Typography.TextBreak\DictionaryBasedBreakingEngine\KhmerDictionaryBreakingEngine.cs - - - Typography\Typography.TextBreak\Typography.TextBreak\DictionaryBasedBreakingEngine\LaoDictionaryBreakingEngine.cs - - - Typography\Typography.TextBreak\Typography.TextBreak\DictionaryBasedBreakingEngine\ThaiDictionaryBreakingEngine.cs - - - Typography\Typography.TextBreak\Typography.TextBreak\EngBreakingEngine.cs - - - Typography\Typography.TextBreak\Typography.TextBreak\WordVisitor.cs - - - Typography\Typography.TextFlow\Dom\EditableTextBlockLayoutEngine.cs - - - Typography\Typography.TextFlow\Dom\EditableTextLine.cs - - - Typography\Typography.TextFlow\Dom\IRun.cs - - - Typography\Typography.TextFlow\Dom\TextBuffer.cs - - - Typography\Typography.TextFlow\Dom\TextRun.cs - - - Typography\Typography.TextFlow\Simple\SmallLine.cs - - - Typography\Typography.TextFlow\TextLexer\TextLexer.cs - - - Typography\Typography.TextServices\FontStoreAndManagment\FontManagement.cs - - - Typography\Typography.TextServices\IcuData\LangCodes.cs - - - Typography\Typography.TextServices\TextServices.cs - - - Typography\Typography.TextServices\Utils\CRC32.cs - - - \ No newline at end of file diff --git a/src/x_autogen_xamarin_droid/PixelFarm.One.HtmlRenderer/packages.config b/src/x_autogen_xamarin_droid/PixelFarm.One.HtmlRenderer/packages.config deleted file mode 100644 index 75817011f..000000000 --- a/src/x_autogen_xamarin_droid/PixelFarm.One.HtmlRenderer/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/x_autogen_xamarin_ios/PixelFarm.One.HtmlRenderer/Info.plist b/src/x_autogen_xamarin_ios/PixelFarm.One.HtmlRenderer/Info.plist deleted file mode 100644 index 1722fb1b2..000000000 --- a/src/x_autogen_xamarin_ios/PixelFarm.One.HtmlRenderer/Info.plist +++ /dev/null @@ -1,36 +0,0 @@ - - - - - CFBundleDisplayName - Xamarin.iOS.GLES2 - CFBundleIdentifier - com.companyname.Xamarin.iOS.GLES2 - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - MinimumOSVersion - - UIDeviceFamily - - 2 - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - \ No newline at end of file diff --git a/src/x_autogen_xamarin_ios/PixelFarm.One.HtmlRenderer/PixelFarm.One.HtmlRenderer.csproj b/src/x_autogen_xamarin_ios/PixelFarm.One.HtmlRenderer/PixelFarm.One.HtmlRenderer.csproj deleted file mode 100644 index fdb433e71..000000000 --- a/src/x_autogen_xamarin_ios/PixelFarm.One.HtmlRenderer/PixelFarm.One.HtmlRenderer.csproj +++ /dev/null @@ -1,2842 +0,0 @@ - - - - Debug - iPhoneSimulator - {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Library - PixelFarm.One.HtmlRenderer.IOS - Resources - PixelFarm.One.HtmlRenderer.IOS - {6DF8E310-8300-4A11-A547-AC81145E6174} - - - true - full - false - bin\iPhoneSimulator\Debug - __IOS__;__MOBILE__;__UNIFIED__; ;PIXEL_FARM; PIXEL_FARM_NET20; NET20; SHARPZIPLIB;NETSTANDARD; - prompt - 4 - false - x86_64 - None - true - true - - - none - true - bin\iPhoneSimulator\Release - prompt - 4 - None - x86_64 - false - true - - - true - full - false - bin\iPhone\Debug - TRACE;DEBUG;__IOS__;__MOBILE__;__UNIFIED__; ;PIXEL_FARM; PIXEL_FARM_NET20; NET20; SHARPZIPLIB;NETSTANDARD; - prompt - 4 - false - ARM64 - Entitlements.plist - iPhone Developer - true - true - false - - - none - true - bin\iPhone\Release - prompt - 4 - Entitlements.plist - ARMv7, ARM64 - false - iPhone Developer - true - - - none - True - bin\iPhone\Ad-Hoc - prompt - 4 - False - ARMv7, ARM64 - Entitlements.plist - True - Automatic:AdHoc - iPhone Distribution - true - - - none - True - bin\iPhone\AppStore - prompt - 4 - False - ARMv7, ARM64 - Entitlements.plist - Automatic:AppStore - iPhone Distribution - true - - - - - - - - - - - - - - - - - - - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\Color\ColorBgra.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\Color\HsvColor.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\Color\RgbColor.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\PdnResources.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\PixelOps\BinaryPixelOp.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\PixelOps\BinaryPixelOps.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\PixelOps\IPixelOp.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\PixelOps\PixelOp.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\PixelOps\UnaryPixelOp.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\PixelOps\UnaryPixelOps.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\RenderArgs.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\Renderer\GradientRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\Renderer\GradientRenderers.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\Renderer\Histogram.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\Renderer\HistogramLuminosity.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\Renderer\HistogramRGB.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\ResamplingAlgorithm.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\Scanline.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\Surface.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\UserBlendOps\UserBlendOp.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\UserBlendOps\UserBlendOps.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\UserBlendOps\UserBlendOps.Generated.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\01_Core\Utility.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Blur\BrightnessAndContrastRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Blur\MotionBlurRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Blur\ZoomBlurEffRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Convolution\ColorDiffEffect.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Convolution\ConvolutionRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Convolution\EdgeDetectRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Convolution\EmbossRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Convolution\GaussainBlurRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Convolution\ReliefEffectRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Histogram\HistogramRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Histogram\MedianRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Histogram\OutlineRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Histogram\ReduceNoiseRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Histogram\SharpenRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Histogram\UnfocusRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Levels\AutoLevelRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Levels\SepiaRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Material\BlugeEffectRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Material\CloudEffect.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Material\GlowRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Material\OilPaintRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Material\PencilSketchRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Material\TileRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Material\TwistRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Others\InkSketchRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Others\JulianFractalRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Others\PerlinNoise2D.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Others\RotateAndZoomRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\PixelOps\HueAndSatRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\PixelOps\InvertColorRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\PixelOps\PosterizeRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\TransformEffect\RotateZoomEffect.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\TransformEffect\RotateZoomEffectConfigToken.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Wrap\PolarInversionEffect.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Wrap\WarpEdgeBehavior.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\02_Fx\Wrap\WrapBasedEffRenderer.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\EffectRendererBase.cs - - - PixelFarm\BackEnd.PaintFx\PdnSharedProject\PlatformMemory.cs - - - PixelFarm\BackEnd.Triangulation\Delaunay\AdvancingFront.cs - - - PixelFarm\BackEnd.Triangulation\Delaunay\AdvancingFrontNode.cs - - - PixelFarm\BackEnd.Triangulation\Delaunay\DelaunayTriangle.cs - - - PixelFarm\BackEnd.Triangulation\Delaunay\DTSweep.cs - - - PixelFarm\BackEnd.Triangulation\Delaunay\DTSweepConstraint.cs - - - PixelFarm\BackEnd.Triangulation\Delaunay\DTSweepContext.cs - - - PixelFarm\BackEnd.Triangulation\Delaunay\DTSweepDebugContext.cs - - - PixelFarm\BackEnd.Triangulation\Delaunay\PointOnEdgeException.cs - - - PixelFarm\BackEnd.Triangulation\P2T.cs - - - PixelFarm\BackEnd.Triangulation\Polygon\Polygon.cs - - - PixelFarm\BackEnd.Triangulation\Sets\ConstrainedPointSet.cs - - - PixelFarm\BackEnd.Triangulation\Sets\PointSet.cs - - - PixelFarm\BackEnd.Triangulation\Triangulation\ITriangulatable.cs - - - PixelFarm\BackEnd.Triangulation\Triangulation\Orientation.cs - - - PixelFarm\BackEnd.Triangulation\Triangulation\TriangulationAlgorithm.cs - - - PixelFarm\BackEnd.Triangulation\Triangulation\TriangulationContext.cs - - - PixelFarm\BackEnd.Triangulation\Triangulation\TriangulationDebugContext.cs - - - PixelFarm\BackEnd.Triangulation\Triangulation\TriangulationMode.cs - - - PixelFarm\BackEnd.Triangulation\Triangulation\TriangulationPoint.cs - - - PixelFarm\BackEnd.Triangulation\Triangulation\TriangulationUtil.cs - - - PixelFarm\BackEnd.Triangulation\Util\PointGenerator.cs - - - PixelFarm\BackEnd.Triangulation\Util\PolygonGenerator.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\0_CustomRenderElements\CustomContainerRenderBox.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\0_CustomRenderElements\CustomImageRenderBox.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\0_CustomRenderElements\CustomRenderElements.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\0_CustomRenderElements\CustomTextRun.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\0_CustomRenderElements\RenderElementExtension.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\1_UIElement\1_UIElement.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\1_UIElement\2_UIElement_EventListener.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\1_UIElement\3_AbstractRect.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\1_UIElement\4_UICollection.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\1_UIElement\5_IScrollable.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\1_UIElement\UIDragHitCollection.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\1_UIElement\UIVisitor.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\2_Basic\0_AbstractBox.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\2_Basic\1_ImageBox.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\2_Basic\2_TextBox.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\2_Basic\3_Box.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\2_Basic\4_Label.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\3_Grid\2_GridLayer.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\3_Grid\3_GridTable.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\3_Grid\5_GridBox.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\4.1_Composites\CheckBox.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\4.1_Composites\ComboBox.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\4.1_Composites\HingeBox.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\4.1_Composites\HingeRelation.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\4.1_Composites\ListView.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\4.1_Composites\Menu.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\4.1_Composites\ScrollBar.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\4.1_Composites\TextBoxContainer.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\4.1_Composites\TreeView.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\6_InternalResourceMx\ClientBinder.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\6_InternalResourceMx\ResImageList.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\7_WindowUI\UIFloatWindow.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\8.2_Canvas\MiniAggCanvasBox.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\8.2_Canvas\MiniAggCanvasRenderElement.cs - - - PixelFarm\LayoutFarm.YourBasicCustomWidgets_SH\9_TextContentSplitter\ContentTextSplitter.cs - - - PixelFarm\ImgCodec.Core\Color.cs - - - PixelFarm\ImgCodec.Core\ExtendedImage.cs - - - PixelFarm\ImgCodec.Core\ExtraImageInfo.cs - - - PixelFarm\ImgCodec.Core\FlippingType.cs - - - PixelFarm\ImgCodec.Core\Helpers\ExtensionAttribute.cs - - - PixelFarm\ImgCodec.Core\Helpers\ForNet20.cs - - - PixelFarm\ImgCodec.Core\Helpers\Guard.cs - - - PixelFarm\ImgCodec.Core\ImageFormatException.cs - - - PixelFarm\ImgCodec.Core\ImageFrameCollection.cs - - - PixelFarm\ImgCodec.Core\ImageProperty.cs - - - PixelFarm\ImgCodec.Core\ImagePropertyCollection.cs - - - PixelFarm\ImgCodec.Core\ImgExtensionMethods.cs - - - PixelFarm\ImgCodec.Core\IO\Decoders.cs - - - PixelFarm\ImgCodec.Core\IO\Encoders.cs - - - PixelFarm\ImgCodec.Core\IO\IImageDecoder.cs - - - PixelFarm\ImgCodec.Core\IO\IImageEncoder.cs - - - PixelFarm\ImgCodec.Core\IO\UnsupportedImageFormatException.cs - - - PixelFarm\ImgCodec.Core\Rectangle.cs - - - PixelFarm\ImgCodec.Core\RotationType.cs - - - PixelFarm\ImgCodec.Core\SimpleImage.cs - - - PixelFarm\ImgCodec.Gif\DisposalMethod.cs - - - PixelFarm\ImgCodec.Gif\GifDecoder.cs - - - PixelFarm\ImgCodec.Gif\GifGraphicsControlExtension.cs - - - PixelFarm\ImgCodec.Gif\GifImageDescriptor.cs - - - PixelFarm\ImgCodec.Gif\GifLogicalScreenDescriptor.cs - - - PixelFarm\ImgCodec.Gif\LZWDecoder.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\DCT.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\DecodedJpeg.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\Decoder\HuffmanTable.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\Decoder\JpegComponent.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\Decoder\JpegDecoder.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\Decoder\JpegFrame.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\Decoder\JpegHuffmanTable.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\Decoder\JpegQuantizationTable.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\Decoder\JpegScan.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\Encoder\JpegEncoder.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\FDCT.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\Image.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\IO\BinaryReader.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\IO\BinaryWriter.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\IO\JpegBinaryReader.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\JpegMarker.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\YCbCr.cs - - - PixelFarm\ImgCodec.Jpeg\FluxJpeg.Core\ZigZag.cs - - - PixelFarm\ImgCodec.Jpeg\JpegDecoder.cs - - - PixelFarm\ImgCodec.Jpeg\JpegEncoder.cs - - - PixelFarm\ImgCodec.LibJpeg\BitmapDestination.cs - - - PixelFarm\ImgCodec.LibJpeg\BitStream.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\DensityUnit.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\arith_entropy_decoder.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\arith_entropy_encoder.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\bitread_perm_state.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\bitread_working_state.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\ComponentBuffer.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\d_derived_tbl.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\huff_entropy_decoder.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\huff_entropy_encoder.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\JpegUtils.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_color_converter.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_color_deconverter.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_color_quantizer.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_comp_master.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_c_coef_controller.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_c_main_controller.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_c_prep_controller.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_decomp_master.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_downsampler.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_d_coef_controller.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_d_main_controller.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_d_post_controller.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_entropy_decoder.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_entropy_encoder.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_forward_dct.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_input_controller.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_inverse_dct.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_marker_reader.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_marker_writer.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_scan_info.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\jpeg_upsampler.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\J_BUF_MODE.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\my_1pass_cquantizer.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\my_2pass_cquantizer.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\my_c_coef_controller.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\my_destination_mgr.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\my_merged_upsampler.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\my_source_mgr.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\my_trans_c_coef_controller.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\Internal\my_upsampler.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\JBLOCK.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\JHUFF_TBL.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\JpegConstants.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\jpeg_common_struct.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\jpeg_component_info.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\jpeg_compress_struct.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\jpeg_decompress_struct.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\jpeg_destination_mgr.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\jpeg_error_mgr.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\JPEG_MARKER.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\jpeg_marker_struct.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\jpeg_progress_mgr.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\jpeg_source_mgr.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\JQUANT_TBL.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\jvirt_array.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\J_COLOR_SPACE.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\J_COLOR_TRANSFORM.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\J_DCT_METHOD.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\J_DITHER_MODE.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\J_MESSAGE_CODE.cs - - - PixelFarm\ImgCodec.LibJpeg\Classic\ReadResult.cs - - - PixelFarm\ImgCodec.LibJpeg\CompressionParameters.cs - - - PixelFarm\ImgCodec.LibJpeg\DecompressionParameters.cs - - - PixelFarm\ImgCodec.LibJpeg\DecompressorToJpegImage.cs - - - PixelFarm\ImgCodec.LibJpeg\Enumerations.cs - - - PixelFarm\ImgCodec.LibJpeg\IDecompressDestination.cs - - - PixelFarm\ImgCodec.LibJpeg\IRawImage.cs - - - PixelFarm\ImgCodec.LibJpeg\Jpeg.cs - - - PixelFarm\ImgCodec.LibJpeg\JpegImage.cs - - - PixelFarm\ImgCodec.LibJpeg\RawImage.cs - - - PixelFarm\ImgCodec.LibJpeg\SampleRow.cs - - - PixelFarm\ImgCodec.LibJpeg\Utils.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\BufferedStreamReader.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\ChunkReader.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\ChunkReaderMode.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\ChunkCopyBehaviour.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\ChunkHelper.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\ChunkLoadBehaviour.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\ChunkPredicate.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\ChunkPredicateEquiv.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\ChunkPredicateId.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\ChunkPredicateId2.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\ChunkRaw.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\ChunksList.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\ChunksListForWrite.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunk.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkBKGD.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkCHRM.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkGAMA.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkHIST.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkICCP.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkIDAT.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkIEND.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkIHDR.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkITXT.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkMultiple.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkOFFS.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkPHYS.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkPLTE.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkSBIT.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkSingle.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkSkipped.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkSPLT.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkSRGB.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkSTER.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkTEXT.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkTextVar.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkTIME.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkTRNS.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkUNKNOWN.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngChunkZTXT.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Chunks\PngMetadata.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\FileHelper.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\FilterType.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\FilterWriteStrategy.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\IBytesConsumer.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\ImageInfo.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\ImageLine.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\ImageLineHelper.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\ImageLines.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\PngCsUtils.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\PngDeinterlacer.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\PngHelperInternal.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\PngIDatChunkInputStream.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\PngIDatChunkOutputStream.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\PngjBadCrcException.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\PngjException.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\PngjExceptionInternal.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\PngjInputException.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\PngjOutputException.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\PngjUnsupportedException.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\PngReader.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\PngWriter.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\ProgressiveOutputStream.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Zlib\Adler32.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Zlib\AZlibInputStream.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Zlib\AZlibOutputStream.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Zlib\CRC32.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Zlib\DeflateCompressLevel.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Zlib\EDeflateCompressStrategy.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Zlib\ZlibInputStreamIs.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Zlib\ZlibInputStreamMs.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Zlib\ZlibOutputStreamIs.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Zlib\ZlibOutputStreamMs.cs - - - PixelFarm\ImgCodec.PngCs\ImgCodec.PngCs\Zlib\ZlibStreamFactory.cs - - - PixelFarm\ImgCodec.Png\GrayscaleReader.cs - - - PixelFarm\ImgCodec.Png\IColorReader.cs - - - PixelFarm\ImgCodec.Png\Ionic.Zlib\CRC32.cs - - - PixelFarm\ImgCodec.Png\Ionic.Zlib\Deflate.cs - - - PixelFarm\ImgCodec.Png\Ionic.Zlib\DeflateStream.cs - - - PixelFarm\ImgCodec.Png\Ionic.Zlib\GZipStream.cs - - - PixelFarm\ImgCodec.Png\Ionic.Zlib\Inflate.cs - - - PixelFarm\ImgCodec.Png\Ionic.Zlib\InfTree.cs - - - PixelFarm\ImgCodec.Png\Ionic.Zlib\ParallelDeflateOutputStream.cs - - - PixelFarm\ImgCodec.Png\Ionic.Zlib\Tree.cs - - - PixelFarm\ImgCodec.Png\Ionic.Zlib\Zlib.cs - - - PixelFarm\ImgCodec.Png\Ionic.Zlib\ZlibBaseStream.cs - - - PixelFarm\ImgCodec.Png\Ionic.Zlib\ZlibCodec.cs - - - PixelFarm\ImgCodec.Png\Ionic.Zlib\ZlibConstants.cs - - - PixelFarm\ImgCodec.Png\Ionic.Zlib\ZlibStream.cs - - - PixelFarm\ImgCodec.Png\MyCrc32.cs - - - PixelFarm\ImgCodec.Png\PaletteIndexReader.cs - - - PixelFarm\ImgCodec.Png\PngChunk.cs - - - PixelFarm\ImgCodec.Png\PngColorTypeInformation.cs - - - PixelFarm\ImgCodec.Png\PngDecoder.cs - - - PixelFarm\ImgCodec.Png\PngEncoder.cs - - - PixelFarm\ImgCodec.Png\PngHeader.cs - - - PixelFarm\ImgCodec.Png\TruecolorReader.cs - - - PixelFarm\BackEnd.SharpZipLib\BZip2\BZip2.cs - - - PixelFarm\BackEnd.SharpZipLib\BZip2\BZip2Constants.cs - - - PixelFarm\BackEnd.SharpZipLib\BZip2\BZip2Exception.cs - - - PixelFarm\BackEnd.SharpZipLib\BZip2\BZip2InputStream.cs - - - PixelFarm\BackEnd.SharpZipLib\BZip2\BZip2OutputStream.cs - - - PixelFarm\BackEnd.SharpZipLib\Checksum\Adler32.cs - - - PixelFarm\BackEnd.SharpZipLib\Checksum\BZip2Crc.cs - - - PixelFarm\BackEnd.SharpZipLib\Checksum\Crc32.cs - - - PixelFarm\BackEnd.SharpZipLib\Checksum\IChecksum.cs - - - PixelFarm\BackEnd.SharpZipLib\Core\FileSystemScanner.cs - - - PixelFarm\BackEnd.SharpZipLib\Core\INameTransform.cs - - - PixelFarm\BackEnd.SharpZipLib\Core\IScanFilter.cs - - - PixelFarm\BackEnd.SharpZipLib\Core\NameFilter.cs - - - PixelFarm\BackEnd.SharpZipLib\Core\PathFilter.cs - - - PixelFarm\BackEnd.SharpZipLib\Core\StreamUtils.cs - - - PixelFarm\BackEnd.SharpZipLib\Core\WindowsPathUtils.cs - - - PixelFarm\BackEnd.SharpZipLib\Encryption\PkzipClassic.cs - - - PixelFarm\BackEnd.SharpZipLib\Encryption\ZipAESStream.cs - - - PixelFarm\BackEnd.SharpZipLib\Encryption\ZipAESTransform.cs - - - PixelFarm\BackEnd.SharpZipLib\GZip\GZip.cs - - - PixelFarm\BackEnd.SharpZipLib\GZip\GZipConstants.cs - - - PixelFarm\BackEnd.SharpZipLib\GZip\GZipException.cs - - - PixelFarm\BackEnd.SharpZipLib\GZip\GzipInputStream.cs - - - PixelFarm\BackEnd.SharpZipLib\GZip\GzipOutputStream.cs - - - PixelFarm\BackEnd.SharpZipLib\Lzw\LzwConstants.cs - - - PixelFarm\BackEnd.SharpZipLib\Lzw\LzwException.cs - - - PixelFarm\BackEnd.SharpZipLib\Lzw\LzwInputStream.cs - - - PixelFarm\BackEnd.SharpZipLib\SharpZipBaseException.cs - - - PixelFarm\BackEnd.SharpZipLib\Tar\InvalidHeaderException.cs - - - PixelFarm\BackEnd.SharpZipLib\Tar\TarArchive.cs - - - PixelFarm\BackEnd.SharpZipLib\Tar\TarBuffer.cs - - - PixelFarm\BackEnd.SharpZipLib\Tar\TarEntry.cs - - - PixelFarm\BackEnd.SharpZipLib\Tar\TarException.cs - - - PixelFarm\BackEnd.SharpZipLib\Tar\TarHeader.cs - - - PixelFarm\BackEnd.SharpZipLib\Tar\TarInputStream.cs - - - PixelFarm\BackEnd.SharpZipLib\Tar\TarOutputStream.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\Compression\Deflater.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\Compression\DeflaterConstants.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\Compression\DeflaterEngine.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\Compression\DeflaterHuffman.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\Compression\DeflaterPending.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\Compression\Inflater.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\Compression\InflaterDynHeader.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\Compression\InflaterHuffmanTree.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\Compression\PendingBuffer.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\Compression\Streams\DeflaterOutputStream.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\Compression\Streams\InflaterInputStream.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\Compression\Streams\OutputWindow.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\Compression\Streams\StreamManipulator.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\FastZip.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\IEntryFactory.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\WindowsNameTransform.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\ZipConstants.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\ZipEntry.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\ZipEntryFactory.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\ZipException.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\ZipExtraData.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\ZipFile.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\ZipHelperStream.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\ZipInputStream.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\ZipNameTransform.cs - - - PixelFarm\BackEnd.SharpZipLib\Zip\ZipOutputStream.cs - - - PixelFarm\BackEnd.Tesselate\ActiveRegion.cs - - - PixelFarm\BackEnd.Tesselate\ContourVertex.cs - - - PixelFarm\BackEnd.Tesselate\Dictionary.cs - - - PixelFarm\BackEnd.Tesselate\Face.cs - - - PixelFarm\BackEnd.Tesselate\HalfEdge.cs - - - PixelFarm\BackEnd.Tesselate\MaxFirstList.cs - - - PixelFarm\BackEnd.Tesselate\Mesh.cs - - - PixelFarm\BackEnd.Tesselate\Tesselator.cs - - - PixelFarm\BackEnd.Triangulation\x_notused\DTSweepBasin.cs - - - PixelFarm\BackEnd.Triangulation\x_notused\DTSweepEdgeEvent.cs - - - PixelFarm\BackEnd.Triangulation\x_notused\DTSweepPointComparator.cs - - - PixelFarm\BackEnd.Triangulation\x_notused\FixedArray3.cs - - - PixelFarm\BackEnd.Triangulation\x_notused\FixedBitArray3.cs - - - PixelFarm\BackEnd.Triangulation\x_notused\PolygonSet.cs - - - PixelFarm\BackEnd.Triangulation\x_notused\TriangulationConstraint.cs - - - PixelFarm\BackEnd.TypeMirror\SimpleReflectionHelper.cs - - - PixelFarm\PaintLab.PlatformBridge\Common\Clipboard.cs - - - PixelFarm\PaintLab.PlatformBridge\Common\GeneralEventListener.cs - - - PixelFarm\PaintLab.PlatformBridge\Common\IPlatformWindowBox.cs - - - PixelFarm\PaintLab.PlatformBridge\Common\Keys.cs - - - PixelFarm\PaintLab.PlatformBridge\Common\UIPlatform.cs - - - PixelFarm\PaintLab.PlatformBridge\Common\UITimerTask.cs - - - PixelFarm\PaintLab.PlatformBridge\Events\IEventListener.cs - - - PixelFarm\PaintLab.PlatformBridge\Events\IEventPortal.cs - - - PixelFarm\PaintLab.PlatformBridge\Events\ITopWindowEventRoot.cs - - - PixelFarm\PaintLab.PlatformBridge\Events\ScrollSurfaceRequestEventArgs.cs - - - PixelFarm\PaintLab.PlatformBridge\Events\UIEventArgs.cs - - - PixelFarm\PaintLab.PlatformBridge\Events\UIEventNames.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.1_EditableRuns\EditableRun.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.1_EditableRuns\EditableRunCharLocation.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.1_EditableRuns\EditableTextRun.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.1_EditableRuns\SolidTextRun.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.1_EditableRuns\TextSpanSytle.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.1_EditableRuns\VisualPointInfo.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.1_EditableRuns\VisualSelectionRange.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.2_Lines\0_EditableTextLine.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.2_Lines\1_EditableTextLine_CORE_Collection.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.2_Lines\2_EditableTextLine_PRIVATE_CollectionFeatures2.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.2_Lines\3_EditableTextLine_PUBLIC_CollectionFeatures.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.2_Lines\4_EditableTextLine_ArrangeAndResizingMechanism.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.2_Lines\6_EditableTextLine_Advanced.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.2_Lines\debugActivityRecorder.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.2_Lines\TextLineReaderWriter.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.3_Layer\1_EditableTextFlowLayer.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\1.3_Layer\1_EditableTextFlowLayer_CORE_Collection.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\2.1_MultiLineController\DocumentActions.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\2.1_MultiLineController\TextLayerController.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\2.1_MultiLineController\TextLayerController.KeyboardFunctions.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\2.1_MultiLineController\TextLayerController.TextFunctions.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\2.1_MultiLineController\TextSurfaceEventListener.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\2.2_TextRenderBox\CaretRenderElement.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\2.2_TextRenderBox\GlobalCaretController.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\2.2_TextRenderBox\TextEditRenderBox.BaseFunctions.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\2.2_TextRenderBox\TextEditRenderBox.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\2.2_TextRenderBox\TextEditRenderBox.TextSurfaceFuntions.cs - - - PixelFarm\PaintLab.RenderTree.TextSurface\2.2_TextRenderBox\VisualPaintEventArgs.cs - - - PixelFarm\PaintLab.RenderTree\1_Root\1_RootGraphic.cs - - - PixelFarm\PaintLab.RenderTree\1_Root\1_RootGraphic_p1_dbug.cs - - - PixelFarm\PaintLab.RenderTree\1_Root\1_RootGraphic_p2_dbug.cs - - - PixelFarm\PaintLab.RenderTree\1_Root\2_RenderRequest.cs - - - PixelFarm\PaintLab.RenderTree\1_Root\3_GraphicsTimerTask.cs - - - PixelFarm\PaintLab.RenderTree\2_RenderElement\0_RenderElement.cs - - - PixelFarm\PaintLab.RenderTree\2_RenderElement\1_RenderElement.ElementPositioning_NoBoundChanged.cs - - - PixelFarm\PaintLab.RenderTree\2_RenderElement\2_RenderElement.ElementPositioning_1_WithSizeChanged.cs - - - PixelFarm\PaintLab.RenderTree\2_RenderElement\3_RenderElement.Bubble_Layout.cs - - - PixelFarm\PaintLab.RenderTree\2_RenderElement\4_RenderElement.Bubble_Repaint.cs - - - PixelFarm\PaintLab.RenderTree\2_RenderElement\RenderElementConst.cs - - - PixelFarm\PaintLab.RenderTree\2_RenderElement\RenderElement_IParentLink.cs - - - PixelFarm\PaintLab.RenderTree\2_RenderElement\x_RenderElement.debug.cs - - - PixelFarm\PaintLab.RenderTree\2_RenderElement\x_RenderElement_LocationHelper.cs - - - PixelFarm\PaintLab.RenderTree\3_Layers\0_IParentLink.cs - - - PixelFarm\PaintLab.RenderTree\3_Layers\1_RenderElementLayer.cs - - - PixelFarm\PaintLab.RenderTree\3_Layers\2_PlainLayer.cs - - - PixelFarm\PaintLab.RenderTree\4_Boxes\IBoxElement.cs - - - PixelFarm\PaintLab.RenderTree\4_Boxes\RenderBoxBase.cs - - - PixelFarm\PaintLab.RenderTree\5_HitTest\HitChain.cs - - - PixelFarm\PaintLab.RenderTree\6_debug\dbug.cs - - - PixelFarm\PaintLab.RenderTree\6_debug\dbugCoreConst.cs - - - PixelFarm\PaintLab.RenderTree\6_debug\dbugHitTracker.cs - - - PixelFarm\PaintLab.RenderTree\6_debug\dbugVisitorMessage.cs - - - PixelFarm\PaintLab.RenderTree\6_debug\dbugVisualEvalScrollBarTrace.cs - - - PixelFarm\PaintLab.RenderTree\6_debug\dbugVisualInvalidationTracer.cs - - - PixelFarm\PaintLab.RenderTree\6_debug\dbugVisualLayoutTracer.cs - - - PixelFarm\PaintLab.RenderTree\6_debug\IdbugOutputWindow.cs - - - PixelFarm\PaintLab.RenderTree\8_EventQueue\EventQueueSystem.cs - - - PixelFarm\PaintLab.AbstractPlatform\Accessories\KnownColors.cs - - - PixelFarm\PaintLab.AbstractPlatform\TempContext.cs - - - PixelFarm\PaintLab.YourImplementation\0_FrameworkInit\CommonTextServiceSetup.cs - - - PixelFarm\PaintLab.YourImplementation\0_FrameworkInit\FrameworkInitGLES.cs - - - PixelFarm\PaintLab.YourImplementation\0_FrameworkInit\ImgCodecMemBitmapIO.cs - - - PixelFarm\PaintLab.YourImplementation\0_FrameworkInit\StorageProviderImpl.cs - - - PixelFarm\PaintLab.YourImplementation\1_Events\GraphicsTimerTasksManager.cs - - - PixelFarm\PaintLab.YourImplementation\1_Events\MyIntervalTaskEventArgs.cs - - - PixelFarm\PaintLab.YourImplementation\1_Events\RenderElementEventPortal.cs - - - PixelFarm\PaintLab.YourImplementation\1_Events\TopWindowEventRoot.cs - - - PixelFarm\PaintLab.YourImplementation\1_Events\UIHoverMonitor.cs - - - PixelFarm\PaintLab.YourImplementation\2_ContentManagers\ImageCacheSystem.cs - - - PixelFarm\PaintLab.YourImplementation\2_ContentManagers\ImageContentManager.cs - - - PixelFarm\PaintLab.YourImplementation\2_ContentManagers\TextContentManager.cs - - - PixelFarm\PaintLab.YourImplementation\3_RenderTreeRoot\0_MyRootGraphic.cs - - - PixelFarm\PaintLab.YourImplementation\3_RenderTreeRoot\TopWindowRenderBox.cs - - - PixelFarm\PixelFarm.Vectors\3_Transform\1_Affine.cs - - - PixelFarm\PixelFarm.Vectors\3_Transform\2_Bilinear.cs - - - PixelFarm\PixelFarm.Vectors\3_Transform\3_Perspective.cs - - - PixelFarm\PixelFarm.Vectors\3_Transform\4_SimulEqGeneral.cs - - - PixelFarm\PixelFarm.BitmapBufferEx\BitmapBufferEx\00_Porting\NativeMethods.cs - - - PixelFarm\PixelFarm.BitmapBufferEx\BitmapBufferEx\BitmapBuffer.cs - - - PixelFarm\PixelFarm.BitmapBufferEx\BitmapBufferEx\BitmapBufferExtensions\AntialiasingExtensions.cs - - - PixelFarm\PixelFarm.BitmapBufferEx\BitmapBufferEx\BitmapBufferExtensions\BaseExtensions.cs - - - PixelFarm\PixelFarm.BitmapBufferEx\BitmapBufferEx\BitmapBufferExtensions\BlitExtensions.cs - - - PixelFarm\PixelFarm.BitmapBufferEx\BitmapBufferEx\BitmapBufferExtensions\ConvertExtensions.cs - - - PixelFarm\PixelFarm.BitmapBufferEx\BitmapBufferEx\BitmapBufferExtensions\FillExtensions.cs - - - PixelFarm\PixelFarm.BitmapBufferEx\BitmapBufferEx\BitmapBufferExtensions\FilterExtensions.cs - - - PixelFarm\PixelFarm.BitmapBufferEx\BitmapBufferEx\BitmapBufferExtensions\LineAaExtensions.cs - - - PixelFarm\PixelFarm.BitmapBufferEx\BitmapBufferEx\BitmapBufferExtensions\LineExtensions.cs - - - PixelFarm\PixelFarm.BitmapBufferEx\BitmapBufferEx\BitmapBufferExtensions\ShapeExtensions.cs - - - PixelFarm\PixelFarm.BitmapBufferEx\BitmapBufferEx\BitmapBufferExtensions\SplineExtensions.cs - - - PixelFarm\PixelFarm.BitmapBufferEx\BitmapBufferEx\BitmapBufferExtensions\TransformationExtensions.cs - - - PixelFarm\PixelFarm.BitmapBufferEx\BitmapBufferEx\BitmapBufferFactory.cs - - - PixelFarm\PixelFarm.BitmapBufferEx\BitmapBufferEx\BitmapContext.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\EsUtils\ES2Utils.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\EsUtils\ES3Utils.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\EsUtils\GeometryUtils.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\EsUtils\MiniShaderProgram.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\GLShader\ColorFillShaderBase.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\GLShader\FilterEffectShaders.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\GLShader\GradientShaders.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\GLShader\InvertAlphaLineSmoothShader.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\GLShader\ShaderBase.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\GLShader\SignedDistanceFieldShader.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\GLShader\SimpleRectTextureShader.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\GLShader\SmoothLineShader.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\GLShader\SolidColorFillShader.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\GLTexture\FrameBuffer.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\GLTexture\GLBitmap.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\RenderSuface\GLGradientColorProvider.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\RenderSuface\GLRenderSurface.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\RenderSuface\ImageFillStyle.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\RenderSuface\InternalGraphicsPath.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\RenderSuface\ShaderSharedResource.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\RenderSuface\SmoothMode.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\RenderSuface\VertexBufferObject.cs - - - PixelFarm\PixelFarm.DrawingGL\DrawingGL\RenderSuface\VertexPositionColor.cs - - - PixelFarm\PixelFarm.Drawing.GLES\0_Start\GLES2Platform.cs - - - PixelFarm\PixelFarm.Drawing.GLES\0_Start\GLES2PlatformFontMx.cs - - - PixelFarm\PixelFarm.Drawing.GLES\BitmapAtlasPainter\BitmapAtlasManager.cs - - - PixelFarm\PixelFarm.Drawing.GLES\BitmapAtlasPainter\BitmapAtlasPainter.cs - - - PixelFarm\PixelFarm.Drawing.GLES\DrawBoard\1_MyGLDrawBoard_Specific.cs - - - PixelFarm\PixelFarm.Drawing.GLES\DrawBoard\2_MyGLDrawBoard_CoordinateAndClip.cs - - - PixelFarm\PixelFarm.Drawing.GLES\DrawBoard\3_MyGLDrawBoard_DrawGraphics.cs - - - PixelFarm\PixelFarm.Drawing.GLES\DrawBoard\4_MyGLDrawBoard_TextAndFonts.cs - - - PixelFarm\PixelFarm.Drawing.GLES\GLPainter\GLPainter.cs - - - PixelFarm\PixelFarm.Drawing.GLES\GLPainter\GLPainter_BrushAndFill.cs - - - PixelFarm\PixelFarm.Drawing.GLES\GLPainter\GLPainter_Imgs.cs - - - PixelFarm\PixelFarm.Drawing.GLES\GLPainter\GLPainter_MaskAndClipping.cs - - - PixelFarm\PixelFarm.Drawing.GLES\GLPainter\GLPainter_PenAndStroke.cs - - - PixelFarm\PixelFarm.Drawing.GLES\GLPainter\GLPainter_TextAndFont.cs - - - PixelFarm\PixelFarm.Drawing.GLES\TextPrinter\GLBitmapGlyphTextPrinter.cs - - - PixelFarm\PixelFarm.Drawing.GLES\TextPrinter\MySimpleGLBitmapFontManager.cs - - - PixelFarm\BackEnd.BurningMineCurve\curveutils\CubicBezier.cs - - - PixelFarm\BackEnd.BurningMineCurve\curveutils\CurveBuilder.cs - - - PixelFarm\BackEnd.BurningMineCurve\curveutils\CurveFit.cs - - - PixelFarm\BackEnd.BurningMineCurve\curveutils\CurveFitBase.cs - - - PixelFarm\BackEnd.BurningMineCurve\curveutils\CurvePreprocess.cs - - - PixelFarm\BackEnd.BurningMineCurve\curveutils\Spline.cs - - - PixelFarm\BackEnd.BurningMineCurve\curveutils\SplineBuilder.cs - - - PixelFarm\BackEnd.BurningMineCurve\curveutils\VectorHelper.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization\0_ScanlineSpan.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization\1_Scanline.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization\2_ScanlinePacked8.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization\3_ScanlineUnpacked8.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization\4.1_ScanlineRasterizer.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization\4.2_CellAARasterizer.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization\4.3_VectorClipper.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization\5_DestBitmapRasterizer.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization\SubPixConst.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization_lines\1.1_LinesAA.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization_lines\1.2_PatternFilter.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization_lines\1.3_LineParameters.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization_lines\2.1_DistanceInterpolators.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization_lines\2.2_LineInterpolators.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization_lines\2.3_EllipseBrensenhemInterpolator.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization_lines\3.1_LineRenderer.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization_lines\3.2_OutlineRenderer.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization_lines\3.3_ImageLineRenderer.cs - - - PixelFarm\PixelFarm.CpuBlit\03_rasterization_lines\4_OutlineAARasterizer.cs - - - PixelFarm\PixelFarm.CpuBlit\04_fragmentprocessing\0_ISpanGenerator.cs - - - PixelFarm\PixelFarm.CpuBlit\04_fragmentprocessing\1_ImgSpanGen.cs - - - PixelFarm\PixelFarm.CpuBlit\04_fragmentprocessing\3_ImgSpanGenRGBA.cs - - - PixelFarm\PixelFarm.CpuBlit\04_fragmentprocessing\GammaLookUpTable.cs - - - PixelFarm\PixelFarm.CpuBlit\04_fragmentprocessing\IGammaFunction.cs - - - PixelFarm\PixelFarm.CpuBlit\04_fragmentprocessing\ISpanInterpolator.cs - - - PixelFarm\PixelFarm.CpuBlit\04_FragmentProcessing\LineInterpolators.cs - - - PixelFarm\PixelFarm.CpuBlit\04_FragmentProcessing\SpanInterpolatorLinear.cs - - - PixelFarm\PixelFarm.CpuBlit\04_FragmentProcessing\SpanInterpolatorPerspectiveLerp.cs - - - PixelFarm\PixelFarm.CpuBlit\04_FragmentProcessing_Gradient\GouraudVerticeBuilder.cs - - - PixelFarm\PixelFarm.CpuBlit\04_FragmentProcessing_Gradient\RGBAGouraudSpanGen.cs - - - PixelFarm\PixelFarm.CpuBlit\05_PixelProcessing\BitmapBlenderBase.cs - - - PixelFarm\PixelFarm.CpuBlit\05_PixelProcessing\IBitmapBlender.cs - - - PixelFarm\PixelFarm.CpuBlit\05_PixelProcessing\MemBitmapBinder.cs - - - PixelFarm\PixelFarm.CpuBlit\05_PixelProcessing\PixelBlender32.cs - - - PixelFarm\PixelFarm.CpuBlit\05_PixelProcessing\PixelBlenderBGRA.cs - - - PixelFarm\PixelFarm.CpuBlit\05_pixelprocessing\PixelBlenderOthers.cs - - - PixelFarm\PixelFarm.CpuBlit\05_pixelprocessing\SubBitmapBlender.cs - - - PixelFarm\PixelFarm.CpuBlit\08_imageresampling\IImageFilter.cs - - - PixelFarm\PixelFarm.CpuBlit\08_imageresampling\ImageFilterLookupTable.cs - - - PixelFarm\PixelFarm.CpuBlit\08_imageresampling\ImageFreeTransform.cs - - - PixelFarm\PixelFarm.CpuBlit\08_imageresampling\ImageInterpolationQuality.cs - - - PixelFarm\PixelFarm.CpuBlit\08_imageresampling\ImageTransform.cs - - - PixelFarm\PixelFarm.DrawingCore\2_Abstract_DrawingElements\Brushes_Pens.cs - - - PixelFarm\PixelFarm.DrawingCore\2_Abstract_DrawingElements\CombineMode.cs - - - PixelFarm\PixelFarm.DrawingCore\2_Abstract_DrawingElements\DashStyle.cs - - - PixelFarm\PixelFarm.DrawingCore\2_Abstract_DrawingElements\GraphicsPath.cs - - - PixelFarm\PixelFarm.DrawingCore\2_Abstract_DrawingElements\Image.cs - - - PixelFarm\PixelFarm.DrawingCore\2_Abstract_DrawingElements\Region.cs - - - PixelFarm\PixelFarm.DrawingCore\3_DrawBoard\0_VertexCommandAndOrientation.cs - - - PixelFarm\PixelFarm.DrawingCore\3_DrawBoard\1_VertexStore.cs - - - PixelFarm\PixelFarm.DrawingCore\3_DrawBoard\CO.cs - - - PixelFarm\PixelFarm.DrawingCore\3_DrawBoard\CRC32Calculator.cs - - - PixelFarm\PixelFarm.DrawingCore\3_DrawBoard\DrawBoard.cs - - - PixelFarm\PixelFarm.DrawingCore\3_DrawBoard\Others.cs - - - PixelFarm\PixelFarm.DrawingCore\3_DrawBoard\Painter.cs - - - PixelFarm\PixelFarm.DrawingCore\3_DrawBoard\RenderVx.cs - - - PixelFarm\PixelFarm.DrawingCore\3_DrawBoard\RequestFont.cs - - - PixelFarm\PixelFarm.Painter\0_Base\ForNet20.cs - - - PixelFarm\PixelFarm.Painter\2_General\ColorEx.cs - - - PixelFarm\PixelFarm.Painter\2_General\ITextPrinter.cs - - - PixelFarm\PixelFarm.Painter\2_General\TempContext.cs - - - PixelFarm\PixelFarm.Painter\3_Cpu_Blit\ColorRGBAf.cs - - - PixelFarm\PixelFarm.Painter\3_Cpu_Blit\MemBitmap.cs - - - PixelFarm\PixelFarm.Painter\3_Cpu_Blit\PainterExtensions.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\BoundingRect.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\CurveFlattener.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\LineWalker.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\PathWriter.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\RoundedRect.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\SimpleRect.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\Stroke.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\StrokeGen.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\StrokeGenerator.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\StrokeMath.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\SvgArcSegment.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\VectorToolBox.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\VertexData.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\VertexHitTester.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\VertexStoreBuilder.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\VertexStoreExtensions.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\VertexStoreTransformExtensions.cs - - - PixelFarm\PixelFarm.Painter\4_CpuBlit_VertexProcessing\VxsClipping.cs - - - PixelFarm\PixelFarm.PrimitiveGeo\AffinePlan.cs - - - PixelFarm\PixelFarm.PrimitiveGeo\BasicGeometries.cs - - - PixelFarm\PixelFarm.PrimitiveGeo\Color.cs - - - PixelFarm\PixelFarm.PrimitiveGeo\ICoordTransformer.cs - - - PixelFarm\PixelFarm.PrimitiveGeo\MemMx.cs - - - PixelFarm\PixelFarm.PrimitiveGeo\NativeMemMx.cs - - - PixelFarm\PixelFarm.PrimitiveGeo\Rectangle.cs - - - PixelFarm\PixelFarm.PrimitiveGeo\RectangleF.cs - - - PixelFarm\PixelFarm.PrimitiveGeo\RectInt.cs - - - PixelFarm\PixelFarm.Vectors\1_vectormaths\AggMath.cs - - - PixelFarm\PixelFarm.Vectors\1_vectormaths\AxisAlignedBoundingBox.cs - - - PixelFarm\PixelFarm.Vectors\1_vectormaths\BezierCurve.cs - - - PixelFarm\PixelFarm.Vectors\1_vectormaths\BezierCurveCubic.cs - - - PixelFarm\PixelFarm.Vectors\1_vectormaths\BezierCurveQuadric.cs - - - PixelFarm\PixelFarm.Vectors\1_vectormaths\MathHelper.cs - - - PixelFarm\PixelFarm.Vectors\1_vectormaths\Matrix4x4.cs - - - PixelFarm\PixelFarm.Vectors\1_vectormaths\MyVector2.cs - - - PixelFarm\PixelFarm.Vectors\1_vectormaths\Quaternion.cs - - - PixelFarm\PixelFarm.Vectors\1_vectormaths\Ray.cs - - - PixelFarm\PixelFarm.Vectors\1_vectormaths\Vector2.cs - - - PixelFarm\PixelFarm.Vectors\1_vectormaths\Vector3.cs - - - PixelFarm\PixelFarm.Vectors\1_vectormaths\Vector3Float.cs - - - PixelFarm\PixelFarm.Vectors\1_vectormaths\Vector4.cs - - - PixelFarm\PixelFarm.Vectors\2_geometry\Arc.cs - - - PixelFarm\PixelFarm.Vectors\2_geometry\BezireCurve.cs - - - PixelFarm\PixelFarm.Vectors\2_geometry\BSpline.cs - - - PixelFarm\PixelFarm.Vectors\2_geometry\Collections.cs - - - PixelFarm\PixelFarm.Vectors\2_geometry\Curves.cs - - - PixelFarm\PixelFarm.Vectors\2_geometry\Ellipse.cs - - - PixelFarm\PixelFarm.Vectors\2_geometry\RectD.cs - - - PixelFarm\PixelFarm.Vectors\3_transform\Viewport.cs - - - PixelFarm\PixelFarm.Vectors\4_Utils\PolygonSimplifier.cs - - - PixelFarm\PixelFarm.Vectors\4_Utils\SvgArc.cs - - - PixelFarm\PixelFarm.Vectors\4_Utils\TessTool.cs - - - PixelFarm\PixelFarm.Vectors\5_clipper\cliper.cs - - - PixelFarm\PixelFarm.Vectors\5_Clipper\ClipLiangBarsky.cs - - - PixelFarm\PixelFarm.Drawing\4_PlatformServices\StorageService.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\AggPainter\AggPainter.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\AggPainter\AggPainterPool.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\AggPainter\AggPainter_BrushAndFill.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\AggPainter\AggPainter_FontAndText.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\AggPainter\AggPainter_Imgs.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\AggPainter\AggPainter_MaskAndClipping.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\AggPainter\AggPainter_PenAndStroke.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\DrawBoard\AggRenderVx.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\DrawBoard\Canvas2dExtension.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\DrawBoard\CpuBlitRegion.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\DrawBoard\dbugVertexSourceIO.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\DrawBoard\GradientBrushes.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\DrawBoard\LineDashGenerator.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\DrawBoard\RectBorderHelper.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\DrawBoard\SvgRenderVx.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\DrawBoard\VertexStoreExtensions2.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Msdf\BasicElements.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Msdf\ContourCornerAndAnalyzingElems.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Msdf\EdgeBmpLut.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Msdf\EdgeColor.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Msdf\EdgeColoring.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Msdf\EdgeSegment.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Msdf\EquationSolver.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Msdf\MsdfGen.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Msdf\MsdfGen2.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Msdf\MsdfGen3.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Msdf\SignedDistance.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Msdf\SpriteTextureMapData.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Others\1_Base\BorderDouble.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Others\1_Base\ClipProxyImage.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Others\1_Base\GammaFuntions.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Others\1_Base\ImgFilters.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Others\1_Base\ProxyImage.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Others\3_Filter\BrightnesssAndContrast.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Others\3_Filter\ImageFilters.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Others\3_Filter\InternalBrightnessAndContrastAdjustment.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Others\3_Filter\PatternFilterBilnearColorRGBA.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Others\3_Filter\RecursiveBlur.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Others\3_Filter\SharpenFilter.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Others\3_Filter\StackBlur.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\Others\3_Filter\Transposer.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\PathReconstruction\BezierCurveReconstruction.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\PathReconstruction\BitmapBasedRegion.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\PathReconstruction\FloodFill.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\PathReconstruction\FloodFillTools.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\PathReconstruction\MixedRegion.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\PathReconstruction\OutlineTracer.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\PathReconstruction\PixelEvaluators.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\PathReconstruction\ReconstructedRegionData.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\PathReconstruction\VxsRegion.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\RenderSurface\AggRenderSurface.cs - - - PixelFarm\PixelFarm.Drawing\7_CpuBlitPainter\RenderSurface\AggRenderSurface_RenderImages.cs - - - PixelFarm\PixelFarm.Drawing\8_ImgReaders\ImageReaders.cs - - - PixelFarm\PixelFarm.Drawing\9_BitmapAtlas\AtlasItemImage.cs - - - PixelFarm\PixelFarm.Drawing\9_BitmapAtlas\BinPacker.cs - - - PixelFarm\PixelFarm.Drawing\9_BitmapAtlas\BitmapAtlasFile.cs - - - PixelFarm\PixelFarm.Drawing\9_BitmapAtlas\SimpleBitmapAtlasBuilder.cs - - - PixelFarm\PixelFarm.Drawing\9_BitmapAtlas\SimpleBitmaptAtlas.cs - - - Typography\PixelFarm.Typography\1.1_Drawing_Fonts\FontAtlasTextPrinter.cs - - - Typography\PixelFarm.Typography\1.1_Drawing_Fonts\FontStyleExtensions.cs - - - Typography\PixelFarm.Typography\1.1_Drawing_Fonts\GlyphBitmapStore.cs - - - Typography\PixelFarm.Typography\1.1_Drawing_Fonts\GlyphMeshStore.cs - - - Typography\PixelFarm.Typography\1.1_Drawing_Fonts\GlyphPathBuilder.cs - - - Typography\PixelFarm.Typography\1.1_Drawing_Fonts\GlyphSvgStore.cs - - - Typography\PixelFarm.Typography\1.1_Drawing_Fonts\GlyphTranslatorToVxs.cs - - - Typography\PixelFarm.Typography\1.1_Drawing_Fonts\OpenFontTextService.cs - - - Typography\PixelFarm.Typography\1.1_Drawing_Fonts\VxsTextPrinter.cs - - - Typography\PixelFarm.Typography\1.3_DrawingFonts\ManagedShapingService.cs - - - Typography\PixelFarm.Typography\1.3_DrawingFonts\TextShapingAndLayoutService.cs - - - Typography\PixelFarm.Typography\2_Drawing_Text\ActualFont.cs - - - Typography\PixelFarm.Typography\2_Drawing_Text\FontFace.cs - - - Typography\PixelFarm.Typography\2_Drawing_Text\FontGlyph.cs - - - Typography\PixelFarm.Typography\3_FontFaceImpl\AggGlyphTextureGen.cs - - - Typography\PixelFarm.Typography\3_FontFaceImpl\BitmapFontMx.cs - - - Typography\PixelFarm.Typography\3_FontFaceImpl\GlyphTextureBitmapGenerator.cs - - - Typography\PixelFarm.Typography\3_FontFaceImpl\NOpenFontFace.cs - - - Typography\PixelFarm.Typography\3_FontFaceImpl\OpenFontLoader.cs - - - Typography\PixelFarm.Typography\3_FontFaceImpl\ScriptLangConv.cs - - - Typography\PixelFarm.Typography\3_FontFaceImpl\TextureFontLoader.cs - - - Typography\FontAtlas\BinPacker.cs - - - Typography\FontAtlas\FontAtlasFile.cs - - - Typography\FontAtlas\GlyphImages.cs - - - Typography\FontAtlas\MsdfGlyphGen.cs - - - Typography\FontAtlas\SimpleFontAtlas.cs - - - Typography\FontAtlas\SimpleFontAtlasBuilder.cs - - - Typography\Typography.Contours\GlyphAnalysis\0_GlyphTriangle.cs - - - Typography\Typography.Contours\GlyphAnalysis\1_EdgeLine.cs - - - Typography\Typography.Contours\GlyphAnalysis\2_GlyphCentroidPair.cs - - - Typography\Typography.Contours\GlyphAnalysis\3_GlyphBoneJoint.cs - - - Typography\Typography.Contours\GlyphAnalysis\4_GlyphBone.cs - - - Typography\Typography.Contours\GlyphAnalysis\5_CentroidLineAndHub.cs - - - Typography\Typography.Contours\GlyphAnalysis\CurveGen.cs - - - Typography\Typography.Contours\GlyphAnalysis\GlyphContour.cs - - - Typography\Typography.Contours\GlyphAnalysis\GlyphContourBuilder.cs - - - Typography\Typography.Contours\GlyphAnalysis\GlyphIntermediateOutline.cs - - - Typography\Typography.Contours\GlyphAnalysis\GlyphOutlineAnalyzer.cs - - - Typography\Typography.Contours\GlyphAnalysis\GlyphOutlineWalker.cs - - - Typography\Typography.Contours\GlyphAnalysis\GlyphPartFlattener.cs - - - Typography\Typography.Contours\GlyphAnalysis\GlyphParts.cs - - - Typography\Typography.Contours\GlyphAnalysis\GlyphPoint.cs - - - Typography\Typography.Contours\GlyphAnalysis\MyMath.cs - - - Typography\Typography.Contours\GlyphAnalysis\Rect.cs - - - Typography\Typography.Contours\GlyphDynamicOutline.cs - - - Typography\Typography.Contours\GlyphMeshCollection.cs - - - Typography\Typography.Contours\GlyphPathBuilderBase.cs - - - Typography\Typography.Contours\TextPrinterBase.cs - - - Typography\Typography.GlyphLayout\GlyphIndexList.cs - - - Typography\Typography.GlyphLayout\GlyphLayout.cs - - - Typography\Typography.GlyphLayout\GlyphPosition.cs - - - Typography\Typography.GlyphLayout\GlyphSubstitution.cs - - - Typography\Typography.GlyphLayout\MeasureStringBox.cs - - - Typography\Typography.GlyphLayout\PixelScaleLayoutExtensions.cs - - - Typography\Typography.GlyphLayout\UserCharToGlyphIndexMap.cs - - - Typography\Typography.MsdfGen\BasicElements.cs - - - Typography\Typography.MsdfGen\EdgeColor.cs - - - Typography\Typography.MsdfGen\EdgeColoring.cs - - - Typography\Typography.MsdfGen\EdgeHolder.cs - - - Typography\Typography.MsdfGen\EdgeSegment.cs - - - Typography\Typography.MsdfGen\EquationSolver.cs - - - Typography\Typography.MsdfGen\MsdfGen.cs - - - Typography\Typography.MsdfGen\SignedDistance.cs - - - Typography\Typography.OpenFont\AdditionalInfo\AdobeGlyphList.cs - - - Typography\Typography.OpenFont\AdditionalInfo\AdobeGlyphListForNewFont.cs - - - Typography\Typography.OpenFont\AdditionalInfo\MacPostFormat1.cs - - - Typography\Typography.OpenFont\AdditionalInfo\OS2_IBMFontClassParameters.cs - - - Typography\Typography.OpenFont\Bounds.cs - - - Typography\Typography.OpenFont\CharacterMap.cs - - - Typography\Typography.OpenFont\Geometry.cs - - - Typography\Typography.OpenFont\Glyph.cs - - - Typography\Typography.OpenFont\IGlyphTranslator.cs - - - Typography\Typography.OpenFont\IO\ByteOrderSwappingBinaryReader.cs - - - Typography\Typography.OpenFont\OpenFontReader.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\AttachmentListTable.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\Base.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\ClassDefTable.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\COLR.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\CoverageTable.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\CPAL.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\FeatureInfo.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\FeatureList.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\GDEF.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\GlyphShapingTableEntry.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\GPOS.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\GPOS.Others.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\GSUB.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\IGlyphIndexList.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\JustificationTable.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\LigatureCaretListTable.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\MathTable.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\ScriptLang.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\ScriptList.cs - - - Typography\Typography.OpenFont\Tables.AdvancedLayout\ScriptTable.cs - - - Typography\Typography.OpenFont\Tables.BitmapAndSvgFonts\BitmapFontGlyphSource.cs - - - Typography\Typography.OpenFont\Tables.BitmapAndSvgFonts\BitmapFontsCommon.cs - - - Typography\Typography.OpenFont\Tables.BitmapAndSvgFonts\CBDT.cs - - - Typography\Typography.OpenFont\Tables.BitmapAndSvgFonts\CBLC.cs - - - Typography\Typography.OpenFont\Tables.BitmapAndSvgFonts\EBDT.cs - - - Typography\Typography.OpenFont\Tables.BitmapAndSvgFonts\EBLC.cs - - - Typography\Typography.OpenFont\Tables.BitmapAndSvgFonts\EBSC.cs - - - Typography\Typography.OpenFont\Tables.BitmapAndSvgFonts\SvgTable.cs - - - Typography\Typography.OpenFont\Tables.CFF\CFF.cs - - - Typography\Typography.OpenFont\Tables.CFF\CffEvaluationEngine.cs - - - Typography\Typography.OpenFont\Tables.CFF\CFFTable.cs - - - Typography\Typography.OpenFont\Tables.CFF\Type2CharStringParser.cs - - - Typography\Typography.OpenFont\Tables.Others\HorizontalDeviceMetrics.cs - - - Typography\Typography.OpenFont\Tables.Others\Kern.cs - - - Typography\Typography.OpenFont\Tables.Others\LinearThreashold.cs - - - Typography\Typography.OpenFont\Tables.Others\Merge.cs - - - Typography\Typography.OpenFont\Tables.Others\Meta.cs - - - Typography\Typography.OpenFont\Tables.Others\STAT.cs - - - Typography\Typography.OpenFont\Tables.Others\VerticalDeviceMetrics.cs - - - Typography\Typography.OpenFont\Tables.Others\VerticalMetrics.cs - - - Typography\Typography.OpenFont\Tables.Others\VerticalMetricsHeader.cs - - - Typography\Typography.OpenFont\Tables.TrueType\Cvt_Programs.cs - - - Typography\Typography.OpenFont\Tables.TrueType\Gasp.cs - - - Typography\Typography.OpenFont\Tables.TrueType\Glyf.cs - - - Typography\Typography.OpenFont\Tables.TrueType\GlyphLocations.cs - - - Typography\Typography.OpenFont\Tables.Variations\AVar.cs - - - Typography\Typography.OpenFont\Tables.Variations\Common.ItemVariationStore.cs - - - Typography\Typography.OpenFont\Tables.Variations\Common.TupleVariationStore.cs - - - Typography\Typography.OpenFont\Tables.Variations\CVar.cs - - - Typography\Typography.OpenFont\Tables.Variations\FVar.cs - - - Typography\Typography.OpenFont\Tables.Variations\GVar.cs - - - Typography\Typography.OpenFont\Tables.Variations\HVar.cs - - - Typography\Typography.OpenFont\Tables.Variations\MVar.cs - - - Typography\Typography.OpenFont\Tables.Variations\VVar.cs - - - Typography\Typography.OpenFont\Tables\Cmap.cs - - - Typography\Typography.OpenFont\Tables\Head.cs - - - Typography\Typography.OpenFont\Tables\HorizontalHeader.cs - - - Typography\Typography.OpenFont\Tables\HorizontalMetrics.cs - - - Typography\Typography.OpenFont\Tables\MaxProfile.cs - - - Typography\Typography.OpenFont\Tables\NameEntry.cs - - - Typography\Typography.OpenFont\Tables\OS2.cs - - - Typography\Typography.OpenFont\Tables\Post.cs - - - Typography\Typography.OpenFont\Tables\TableEntry.cs - - - Typography\Typography.OpenFont\Tables\TableEntryCollection.cs - - - Typography\Typography.OpenFont\Tables\TableHeader.cs - - - Typography\Typography.OpenFont\Tables\Utils.cs - - - Typography\Typography.OpenFont\TrueTypeInterperter\ForNet20.cs - - - Typography\Typography.OpenFont\TrueTypeInterperter\Interpreter.cs - - - Typography\Typography.OpenFont\TrueTypeInterperter\InvalidFontException.cs - - - Typography\Typography.OpenFont\Typeface.cs - - - Typography\Typography.OpenFont\WebFont\Woff2Reader.cs - - - Typography\Typography.OpenFont\WebFont\WoffReader.cs - - - Typography\Typography.TextBreak\Typography.TextBreak\BreakBounds.cs - - - Typography\Typography.TextBreak\Typography.TextBreak\BreakEngine.cs - - - Typography\Typography.TextBreak\Typography.TextBreak\BreakingEngine.cs - - - Typography\Typography.TextBreak\Typography.TextBreak\CustomBreaker.cs - - - Typography\Typography.TextBreak\Typography.TextBreak\CustomBreakerBuilder.cs - - - Typography\Typography.TextBreak\Typography.TextBreak\CustomDict.cs - - - Typography\Typography.TextBreak\Typography.TextBreak\DictionaryBasedBreakingEngine\BurneseBreakingEngine.cs - - - Typography\Typography.TextBreak\Typography.TextBreak\DictionaryBasedBreakingEngine\CJBreakingEngine.cs - - - Typography\Typography.TextBreak\Typography.TextBreak\DictionaryBasedBreakingEngine\KhmerDictionaryBreakingEngine.cs - - - Typography\Typography.TextBreak\Typography.TextBreak\DictionaryBasedBreakingEngine\LaoDictionaryBreakingEngine.cs - - - Typography\Typography.TextBreak\Typography.TextBreak\DictionaryBasedBreakingEngine\ThaiDictionaryBreakingEngine.cs - - - Typography\Typography.TextBreak\Typography.TextBreak\EngBreakingEngine.cs - - - Typography\Typography.TextBreak\Typography.TextBreak\WordVisitor.cs - - - Typography\Typography.TextFlow\Dom\EditableTextBlockLayoutEngine.cs - - - Typography\Typography.TextFlow\Dom\EditableTextLine.cs - - - Typography\Typography.TextFlow\Dom\IRun.cs - - - Typography\Typography.TextFlow\Dom\TextBuffer.cs - - - Typography\Typography.TextFlow\Dom\TextRun.cs - - - Typography\Typography.TextFlow\Simple\SmallLine.cs - - - Typography\Typography.TextFlow\TextLexer\TextLexer.cs - - - Typography\Typography.TextServices\FontStoreAndManagment\FontManagement.cs - - - Typography\Typography.TextServices\IcuData\LangCodes.cs - - - Typography\Typography.TextServices\TextServices.cs - - - Typography\Typography.TextServices\Utils\CRC32.cs - - - \ No newline at end of file diff --git a/src/x_autogen_xamarin_ios/PixelFarm.One.HtmlRenderer/PixelFarm.One.HtmlRenderer.sln b/src/x_autogen_xamarin_ios/PixelFarm.One.HtmlRenderer/PixelFarm.One.HtmlRenderer.sln deleted file mode 100644 index 25dd2f847..000000000 --- a/src/x_autogen_xamarin_ios/PixelFarm.One.HtmlRenderer/PixelFarm.One.HtmlRenderer.sln +++ /dev/null @@ -1,23 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28307.539 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PixelFarm.One.HtmlRenderer", "PixelFarm.One.HtmlRenderer.csproj", "{6DF8E310-8300-4A11-A547-AC81145E6174}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {6DF8E310-8300-4A11-A547-AC81145E6174}.Debug|Any CPU.ActiveCfg = Debug|iPhone - {6DF8E310-8300-4A11-A547-AC81145E6174}.Release|Any CPU.ActiveCfg = Release|iPhone - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {EB7E067B-D544-465A-9F22-65D35DB5AE1F} - EndGlobalSection -EndGlobal diff --git a/src/x_autogen_xamarin_ios/PixelFarm.One.HtmlRenderer/packages.config b/src/x_autogen_xamarin_ios/PixelFarm.One.HtmlRenderer/packages.config deleted file mode 100644 index e65c0eae8..000000000 --- a/src/x_autogen_xamarin_ios/PixelFarm.One.HtmlRenderer/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/x_merge_projects/PixelFarm.One/POST_MERGE.xml b/src/x_merge_projects/PixelFarm.One/POST_MERGE.xml new file mode 100644 index 000000000..45048ea8c --- /dev/null +++ b/src/x_merge_projects/PixelFarm.One/POST_MERGE.xml @@ -0,0 +1,5 @@ + + + diff --git a/src/x_merge_projects/PixelFarm.One/PixelFarm.One.csproj b/src/x_merge_projects/PixelFarm.One/PixelFarm.One.csproj new file mode 100644 index 000000000..a304a1d88 --- /dev/null +++ b/src/x_merge_projects/PixelFarm.One/PixelFarm.One.csproj @@ -0,0 +1,104 @@ + + + + + Debug + AnyCPU + {6F7A4449-9AE5-412B-A426-391E2CFC8969} + Library + Properties + PixelFarm.One + PixelFarm.One + v2.0 + 512 + 8.0 + + + true + full + false + bin\Debug\ + TRACE;DEBUG; PIXEL_FARM, PIXEL_FARM_NET20,NET20, MINIMAL, GLES, WIN32, GL_ENABLE; SHARPZIPLIB; + prompt + 4 + true + 7.3 + + + pdbonly + true + bin\Release\ + TRACE; PIXEL_FARM, PIXEL_FARM_NET20,NET20, MINIMAL, GLES, WIN32, GL_ENABLE + prompt + 4 + + + + + + + + + + + {bfadb269-520e-4a14-9d4a-3d65ed57eb75} + BackEnd.ImgCodecs + + + {1ec4200d-e955-4617-9558-b859bb6b5af2} + BackEnd.SharpZipLib + + + {39475dd4-6793-454f-8c48-06452f42c300} + BackEnd.TreeCollection + + + {6317f5f0-bc4b-4bfd-b3c0-73c05c2aa11e} + LayoutFarm.YourBasicCustomWidgets + + + {d2cc5cef-3003-4a5d-a532-8eb7e4fa40f2} + PaintLab.AbstractPlatform + + + {572e6b12-051f-4e41-af01-0831b210cf66} + PaintLab.BitmapBufferEx + + + {9cc6310f-c116-449d-be97-63d152f98746} + PaintLab.Color + + + {a533e1c7-ab74-4bcf-bc7a-12d4dbbfa918} + PaintLab.PaintFx + + + {d88d86cd-6732-45e7-8fc9-49449ea9c737} + PaintLab.YourImplementation + + + {e1e89b3b-b529-4b17-b7ed-4c70cc8475eb} + PixelFarm.Drawing.GLES + + + {51d63482-5697-4b16-8401-506965624657} + PixelFarm.Drawing + + + {68f1daf6-2b35-476e-b2f8-5eadbc823935} + BackEnd.TypeMirror + + + {ec1307c6-309f-43ea-bfcc-5219e2f5a103} + PixelFarm.Typography + + + {5278fab9-33f0-40e0-adca-7237ea0e935b} + Typography.One + + + + + + + \ No newline at end of file diff --git a/src/x_merge_projects/PixelFarm.One/Properties/AssemblyInfo.cs b/src/x_merge_projects/PixelFarm.One/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..f58743243 --- /dev/null +++ b/src/x_merge_projects/PixelFarm.One/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("PixelFarm.One")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("LayoutFarm")] +[assembly: AssemblyProduct("PixelFarm.One")] +[assembly: AssemblyCopyright("MIT")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("6f7a4449-9ae5-412b-a426-391e2cfc8969")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// 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.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/x_resource_projects/TestAtlas1/TestAtlas1.info b/src/x_resource_projects/TestAtlas1/TestAtlas1.info index d9b3f21a8..da4e06048 100644 Binary files a/src/x_resource_projects/TestAtlas1/TestAtlas1.info and b/src/x_resource_projects/TestAtlas1/TestAtlas1.info differ diff --git a/src/x_resource_projects/TestAtlas1/TestAtlas1.png b/src/x_resource_projects/TestAtlas1/TestAtlas1.png index 1ace66ccf..76937f5a9 100644 Binary files a/src/x_resource_projects/TestAtlas1/TestAtlas1.png and b/src/x_resource_projects/TestAtlas1/TestAtlas1.png differ diff --git a/src/x_resource_projects/TestAtlas1/x_TestAtlas1_Atlas_AUTOGEN.cs b/src/x_resource_projects/TestAtlas1/x_TestAtlas1_Atlas_AUTOGEN.cs index 3b7febff8..ec27f5ed0 100644 --- a/src/x_resource_projects/TestAtlas1/x_TestAtlas1_Atlas_AUTOGEN.cs +++ b/src/x_resource_projects/TestAtlas1/x_TestAtlas1_Atlas_AUTOGEN.cs @@ -1,4 +1,4 @@ -//AUTOGEN, 2020-04-20T21:27:56 +//AUTOGEN, 2020-11-26T21:57:10 //source: D:\projects\PixelFarm\src\x_resource_projects\TestAtlas1\TestAtlas1.csproj //tools: D:\projects\PixelFarm\src\Tools\PaintLabResTool\bin\Debug\PaintLabResTool.exe namespace Atlas_AUTOGEN_.TestAtlas1{ @@ -34,12 +34,12 @@ public static class Names{ //bitmap_atlas_info //D:\projects\PixelFarm\src\x_resource_projects\TestAtlas1\TestAtlas1.info public static readonly byte[] info=new byte[]{ -0x02,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0xA6,0x00,0x2A,0x00,0x04,0x03,0x02,0x00,0x0B,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0x10 -,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x69,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x69,0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x00,0x00 -,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x29,0x00,0x2A,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x97,0x00,0x0F,0x00,0x0F,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x79 -,0x00,0x10,0x00,0x0F,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x29,0x00,0x20,0x00,0x05,0x00,0x05,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x29,0x00,0x00,0x00,0x20,0x00 -,0x20,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x49,0x00,0x00,0x00,0x20,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x09,0x00,0x88,0x00,0x10,0x00,0x0F,0x00,0x0F,0x00,0x00,0x00,0x00 -,0x00,0x0A,0x00,0x89,0x00,0x00,0x00,0x0F,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x0B,0x00,0x11,0x00,0x2F,0x2F,0x61,0x72,0x72,0x6F,0x77,0x5F,0x62,0x6C,0x61,0x6E +0x02,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x04,0x2A,0x00,0x04,0x03,0x02,0x00,0x0B,0x00,0x00,0x00,0x41,0x00,0x00,0x00,0x10 +,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x51,0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x61,0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x00,0x00 +,0x00,0x00,0x03,0x00,0xB1,0x00,0x00,0x00,0x29,0x00,0x2A,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x05,0x00,0x00,0x00,0x0F,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x32 +,0x00,0x00,0x00,0x0F,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x05,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x91,0x00,0x00,0x00,0x20,0x00 +,0x20,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x71,0x00,0x00,0x00,0x20,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x09,0x00,0x23,0x00,0x00,0x00,0x0F,0x00,0x0F,0x00,0x00,0x00,0x00 +,0x00,0x0A,0x00,0x14,0x00,0x00,0x00,0x0F,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x0B,0x00,0x11,0x00,0x2F,0x2F,0x61,0x72,0x72,0x6F,0x77,0x5F,0x62,0x6C,0x61,0x6E ,0x6B,0x2E,0x70,0x6E,0x67,0x00,0x00,0x11,0x00,0x2F,0x2F,0x61,0x72,0x72,0x6F,0x77,0x5F,0x63,0x6C,0x6F,0x73,0x65,0x2E,0x70,0x6E,0x67,0x01,0x00,0x10,0x00,0x2F,0x2F,0x61 ,0x72,0x72,0x6F,0x77,0x5F,0x6F,0x70,0x65,0x6E,0x2E,0x70,0x6E,0x67,0x02,0x00,0x13,0x00,0x2F,0x2F,0x63,0x68,0x65,0x63,0x6B,0x5F,0x62,0x75,0x74,0x74,0x6F,0x6E,0x73,0x2E ,0x70,0x6E,0x67,0x03,0x00,0x11,0x00,0x2F,0x2F,0x63,0x68,0x6B,0x5F,0x63,0x68,0x65,0x63,0x6B,0x65,0x64,0x2E,0x70,0x6E,0x67,0x04,0x00,0x13,0x00,0x2F,0x2F,0x63,0x68,0x6B @@ -52,168 +52,202 @@ public static class Names{ //bitmap_atlas_total_img //D:\projects\PixelFarm\src\x_resource_projects\TestAtlas1\TestAtlas1.png public static readonly byte[] img=new byte[]{ -0x89,0x50,0x4E,0x47,0x0D,0x0A,0x1A,0x0A,0x00,0x00,0x00,0x0D,0x49,0x48,0x44,0x52,0x00,0x00,0x00,0xA6,0x00,0x00,0x00,0x2A,0x08,0x06,0x00,0x00,0x00,0x39,0xFA,0x20,0xD4 +0x89,0x50,0x4E,0x47,0x0D,0x0A,0x1A,0x0A,0x00,0x00,0x00,0x0D,0x49,0x48,0x44,0x52,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x2A,0x08,0x06,0x00,0x00,0x00,0x2D,0x65,0x29,0xC0 ,0x00,0x00,0x00,0x01,0x73,0x52,0x47,0x42,0x00,0xAE,0xCE,0x1C,0xE9,0x00,0x00,0x00,0x04,0x67,0x41,0x4D,0x41,0x00,0x00,0xB1,0x8F,0x0B,0xFC,0x61,0x05,0x00,0x00,0x00,0x09 -,0x70,0x48,0x59,0x73,0x00,0x00,0x0E,0xC3,0x00,0x00,0x0E,0xC3,0x01,0xC7,0x6F,0xA8,0x64,0x00,0x00,0x14,0x69,0x49,0x44,0x41,0x54,0x78,0x5E,0xED,0x5C,0x09,0x54,0x1C,0xD7 -,0x95,0x95,0x93,0x19,0x67,0x3C,0xC9,0xD8,0x39,0x39,0x39,0x13,0xFB,0xCC,0x99,0x8C,0x4F,0x66,0xE2,0xD8,0x67,0x3C,0xB6,0x27,0x89,0x1D,0xDB,0xB1,0xA2,0x4C,0x9C,0x58,0xBB -,0xAC,0xC5,0x42,0x2B,0x96,0x64,0x2D,0x96,0xB5,0x2F,0x96,0x50,0x50,0x24,0x6B,0x17,0x12,0x20,0x90,0x90,0x00,0x49,0x48,0x48,0x20,0xD0,0x82,0x00,0xB1,0xEF,0x34,0x8B,0x58 -,0xC5,0xD2,0x0D,0x34,0x0D,0xCD,0xBE,0x6F,0x0D,0x34,0xAB,0xD8,0xEF,0xFC,0x57,0xAA,0xAA,0x34,0x4D,0x41,0x2F,0x58,0x16,0x5A,0xEE,0x39,0xF7,0x74,0x75,0xD5,0xAF,0x7A,0x55 -,0xFD,0xEE,0x7F,0xFF,0xFD,0x5F,0x0F,0x26,0xE1,0xF1,0x00,0xDD,0xA7,0x49,0x1C,0x18,0xD2,0xFE,0x23,0xB7,0xDD,0xDB,0xF6,0x0F,0xF4,0x39,0x84,0xE6,0x7F,0xD2,0x3D,0xFE,0x98 -,0xF1,0xB1,0xC5,0x24,0x73,0xC1,0x9F,0x3F,0xD1,0xA1,0xEF,0xA8,0x47,0xC6,0x73,0xE7,0xCE,0xE1,0xFC,0xF9,0xF3,0x1C,0xDD,0xDC,0xDC,0x70,0xF9,0xF2,0x65,0xEE,0x93,0xBE,0x3B -,0x3B,0x3B,0xC3,0xC9,0xC9,0x09,0x0E,0x0E,0x0E,0xB0,0xB3,0xB3,0x83,0x8D,0x8D,0x0D,0x8E,0x1C,0x39,0x82,0x83,0x07,0x0F,0x62,0xDF,0xBE,0x7D,0xB0,0xB6,0xB6,0xC6,0xEE,0xDD -,0xBB,0xB1,0x63,0xC7,0x0E,0x6C,0xDD,0xBA,0x15,0x1B,0x37,0x6E,0xC4,0xFA,0xF5,0xEB,0xB1,0x66,0xCD,0x1A,0x8E,0x2B,0x57,0xAE,0x64,0x26,0x24,0xED,0x4E,0x18,0x0C,0x0C,0x0C -,0x20,0x5B,0x2E,0xC7,0x2D,0x1F,0x1F,0x9C,0x3E,0x73,0x86,0x23,0x6D,0xD3,0x3E,0x3A,0xA6,0x0F,0x5E,0x66,0xA6,0x83,0x3F,0x7F,0xA2,0x43,0xDF,0x51,0x46,0x53,0x53,0x5C,0xF6 -,0x8A,0xD4,0x7E,0x73,0x49,0xE2,0x1B,0x1C,0x1C,0xE4,0x38,0x34,0x34,0x84,0xBE,0xBE,0x3E,0xEE,0x53,0xD8,0x27,0x90,0x9C,0x24,0xB0,0xBF,0xBF,0x5F,0x24,0xB5,0x17,0xD8,0xDB -,0xDB,0x2B,0xB2,0xA7,0xA7,0x07,0xAB,0x57,0xAF,0x66,0x26,0x24,0xED,0x4E,0x08,0x74,0x74,0x74,0xC0,0xF3,0xDA,0x35,0x44,0x44,0x46,0xA2,0xA8,0xA8,0x08,0xED,0xED,0xED,0x1C -,0x69,0x9B,0xF6,0xD1,0x31,0x6A,0xA3,0x0B,0x5E,0x66,0xA6,0x83,0x3F,0x1F,0xA7,0x58,0x2F,0x37,0x95,0xC6,0xC2,0xD4,0x5E,0x26,0x01,0x7D,0x47,0x19,0xC9,0x8E,0xEF,0xF9,0xBA -,0xEF,0x81,0xB6,0xB6,0xF8,0x95,0x21,0x3C,0x18,0xD2,0xC7,0x4B,0x8A,0x88,0x24,0xBC,0xE2,0xE2,0x62,0x94,0x94,0x94,0x40,0xAD,0x56,0xA3,0xA6,0xA6,0x06,0x65,0x65,0x65,0x1C -,0xCB,0xCB,0xCB,0x51,0x51,0x51,0x21,0xB2,0xB2,0xB2,0x72,0x18,0xAB,0xAA,0xAA,0x46,0x90,0xF6,0x93,0x30,0x2D,0x2D,0x2D,0x99,0x09,0x49,0xBB,0x8F,0x1C,0xE4,0x27,0x0F,0x4F -,0x4F,0x24,0x26,0x26,0xA2,0xB9,0xB9,0x05,0xC9,0x69,0x99,0x08,0x89,0x94,0x71,0x4C,0xBD,0x97,0x85,0xE6,0x96,0x16,0xEE,0x18,0xB5,0xD1,0xF5,0x29,0x2F,0x33,0xD3,0xC1,0x9F -,0xCF,0x09,0xAD,0xB3,0xB3,0xD3,0x68,0x1A,0x2B,0x4C,0x73,0x7A,0x99,0x04,0xF4,0x1D,0x65,0x14,0xAB,0xF2,0x13,0x7F,0x1D,0xE0,0xBE,0x19,0xF9,0x77,0xFD,0x30,0xC4,0x44,0x2A -,0xD5,0xC6,0x54,0x9E,0x61,0x9D,0x8A,0x22,0x24,0x89,0xB2,0xB4,0xB4,0x94,0x13,0x66,0x6D,0x6D,0x2D,0x27,0x48,0x5D,0x51,0x4A,0x09,0xB1,0xBA,0xBA,0x5A,0x92,0x74,0x6C,0xA2 -,0x0B,0x93,0x82,0x08,0xF9,0xAB,0xA1,0xB1,0x09,0x41,0xE1,0x31,0x88,0x49,0x48,0x41,0x6A,0x66,0x0E,0xD2,0xB2,0x72,0x91,0x94,0x9A,0x81,0xD8,0xF8,0x24,0x34,0x69,0x34,0x5C -,0x1B,0x6A,0x2B,0x80,0x97,0x99,0xE9,0xE0,0xCF,0x17,0x85,0xE9,0x17,0x14,0x21,0x49,0xFF,0xE0,0x48,0x04,0x47,0xC4,0x20,0x2A,0x36,0xDE,0x68,0x61,0x9A,0xDB,0xCB,0x24,0xA0 -,0xEF,0x28,0xA3,0x18,0xE9,0x6D,0xBB,0x41,0xA3,0x08,0x42,0xEC,0xD5,0x6F,0xD0,0xDE,0xDC,0xF9,0xAD,0x4C,0x7E,0x1C,0x1D,0x1D,0x39,0x61,0x92,0x28,0x29,0x42,0x52,0x07,0x23 -,0x61,0x92,0x18,0x63,0x62,0xD8,0xEF,0x13,0x15,0x35,0x8C,0xD1,0xD1,0xD1,0xA3,0x52,0x26,0x93,0x71,0xD1,0x96,0xC4,0x49,0xC2,0x5C,0xBE,0x7C,0x39,0x33,0x21,0x69,0xD7,0x20 -,0xE8,0x7A,0x94,0xD3,0x3E,0x2C,0xDC,0xBC,0x79,0x93,0x1B,0x25,0x38,0x11,0x26,0xA6,0xE1,0x5E,0xB6,0x12,0x59,0x39,0x2A,0x28,0x0B,0x8A,0x51,0x5C,0x5A,0x8E,0xDC,0x3C,0x15 -,0xF2,0x94,0x4A,0xAE,0x0D,0xB5,0x15,0xC0,0xCB,0xCC,0x74,0xF0,0xE7,0x0F,0x13,0x26,0x19,0xD5,0xA5,0x3C,0xB7,0x80,0xBB,0x81,0xA2,0x92,0x32,0xC4,0x27,0x26,0x19,0x2D,0x4C -,0x73,0x7B,0x99,0x04,0xF4,0x1D,0x65,0x14,0xEF,0xFA,0x1C,0xDA,0x89,0x9A,0x10,0x44,0xB8,0x2C,0x46,0x69,0x7E,0xEE,0x2F,0xA4,0xDA,0x98,0xCA,0x53,0xA7,0x4E,0x71,0x43,0xB9 -,0x30,0x74,0x93,0x23,0xEA,0xEA,0xEA,0x46,0x44,0x48,0x21,0x1A,0x92,0xF0,0x04,0x92,0x80,0xA5,0x48,0xC7,0xC6,0x23,0x4C,0x12,0xE5,0x6B,0xAF,0xBD,0xC6,0xF1,0x61,0x81,0xD2 -,0x2F,0x1A,0xE9,0x28,0x38,0x65,0x2A,0xF2,0x91,0x9B,0xAF,0xE6,0xF4,0x50,0x5D,0x5D,0x83,0x86,0x86,0x06,0xD4,0xD7,0x37,0x40,0xAE,0xC8,0xE1,0xDA,0x50,0x5B,0x01,0xBC,0xCC -,0x4C,0x07,0x7F,0xBE,0xA4,0x30,0xE9,0x06,0x72,0x94,0x6A,0x14,0x14,0x95,0xA2,0xA4,0x8C,0x0D,0x4F,0x55,0xD5,0x48,0x4E,0x49,0x35,0x5A,0x98,0xE6,0xF6,0x32,0x09,0xE8,0x3B -,0xCA,0x20,0x15,0x19,0xA1,0x53,0xF2,0x23,0x0E,0x62,0xA8,0xE6,0x04,0x0A,0x42,0x97,0x23,0x2E,0xDA,0x05,0xBD,0x9D,0x3D,0xCF,0x49,0xB5,0x35,0x85,0xB6,0xB6,0xB6,0xA2,0x30 -,0x69,0xE8,0xA6,0x21,0xBD,0xBE,0xBE,0x9E,0x13,0x65,0x6C,0x6C,0xEC,0xB0,0x88,0x48,0xA4,0x28,0x3A,0x1A,0xE3,0xE2,0xE2,0x38,0x51,0x93,0x38,0x49,0x98,0xCB,0x96,0x2D,0x63 -,0x26,0x24,0xED,0x8E,0x0A,0x41,0x94,0x4B,0x96,0x2C,0xF9,0x4E,0x84,0x19,0x15,0x9B,0x00,0x95,0xBA,0x04,0xE5,0x15,0x55,0x9C,0x20,0x5B,0x5B,0x5B,0xA1,0xD5,0x6A,0xD9,0xA7 -,0x16,0x45,0xCC,0x8F,0xF4,0xDD,0xE9,0xEC,0x59,0xFE,0x2C,0x76,0xF3,0xE6,0x82,0x3F,0x7F,0x98,0x30,0x33,0x15,0x2A,0xC8,0xF3,0x0A,0x91,0xA7,0x2A,0xE2,0x7A,0x45,0x45,0x65 -,0x15,0x6A,0xD8,0x8F,0x47,0x0E,0xC8,0xC8,0xCC,0x34,0x5A,0x98,0xE6,0xF6,0x32,0x09,0xE8,0x3B,0xCA,0x20,0x43,0xBC,0x8E,0x6C,0x6F,0x55,0x45,0xA1,0xAB,0x6C,0x2D,0xA0,0xFA -,0x18,0x51,0x8E,0x9B,0xD1,0x54,0xDB,0xF8,0x92,0x54,0x5B,0x53,0x78,0xE2,0xC4,0x09,0x4E,0x98,0x42,0x3E,0x49,0x43,0x3A,0xFD,0x2E,0x42,0x94,0xD4,0x8F,0x8E,0x24,0x3C,0x81 -,0xD4,0x6E,0x34,0x92,0x30,0x97,0x2E,0x5D,0xCA,0x4C,0x48,0xDA,0x95,0x84,0xAE,0x28,0x1F,0xB6,0x30,0xAF,0xDF,0xB8,0xC1,0x75,0xC2,0x6C,0x45,0x2E,0x94,0xF9,0x05,0xA2,0x28 -,0x49,0x0B,0x5D,0x5D,0x5D,0x68,0x61,0x69,0x19,0x3D,0x07,0xB5,0xA1,0xB6,0x02,0x78,0x99,0x99,0x0E,0xFE,0x7C,0x51,0x98,0x81,0x61,0xD1,0x5C,0x44,0x53,0x17,0xB3,0x88,0xC0 -,0x7A,0x05,0x19,0xD3,0xB0,0xE1,0xB6,0xB9,0xB9,0x99,0x63,0x9E,0x32,0xDF,0x64,0x61,0x9A,0xDA,0xCB,0x24,0xA0,0xEF,0xA8,0xB1,0xD9,0x55,0xF7,0x62,0x90,0xC7,0xD7,0x40,0x6B -,0x22,0xBA,0x0A,0xE7,0xA3,0x37,0xE7,0x5D,0xC4,0xB9,0xAC,0x80,0x3A,0x2B,0x7C,0xB2,0x64,0x7B,0x13,0x78,0xEC,0xD8,0x31,0x4E,0x98,0xC2,0x04,0x87,0x84,0x49,0xCF,0x44,0xA2 -,0xA4,0x9C,0x51,0x3F,0x4A,0x52,0x14,0x1D,0x8D,0xF1,0xF1,0xF1,0xDC,0xB9,0x44,0x12,0x26,0x89,0x4B,0xDF,0x1E,0xCF,0x11,0xD0,0x17,0xE5,0xC3,0x16,0x66,0x56,0x56,0x16,0x22 -,0x59,0xCE,0xAC,0xD1,0x34,0x23,0x33,0x2B,0x9B,0x05,0xAB,0x4A,0xCE,0x87,0xA4,0x85,0xB6,0xB6,0x36,0x34,0x35,0x35,0x71,0xBE,0xA6,0x36,0xD4,0x56,0x00,0x2F,0x33,0xD3,0xC1 -,0x9F,0x2F,0x0A,0x33,0x3C,0x4A,0xC6,0x0D,0xDB,0xD5,0xAC,0xD7,0x37,0x36,0x36,0x72,0xA2,0x21,0x83,0x02,0x8B,0x4B,0x4A,0x8D,0x16,0xA6,0xB9,0xBD,0x4C,0x02,0xFA,0x8E,0x1A -,0x93,0x59,0x61,0xAE,0x96,0xB9,0x71,0xE7,0x80,0x6A,0x37,0xF4,0xE7,0xCF,0x43,0x9F,0x6A,0x0A,0x2A,0x63,0x57,0x22,0xE1,0xD6,0x31,0xB4,0xB7,0x8C,0xEF,0x0D,0xD0,0xE1,0xC3 -,0x87,0x45,0x61,0xDE,0xB9,0x73,0x87,0xFB,0xA4,0xDF,0x49,0x3F,0x4A,0x0A,0x91,0xB0,0xA6,0xA6,0x0E,0xFE,0xFE,0x71,0xD8,0xF1,0xB5,0x0B,0x66,0xCE,0xF9,0x1B,0xFE,0x30,0x65 -,0x1B,0x47,0xDA,0xA6,0x7D,0x77,0xEE,0xC4,0x73,0x6D,0x48,0x98,0x8B,0x17,0x2F,0x66,0x26,0x24,0xED,0x8E,0x00,0x4D,0x74,0x48,0x88,0xBA,0x7C,0x98,0x93,0x1F,0xDD,0x89,0xAC -,0x56,0xDB,0xC6,0xD2,0x3A,0x1A,0x21,0xD8,0xC8,0xC7,0x9E,0xBD,0xA5,0xA5,0x95,0x5B,0x59,0x79,0xA8,0xCB,0x45,0xD1,0xB2,0x04,0x54,0xF1,0x43,0x2D,0x45,0x48,0x12,0xA3,0x20 -,0x24,0xFA,0xA4,0x9E,0x62,0xAC,0x30,0xCD,0xED,0x65,0x12,0x78,0xE0,0xA0,0xFE,0xD6,0xE7,0x31,0xD8,0xF8,0x43,0xF1,0xFB,0x28,0x0C,0x75,0x59,0x6F,0xDF,0x5B,0x9E,0x00,0x54 -,0x58,0x03,0xEA,0x55,0xE8,0x2F,0xB0,0xC0,0x40,0xD1,0x52,0x04,0xDA,0xAD,0x47,0x5B,0x95,0xFA,0xDF,0xA4,0xCE,0x19,0xC6,0x5E,0xFE,0x75,0xA6,0x04,0x0F,0x1C,0x38,0xC0,0xFD -,0xF0,0x14,0x2D,0x49,0x84,0x34,0xA4,0x93,0x30,0x69,0x9B,0x72,0x46,0xDD,0x28,0xE9,0xE4,0xE4,0x89,0xBF,0x4C,0xDD,0x8D,0xCD,0x5F,0x5F,0xC0,0x8D,0xC0,0x54,0xE4,0x15,0xB1 -,0x74,0xA8,0x49,0x8B,0xD2,0x2A,0x0D,0x62,0xD2,0xCB,0xE0,0xE0,0x1E,0x87,0xD5,0x1B,0xCF,0x61,0xFA,0x4C,0x6B,0x44,0x46,0xA6,0x63,0xD1,0xA2,0x45,0xCC,0x84,0xA4,0xDD,0x09 -,0x01,0x12,0x1F,0x09,0x8F,0xFC,0x45,0xAB,0x11,0xE4,0x47,0x22,0xCD,0x11,0x68,0x1F,0x1D,0x7B,0x28,0x0B,0xEC,0x64,0x24,0xE1,0x6E,0xB2,0x28,0x4A,0x41,0x44,0xDD,0xDD,0xDD -,0x22,0xC9,0x01,0xB4,0xCF,0x18,0x61,0x9A,0xDB,0xCB,0x24,0x30,0x49,0xDB,0x50,0xF1,0x53,0x3F,0xD7,0x03,0x08,0x3A,0xBD,0x11,0x61,0x0E,0x9B,0x4E,0x04,0x9E,0x5C,0xE7,0x10 -,0x6C,0xBF,0xCE,0x21,0xC6,0x79,0xB3,0x4D,0xA8,0xC3,0x3A,0x07,0x7F,0x9B,0x55,0x67,0x43,0xEC,0xBF,0xB2,0x0B,0xB2,0x5D,0x6F,0x1F,0x79,0x89,0x39,0xB8,0x35,0x1E,0xFD,0xA5 -,0xEB,0x81,0xFC,0x2F,0x30,0x58,0xF6,0x25,0xFA,0xCB,0x17,0x20,0xEB,0xFA,0x16,0xF8,0x38,0x5B,0xC1,0xEF,0x84,0xA5,0x6B,0xC0,0xA9,0xF5,0xF6,0xBE,0x76,0x9B,0x6D,0x7C,0xEC -,0xB6,0x1E,0xBB,0xE3,0xB0,0xE5,0x78,0x88,0x03,0x3B,0xCF,0xE1,0x0B,0xA7,0x28,0xDB,0x65,0x17,0x3C,0x2E,0x1C,0x47,0x4D,0x89,0xFC,0x97,0x64,0x57,0x9F,0xF4,0x6A,0x91,0xEE -,0x55,0xC8,0x29,0x85,0x88,0xA9,0x1F,0x29,0x8F,0xDB,0x5C,0xC3,0xA2,0xE5,0x36,0x48,0xCE,0x2A,0x45,0x8B,0xB6,0x03,0x05,0x95,0x1A,0xD6,0x19,0xDB,0xB9,0xA5,0xA6,0xD8,0xC4 -,0x54,0x24,0x15,0x34,0x21,0x49,0xD5,0x88,0xEC,0xA2,0x46,0xDC,0x08,0xCD,0xC2,0x3C,0x8B,0x23,0xF8,0x64,0xEA,0xC4,0x7E,0xF3,0x43,0xA0,0x67,0xA7,0x20,0x42,0x2F,0x48,0x48 -,0x03,0x44,0x9A,0xB8,0xD2,0x3E,0x29,0x1F,0xF2,0x32,0x33,0x1D,0xFC,0xF9,0xA2,0x30,0xD3,0xEF,0x65,0x20,0x2F,0x4F,0xC9,0x7A,0x44,0x31,0xCB,0x09,0x2B,0x50,0xCB,0x7E,0xEC -,0x46,0x16,0xD9,0x68,0x59,0xA7,0xA9,0x49,0xC3,0x44,0xDB,0x68,0xB4,0x30,0x09,0xE6,0xF4,0x32,0x09,0x4C,0xC2,0x50,0xE7,0x73,0x2A,0x99,0x17,0xA2,0x9D,0xB7,0x62,0xE0,0x7E -,0x21,0x86,0xFA,0x54,0xE8,0xEB,0x96,0xA3,0xBB,0x23,0x19,0x3D,0xDD,0xC4,0x24,0x74,0xB6,0x27,0xA0,0xAD,0x25,0x1E,0xF7,0x4B,0x4F,0xA2,0xB7,0x92,0x4D,0xA6,0xEA,0xFF,0xCA -,0x86,0xF3,0x2D,0x18,0xA8,0xDC,0x8E,0xA1,0xFA,0x2D,0x40,0x83,0x1D,0xD0,0x1C,0x8C,0xC1,0xAE,0xBB,0xE8,0x66,0xF9,0x67,0x3F,0x3B,0x9F,0x8D,0xF5,0xE8,0xE9,0xB8,0x07,0xF4 -,0xC8,0xD1,0x56,0x16,0x01,0x5F,0xE7,0xAF,0x21,0x8B,0xBC,0x0E,0x6D,0x73,0xE9,0xCF,0x38,0xBB,0x7A,0xA4,0xF7,0xDD,0xFA,0xC2,0xA4,0xC8,0x4F,0xA2,0xA4,0x9C,0x91,0x22,0xA5 -,0xD5,0x1E,0x27,0xAC,0xDB,0xEC,0x0C,0x6D,0x1B,0x13,0x64,0x69,0x35,0x62,0xD2,0x72,0x70,0x57,0x51,0x06,0x45,0x6E,0x3E,0x82,0x65,0xF7,0x10,0x97,0x59,0x82,0x68,0x45,0x1D -,0x42,0x53,0x8A,0x90,0x9D,0xAB,0xE2,0x72,0x6D,0x65,0x61,0x19,0x2C,0x3E,0xB7,0x81,0xC5,0xE2,0xC3,0xCC,0xCC,0x08,0xBB,0x8F,0x2D,0x78,0x99,0x99,0x0E,0xFE,0x7C,0x51,0x98 -,0xC6,0xD2,0x58,0x61,0x12,0x4C,0xED,0x65,0x12,0x78,0xE0,0xA0,0xBE,0x96,0x1F,0xA8,0x53,0x03,0x3F,0x0E,0xB9,0xBC,0x01,0x45,0x49,0x24,0xB2,0x5B,0x40,0x8B,0x07,0x7A,0x6A -,0xCF,0xA2,0xBF,0xC1,0x09,0x7D,0xF5,0x67,0x30,0xD0,0x78,0x16,0x83,0x9A,0x0B,0x9C,0x08,0xFB,0x6A,0x4E,0xB2,0xC8,0x69,0x0B,0xD4,0xD9,0xA3,0xAF,0xFA,0x14,0xFA,0x1A,0x59 -,0x0E,0x56,0x7F,0x19,0x03,0xAC,0x1D,0x5A,0x58,0xFE,0x59,0xC6,0xAE,0xD1,0xC0,0x72,0xD1,0xFA,0x73,0x48,0xF2,0x5D,0xCB,0xA2,0xE9,0x2A,0x28,0x62,0x2E,0xA0,0xBA,0xA2,0x18 -,0x5D,0x9D,0x2C,0x6D,0xF8,0xBB,0x30,0x44,0x5A,0x59,0x59,0x71,0xEF,0xBC,0x85,0x19,0x38,0x09,0x93,0x26,0x87,0x14,0x25,0x69,0xA4,0x89,0x88,0x48,0x81,0xC5,0xB2,0xE3,0xE8 -,0xEC,0xEA,0x46,0xB6,0xB2,0x18,0xB9,0x05,0x25,0x28,0x50,0x17,0xA3,0xA8,0xE1,0x3E,0x8A,0x1B,0x7A,0x50,0x58,0xDF,0x0B,0x45,0x65,0x17,0x92,0x72,0x2A,0x10,0x9A,0x98,0x8D -,0xF0,0xB8,0x34,0x74,0xB1,0x91,0x88,0x52,0x9A,0x02,0x75,0x29,0x3E,0x99,0xBD,0x1F,0x0B,0x17,0x1E,0x64,0xA6,0x86,0xD9,0x7D,0x6C,0xC1,0xCB,0xCC,0x74,0xF0,0xE7,0x8B,0x82 -,0x31,0x85,0xDF,0x21,0x74,0x9D,0x34,0xA9,0xB7,0x48,0xF6,0x5E,0xF8,0xC5,0xBF,0x42,0x1E,0xC2,0x84,0xC6,0x22,0x20,0x5A,0x6F,0x03,0x8D,0xD7,0xD8,0x36,0x63,0x93,0x07,0x7A -,0x9B,0x3D,0xD9,0x77,0xF7,0x07,0xA2,0x6D,0x60,0xFB,0x1A,0xFC,0xD8,0x76,0x00,0xD3,0xB5,0x07,0xDB,0x76,0x67,0xA9,0xAA,0x17,0x86,0x9A,0xD8,0xF1,0x66,0x77,0xF4,0xE6,0x1F -,0x42,0xB4,0xFB,0x3C,0xF8,0xBA,0xAD,0x41,0xBE,0x3C,0x92,0x4D,0xFA,0x1A,0xD0,0xA6,0xED,0x1E,0x35,0xC7,0xDC,0xB9,0x73,0xE7,0xA8,0xC2,0x94,0xC9,0xE2,0xD8,0xA4,0x66,0x2F -,0x32,0x14,0xC5,0xDC,0x90,0x4D,0xED,0x3A,0x59,0x6E,0x1E,0x15,0x97,0x84,0x9C,0xD2,0x46,0x54,0x6A,0x81,0xB2,0x96,0x41,0x28,0x6B,0x7B,0x90,0x20,0x67,0x91,0x96,0xE5,0xDE -,0xD4,0x8E,0x48,0x9D,0x9D,0x22,0xEF,0x75,0xDF,0x68,0xBC,0xFF,0xFB,0x6D,0xB0,0xB6,0x8E,0x66,0xE6,0x44,0xBB,0x8F,0x14,0xBC,0x54,0x4C,0x06,0x7F,0xBA,0x59,0x78,0xE4,0x0F -,0x6D,0x24,0x04,0x07,0x89,0x6C,0xAE,0x6B,0x7A,0x31,0xFC,0xB6,0x35,0xE2,0xDC,0xE7,0x03,0xCA,0x2B,0x18,0x50,0x2D,0x40,0x4F,0xF6,0x1B,0x40,0xFA,0x7F,0x03,0x8A,0x37,0xD9 -,0xCC,0xEB,0x0D,0xF4,0xA7,0xFF,0x8A,0x7D,0xB2,0xEF,0xD9,0x6F,0x62,0x28,0xF3,0x75,0x40,0xFE,0x3A,0x06,0x33,0xFF,0x13,0xC8,0x60,0xDB,0x6C,0x7F,0x43,0xE4,0x34,0x04,0x9C -,0x5A,0x8C,0x80,0x6B,0x87,0xA0,0x52,0xA7,0xA0,0xAE,0xBE,0xF1,0xC5,0xAE,0x8E,0xEE,0x31,0xDF,0xA9,0x6F,0xDB,0xB6,0x8D,0x13,0x9C,0x30,0x0B,0xA7,0x49,0x10,0xE5,0xE3,0x14 -,0x2D,0x03,0x03,0x13,0xB0,0x76,0xAB,0x2B,0x06,0xD8,0xAC,0x9D,0xC4,0x46,0x39,0x65,0x48,0x4C,0x12,0x0A,0xEA,0xBA,0x51,0xDE,0xCA,0xE6,0x62,0x3C,0xF3,0xEB,0xFA,0x50,0x58 -,0x52,0x0E,0x2F,0xBF,0x08,0xF8,0x47,0x24,0xA2,0xB0,0xA8,0x84,0x9B,0x95,0xD3,0xF5,0x28,0x07,0x9F,0xBF,0xCC,0x96,0x4D,0x84,0x86,0x45,0xCD,0xC7,0x16,0x52,0x01,0xCD,0x10 -,0x09,0x8F,0xCB,0x43,0x8B,0xC2,0x10,0x38,0x38,0xA4,0x79,0x01,0x1D,0xF8,0x5E,0x66,0xD8,0xB1,0xAD,0x31,0xEE,0xAB,0xD0,0x93,0x6B,0x8F,0x81,0xC2,0x99,0x18,0x90,0xBF,0x8D -,0xBE,0x74,0x26,0x4C,0xC5,0x6F,0x98,0x02,0xDE,0x67,0x62,0x7C,0x87,0x09,0xF3,0x6D,0xF6,0xFD,0x7F,0x31,0x94,0xF5,0x16,0xF7,0x7D,0x40,0xF9,0x3E,0x54,0x01,0xBF,0x46,0x98 -,0xF3,0xA7,0x48,0x09,0xB8,0x80,0xDA,0x92,0x3C,0xB4,0xB4,0x36,0xFC,0x48,0xCA,0x8E,0x3E,0x37,0x6F,0xDE,0x3C,0xAA,0x30,0x77,0xEE,0x72,0xC5,0xED,0xA0,0x54,0x4E,0x94,0xB4 -,0xA4,0x74,0x33,0x58,0x06,0xB5,0x06,0x28,0x6D,0x61,0x91,0x92,0x09,0x52,0x60,0x5E,0x6D,0x2F,0x9B,0x14,0x29,0x51,0x55,0x53,0x87,0xF0,0xF8,0x0C,0x78,0x87,0xA5,0x21,0x44 -,0x96,0xC6,0x5D,0x8F,0x22,0xB0,0x8D,0xE3,0x0D,0x7C,0xF0,0x11,0xCB,0x89,0xFF,0x6E,0x77,0xDC,0x90,0x12,0x80,0x21,0xEA,0x83,0xD2,0x2E,0x7A,0x75,0x6C,0x4A,0x95,0x18,0x5D -,0x47,0x3F,0x0D,0xD4,0x25,0x75,0x48,0x2A,0xFB,0xA3,0x89,0x35,0x7D,0x17,0xEC,0x7E,0x2B,0x0F,0xFD,0x1D,0x40,0x14,0x86,0x14,0x0B,0xD2,0x02,0x3F,0x8E,0xB9,0xB6,0x0A,0x1D -,0x59,0x17,0xD0,0xAA,0x9C,0x05,0xE4,0x4E,0x61,0x02,0xFD,0x3D,0xE3,0x07,0x4C,0x05,0x1F,0xA2,0x2F,0xFB,0x5D,0xF4,0xCB,0xDF,0x63,0x42,0x9D,0x82,0x41,0xC5,0x47,0xD0,0x64 -,0xB1,0x48,0xE9,0x3C,0x1D,0x05,0xA9,0x01,0xA8,0x2C,0x2E,0x45,0xB3,0xA6,0xFD,0x05,0xA9,0xEB,0x4A,0x71,0xC3,0x86,0x0D,0x5C,0x2D,0xA5,0x30,0x0B,0xA7,0x49,0x10,0x09,0x93 -,0x66,0xE6,0x9F,0x4C,0xB7,0x42,0x49,0x79,0x1D,0x02,0xA2,0x53,0x70,0x39,0x28,0x1D,0x61,0x39,0x2D,0xB8,0x57,0xD9,0x87,0x92,0x66,0xA0,0x84,0x89,0x93,0x04,0x5A,0xD8,0x38 -,0x80,0xB4,0xBC,0x72,0x71,0x08,0x17,0x98,0x91,0x9D,0x07,0x35,0x9B,0x70,0xDE,0xF0,0x0F,0x83,0xA7,0x4F,0xE4,0x43,0x11,0xA6,0xBE,0x28,0xC6,0xA2,0xBE,0x30,0x69,0x82,0x6A -,0x4E,0x95,0x98,0x60,0x57,0x28,0x06,0xD2,0x65,0x5A,0x86,0x1C,0x97,0xAE,0xC7,0xC1,0xEA,0x98,0x0F,0x8A,0xCB,0xAA,0xB9,0x25,0xC9,0x27,0x4A,0x98,0xC4,0xB4,0x40,0xC7,0xB5 -,0xB1,0xEE,0xDB,0x80,0xCE,0x38,0xA0,0x68,0x3E,0xFA,0x94,0xD3,0x31,0x54,0x38,0x8B,0x7D,0x7E,0x02,0xA8,0x67,0x02,0xC5,0xB3,0xD1,0x25,0xFF,0x98,0x6D,0xCF,0x41,0x71,0xD4 -,0x34,0x44,0x5C,0xDD,0x85,0xFA,0xB2,0x72,0x34,0xB7,0x99,0x56,0x75,0xB4,0x6E,0xDD,0x3A,0x51,0x98,0x01,0x01,0x01,0x5C,0xE4,0x14,0x84,0xF9,0xD1,0xE4,0xAD,0xA8,0x6B,0x6C -,0x41,0x52,0x86,0x12,0x17,0xC2,0xF2,0x71,0x27,0x53,0x83,0x18,0x55,0x07,0xD2,0xCA,0x7B,0x90,0x57,0xD7,0xCF,0x22,0x65,0x1F,0x32,0x2B,0xEE,0x23,0x47,0x55,0x34,0x42,0x98 -,0x34,0x33,0xF7,0xF0,0x09,0xE1,0x96,0xEB,0x5C,0x7D,0x53,0xF0,0xC1,0x87,0x9B,0x99,0x39,0xD1,0xEE,0x08,0xA4,0xA5,0xA5,0x71,0xC2,0x30,0x16,0x63,0x09,0x84,0x38,0x56,0xF5 -,0x18,0x45,0x43,0x61,0xD9,0x8F,0xAA,0xC4,0x22,0x65,0x49,0x38,0xEA,0xE4,0xCE,0x31,0x3A,0x3E,0x69,0xCC,0x2A,0x31,0x5D,0xBB,0x42,0x0D,0x06,0x31,0x43,0x9E,0xCF,0xCE,0x6B -,0xC3,0xA2,0x0D,0x97,0xF0,0xE7,0xA5,0x67,0x10,0x21,0x93,0x73,0x51,0xF3,0x89,0x10,0xA6,0xF8,0x77,0x3D,0x8C,0x69,0xC1,0x27,0x36,0x15,0xC5,0x9D,0x66,0x5D,0x3B,0x0F,0x43 -,0x15,0xAB,0x81,0xCA,0x35,0x40,0xD5,0x5A,0x0C,0x96,0x7F,0x81,0x9E,0xA2,0x65,0xE8,0x2B,0xB1,0x64,0xFB,0xBE,0x60,0xDF,0x3F,0xC7,0x50,0xFE,0x1A,0x5C,0xFC,0xDB,0x5C,0x34 -,0x95,0x95,0xFD,0xAB,0xEE,0xF5,0x8C,0x21,0x55,0x99,0x0B,0xC2,0x24,0x31,0x0A,0x11,0x93,0x26,0x2E,0x1F,0xB1,0x28,0x97,0x94,0x53,0x03,0xAF,0x90,0x14,0xF8,0x46,0xA6,0x20 -,0x22,0x39,0x0F,0x41,0x89,0x4A,0x04,0x67,0x37,0x23,0x3C,0x57,0x8B,0x48,0xC6,0x50,0x79,0x0B,0xE2,0x53,0xE5,0xC3,0x44,0x49,0xC3,0x3E,0x9D,0x4F,0xAF,0x6E,0xB7,0x1C,0x71 -,0xC3,0xD9,0xDB,0xE9,0x06,0x85,0xE9,0xED,0xED,0xCD,0xAD,0x6C,0x50,0x2A,0x61,0x0C,0x46,0x13,0x08,0xD1,0x50,0xF5,0x98,0x6E,0x95,0xD8,0x09,0x17,0x0F,0xFC,0x6A,0xEA,0x4A -,0x4C,0x5B,0xBD,0x07,0xEF,0xCD,0x5B,0x87,0x57,0xFF,0xB8,0x18,0xA7,0x2E,0x5C,0x1B,0xB5,0x4A,0x4C,0xCA,0x2E,0xD5,0x4D,0x94,0x57,0xD6,0xC2,0x3F,0x3C,0x1B,0x7F,0x61,0xA2 -,0x5C,0x6B,0xE5,0xC5,0x46,0x9F,0xFA,0x61,0x76,0x25,0x1F,0x7A,0x02,0x42,0x14,0xC6,0x68,0x0C,0xB9,0xB2,0xF1,0xE4,0xFD,0xF2,0x60,0xF4,0x69,0x6F,0x60,0xA8,0x76,0x0F,0x06 -,0xAA,0x19,0xAB,0xF6,0x63,0xB0,0xFA,0x00,0xC7,0xA1,0x1A,0xB6,0x5D,0x63,0x85,0xFE,0xEA,0x1D,0x40,0xF5,0x26,0x04,0x3A,0xCD,0x87,0x3A,0x25,0xE2,0x23,0xDD,0x6B,0xF4,0x0D -,0x76,0x1A,0xAC,0x3E,0xA2,0xBF,0xCB,0xA1,0x9C,0x48,0x18,0xCA,0x69,0x76,0x4E,0xAF,0x56,0x49,0x58,0x33,0x66,0xEF,0x85,0x7F,0x5C,0x01,0x2E,0x84,0x17,0xC1,0xC1,0x37,0x9B -,0xCB,0x45,0x49,0x78,0xC1,0xB1,0xA9,0xF0,0x4E,0xAA,0xC3,0xB5,0xBB,0xB5,0x70,0x97,0x55,0xC1,0x25,0x4C,0x8D,0x1B,0x41,0x32,0x9C,0xF5,0x0C,0x81,0xA6,0xE5,0xC1,0x2B,0x5F -,0x12,0x18,0x15,0xC8,0xAC,0xF9,0xC6,0x1D,0x36,0x97,0xE2,0x0C,0x0E,0xE5,0x24,0x4C,0xEA,0x10,0x57,0xAF,0x5E,0xE5,0x2A,0x9D,0x0C,0x61,0x34,0x81,0x18,0x53,0x3D,0x26,0x54 -,0x89,0x45,0xC4,0xDE,0xC5,0x7F,0xFD,0xD9,0x12,0xA7,0x03,0x93,0x91,0xD2,0x34,0x88,0xAF,0x12,0xF2,0xF0,0xD3,0x3F,0x2E,0xC7,0xCF,0xA7,0x2C,0x62,0xC3,0x72,0x26,0xD7,0x46 -,0xBF,0x4A,0x4C,0xD7,0xAE,0xB2,0xB0,0x04,0x65,0x95,0x35,0x5C,0x27,0x68,0xEF,0xE8,0xC4,0xE7,0xDB,0xAF,0x62,0xEA,0xF2,0xB3,0x88,0x4E,0xCC,0xE7,0x6A,0x26,0x9E,0x38,0x61 -,0x76,0x57,0x64,0xBC,0x21,0xF3,0x65,0x11,0xA6,0x4B,0x8D,0xEE,0x36,0x27,0x0C,0xD6,0xDB,0x03,0x6D,0x6E,0xD0,0x16,0x9C,0x02,0xE5,0x9E,0x8A,0xF0,0x5D,0x40,0xE3,0x65,0xC6 -,0xB3,0x40,0xF3,0x29,0x40,0xC3,0x66,0xE1,0xF1,0x5B,0x10,0x7E,0xED,0x30,0x06,0xB4,0x9D,0xC3,0x96,0x86,0xFA,0xFB,0xC7,0xAE,0x74,0xA7,0x2A,0x73,0x41,0x98,0xB4,0x44,0xA4 -,0x2B,0xCC,0x75,0xEB,0x6D,0x71,0xC4,0x39,0x12,0xDE,0xB2,0x52,0x5C,0x09,0xB9,0x37,0x2C,0x2A,0x66,0xE6,0xA8,0xE0,0x12,0x90,0x01,0x87,0x40,0x35,0x8E,0xFB,0xE6,0x63,0xBF -,0x97,0x02,0x3B,0xDD,0xEE,0x21,0x39,0x23,0x87,0xBB,0x96,0x4A,0xA5,0xC2,0xDE,0xE3,0xE7,0xB0,0xDD,0x21,0x14,0x1B,0x0F,0xF9,0x18,0x25,0x4C,0x02,0x2D,0x55,0xB9,0xBA,0xBA -,0x72,0xF7,0x30,0x16,0x74,0x05,0x62,0x6A,0xF5,0x98,0x50,0x8C,0xB3,0xCF,0xDE,0x15,0xEF,0xCC,0x5C,0x01,0x47,0x65,0x0D,0x2C,0xB3,0x4A,0xF0,0xBA,0x87,0x02,0x3F,0x3B,0x99 -,0x82,0x97,0x7F,0x33,0x0D,0x0E,0x6E,0xDE,0x5C,0x1B,0x6A,0xAB,0x0B,0xC1,0x6E,0x52,0x5A,0x26,0xD2,0xB2,0x4B,0xE0,0xE9,0x97,0xCA,0x0D,0xFD,0x91,0xF1,0x4A,0x4C,0xFF,0xDC -,0x19,0x6B,0x76,0x7B,0x71,0x13,0x20,0xA5,0x5E,0x71,0x90,0xE4,0x43,0x4F,0x40,0x88,0xC2,0xD0,0x25,0x4B,0xB5,0x99,0x88,0x5A,0x9F,0xCF,0x08,0x3D,0x8D,0xDC,0xC4,0xE3,0x4C -,0x8C,0x2A,0x0C,0x74,0xF9,0xB3,0xE1,0xDC,0x1B,0xAA,0xC4,0xFD,0xF0,0x76,0x58,0x82,0xAC,0x50,0x1B,0xC4,0xDF,0xDC,0x0B,0x3F,0xD7,0x15,0xE8,0xA9,0xBE,0xC4,0x84,0x79,0x11 -,0xFD,0x2D,0xEE,0xE8,0x69,0x38,0x0B,0xD7,0x63,0x16,0xE8,0xAC,0xAD,0xFA,0x89,0xD4,0xB5,0x47,0x23,0x55,0xF1,0x90,0x30,0x85,0xD7,0x8F,0xBA,0xC2,0x0C,0x0A,0x4A,0xC4,0xB2 -,0xB5,0x4E,0x08,0x49,0xAB,0xC0,0x81,0xCB,0x32,0xAE,0x9D,0xAE,0x38,0xCF,0x78,0x04,0x31,0x41,0xCA,0x61,0x75,0x25,0x13,0x5B,0xCF,0xA7,0x62,0xED,0xE9,0x44,0x9C,0xF3,0x0A -,0x45,0x41,0x41,0x01,0xD2,0xD3,0xD3,0xF1,0xA5,0xD5,0x49,0x9C,0xF4,0x88,0xC7,0x4C,0x0B,0x1B,0x83,0xCB,0x45,0x82,0x30,0x09,0xB4,0x22,0x70,0xF4,0xE8,0x51,0x2E,0x82,0x8E -,0x06,0x41,0x20,0xE6,0x54,0x8F,0x09,0xC2,0x3C,0xE4,0xE8,0xC6,0x44,0x38,0x15,0xBF,0x70,0x48,0xC6,0xAB,0x97,0x14,0x78,0xD9,0x55,0x81,0x17,0x8F,0x24,0x73,0xC2,0x74,0xF1 -,0xBC,0x2D,0x59,0x25,0x26,0xD8,0x2D,0x2D,0xAF,0xC0,0x96,0x6F,0x6E,0x71,0x11,0x32,0x3B,0xAF,0x12,0x5F,0xEE,0xB9,0x8E,0x99,0x2B,0x5D,0x10,0x26,0x53,0x72,0xB9,0xA5,0x7E -,0x71,0x90,0xF8,0xD0,0xB4,0xC3,0x54,0x9A,0x02,0x73,0x96,0x1A,0x74,0x20,0x0A,0x43,0x8A,0x31,0x5E,0x5F,0xD9,0xF5,0x97,0x06,0x33,0x41,0xC6,0x63,0x50,0xE3,0x8D,0x70,0xCF -,0x2F,0x10,0x78,0x75,0x37,0xCA,0x0B,0x32,0x51,0x5F,0xA3,0xFD,0xB1,0xB6,0xA9,0xFD,0x9F,0xF3,0x52,0x42,0xA7,0x5C,0xB5,0x5B,0x84,0x9A,0xF4,0xBD,0x4C,0xCB,0x6E,0x18,0xAA -,0x3E,0x8E,0x5B,0xF6,0xD3,0x51,0x97,0x97,0xF4,0x0E,0x5D,0xE3,0x81,0xC8,0xA5,0xAF,0xAF,0x4B,0x0B,0x0B,0x0B,0xAE,0x87,0x4B,0x09,0x33,0x3E,0x3E,0x01,0xB3,0xE6,0xEC,0x85 -,0x9D,0xC7,0x5D,0x38,0x05,0xE4,0xE1,0xE4,0xA5,0x00,0xB1,0xDE,0xE0,0xFE,0xFD,0xFB,0xD8,0xEE,0x18,0x84,0x4D,0x2E,0x29,0xF8,0xD2,0xE9,0x2E,0x56,0xDA,0xC7,0x61,0xD1,0xB1 -,0x28,0x9C,0x76,0xF7,0xE3,0x26,0x32,0xBE,0x7E,0x77,0x60,0x75,0xE2,0x0A,0xB6,0xDB,0x06,0x73,0x0B,0xEC,0xAB,0x57,0x07,0x30,0x73,0xA2,0xDD,0x11,0x30,0x37,0x62,0x9A,0x53 -,0x3D,0x26,0x54,0x89,0xC5,0x25,0xA5,0x71,0xC3,0xF6,0x4B,0x53,0x2C,0xF1,0xD2,0xE1,0x14,0xFC,0xF0,0x50,0x0A,0x7E,0x34,0xD9,0x12,0xFF,0x31,0x65,0x31,0x0A,0x8B,0x59,0x3A -,0x20,0x51,0x25,0x26,0xD8,0xCD,0xCC,0x56,0xA0,0xB4,0xA2,0x01,0xD3,0x2C,0xCF,0x61,0xFA,0x0A,0x67,0x4E,0x94,0xAB,0x76,0x5E,0x43,0x4F,0x6F,0x1F,0x77,0x5C,0xBF,0x38,0x48 -,0x7C,0x68,0xE1,0x02,0xA3,0x71,0xB4,0xF5,0x26,0x63,0x60,0xEE,0x52,0x83,0x0E,0x44,0x61,0xE8,0xB2,0x67,0x88,0xE5,0x84,0x5A,0xCD,0x0B,0xB1,0xEE,0xDB,0xD9,0x30,0x9E,0x8C -,0xDA,0x1C,0x77,0x5C,0xB4,0x5B,0x88,0xCC,0xE8,0x5B,0x68,0x28,0xCE,0x45,0x73,0x43,0xFD,0xBF,0xE8,0xB6,0xEF,0xA8,0x94,0xFF,0x32,0xE4,0xD2,0xE1,0x1D,0x81,0x17,0xD7,0xB2 -,0x61,0xFD,0x0A,0xB2,0x03,0x37,0x21,0xC1,0xC7,0x16,0x83,0x3D,0x86,0x73,0x4B,0x81,0x0B,0x16,0x2C,0x10,0x17,0xC3,0xF5,0x85,0x49,0x22,0x89,0x8E,0x4E,0xC7,0x9C,0x05,0x87 -,0xE0,0x11,0xAE,0xC4,0x61,0xAF,0x0C,0xEE,0x19,0xA9,0x02,0xC9,0xD6,0xC5,0x0B,0x96,0x27,0xA3,0xB1,0xEC,0x44,0x0C,0x2C,0x8E,0x46,0x61,0xEE,0x81,0x30,0x4C,0xB3,0x0E,0xC2 -,0xDA,0x03,0x97,0x10,0x1E,0x1E,0x0E,0xE7,0x8B,0x57,0x71,0xF4,0x52,0x0C,0xFE,0x34,0xCD,0x1A,0xB3,0x67,0xB3,0x3C,0x78,0xB8,0xDD,0x11,0x30,0x37,0xC7,0x34,0xA7,0x7A,0x8C -,0x5E,0x1D,0x53,0x5D,0x03,0x55,0x89,0x9D,0xF7,0xF4,0xC1,0xBF,0xFF,0x61,0x11,0x5E,0x7E,0x77,0x06,0x5E,0xF9,0xED,0x0C,0xFC,0x9C,0x6D,0xFB,0x85,0xCB,0xB8,0xEB,0x50,0x1B -,0x6A,0xAB,0x0B,0xC1,0x6E,0x72,0x6A,0x3A,0x1A,0x35,0x5A,0xD8,0x9E,0x8F,0xC2,0x8C,0x15,0x2E,0x98,0xB5,0xCA,0x15,0x77,0x22,0x14,0xA2,0xA6,0xE8,0xF7,0xD4,0xB5,0x2B,0x3E -,0xB4,0x70,0x01,0xCA,0x41,0xF4,0x39,0xD6,0x7A,0x93,0x21,0x8C,0x67,0xA9,0x41,0x07,0xBA,0x4E,0x1A,0xC6,0x7A,0x45,0xFC,0x6F,0xEF,0xF9,0xAD,0x47,0x82,0xEF,0x06,0xDC,0x70 -,0xDD,0x8D,0xB2,0xCC,0x7B,0xA8,0xAF,0x6A,0xFC,0xC9,0x58,0xAF,0x15,0x4B,0x52,0x83,0xFE,0xE4,0x76,0x64,0x31,0x1A,0xE5,0x4E,0xF0,0x76,0x5C,0x81,0xFB,0x1A,0x23,0x4A,0xE1 -,0x78,0x7E,0xFA,0xE9,0xA7,0x63,0x0A,0x93,0xA2,0xD0,0x81,0x83,0x6E,0x58,0x60,0x69,0x8B,0x4B,0xC1,0x0A,0xE4,0xE6,0x29,0x21,0x8B,0x4B,0xC0,0x9C,0x5D,0x9E,0x98,0xB5,0x3F -,0x04,0x33,0xF6,0x06,0xE3,0x2F,0x7B,0x02,0x30,0x65,0xA7,0x1F,0x26,0x6F,0xF1,0xC6,0x9C,0x9D,0xEE,0xF0,0xF4,0xBE,0x85,0x93,0xE7,0x03,0x30,0xE3,0xB3,0x43,0x78,0xEB,0x1D -,0xC9,0x62,0xE1,0x11,0x20,0x61,0x9A,0x33,0x2B,0x37,0xA7,0x7A,0x4C,0xD7,0x87,0x54,0x25,0xA6,0x50,0xAA,0xE0,0x7D,0x27,0x02,0x37,0x83,0xA3,0x99,0x1E,0x2A,0xB9,0xA0,0x62 -,0x68,0xB9,0x88,0x8A,0x83,0xD4,0xEA,0x22,0x36,0xF9,0x69,0x80,0xDD,0xF9,0x48,0x38,0xB2,0x4E,0xD8,0xDE,0xD1,0x0D,0x0D,0xBB,0x0F,0xA9,0xE2,0x20,0xF1,0xA1,0x85,0x0B,0x90 -,0x10,0x85,0x59,0x1B,0xD1,0xD0,0x7A,0x93,0x21,0x8C,0x67,0xA9,0x41,0x07,0xFA,0x8E,0x12,0x29,0xF3,0x3D,0xBA,0xCD,0xD3,0xF6,0x53,0xA4,0x47,0x9E,0x47,0x65,0x61,0x0E,0xBA -,0x5A,0xDB,0x24,0x8B,0x2F,0xF4,0xD9,0x59,0xAD,0x7C,0xD5,0xFF,0xA2,0x35,0x1C,0xBF,0xF9,0x0C,0x4D,0xE5,0xF4,0x1E,0x53,0xBA,0x9D,0x3E,0xE7,0xCD,0x9B,0xC7,0x0D,0xCB,0x82 -,0x23,0xC9,0x29,0x24,0x54,0xDA,0x47,0xA4,0xEF,0x34,0x91,0xF9,0x7A,0xD7,0x69,0xCC,0x9C,0xBB,0x1F,0xCE,0xEE,0x81,0xB8,0xEC,0x97,0x80,0x3D,0x17,0x13,0x61,0x79,0x3C,0x0C -,0xF3,0xF7,0xDD,0xC1,0x3C,0x6B,0x1F,0x2C,0xD9,0x7F,0x1B,0xDB,0xEC,0x03,0x61,0x73,0x45,0x86,0x5D,0x76,0x41,0x98,0x3A,0x73,0x2F,0x7E,0xF7,0xFE,0x67,0xCC,0x84,0xA4,0xDD -,0x11,0x30,0x77,0x1D,0xD3,0xDC,0xEA,0x31,0x7A,0x2E,0x12,0x9E,0xA9,0x55,0x62,0x82,0x5D,0x81,0x14,0xD4,0x28,0x4A,0xD2,0x6F,0x26,0x44,0x69,0x5D,0x0A,0x76,0xC5,0x87,0x16 -,0x2E,0xA0,0x2B,0x4C,0x63,0xD6,0x9B,0x0C,0x61,0x3C,0x4B,0x0D,0x3A,0xD0,0x77,0x94,0xC8,0x08,0x5F,0x97,0xCF,0x9B,0x8B,0x32,0x5F,0x6F,0xA9,0x65,0x91,0xAB,0xBD,0x03,0x5D -,0xFD,0xAD,0xCF,0xF7,0x1B,0xFB,0x37,0xE4,0x9D,0xED,0xDF,0x57,0x24,0x07,0xFF,0x5F,0x4E,0x46,0xF4,0x07,0x92,0xC7,0x25,0xB8,0x70,0xE1,0x42,0x50,0x9E,0x39,0x16,0xE7,0xCE -,0x9D,0x8B,0xA9,0x53,0xA7,0x62,0xF2,0xE4,0xD9,0x2C,0x5F,0xFC,0x0A,0x73,0x97,0x1E,0xC7,0xA6,0x83,0x3E,0x38,0xC4,0x86,0x31,0xBB,0x6B,0x77,0xD9,0x04,0x27,0x11,0xFB,0xCE -,0x86,0xE1,0xCB,0x7D,0x37,0x30,0xCB,0xE2,0x08,0xDE,0xFF,0x70,0x3D,0x16,0x2E,0x1C,0xB5,0x16,0x93,0x38,0x6E,0xE8,0x0B,0xC4,0x10,0xA5,0xFC,0x4B,0xD1,0xD0,0xD4,0x2A,0x31 -,0xA1,0x9D,0x29,0x24,0x88,0x0F,0x4D,0x3B,0xE8,0x86,0x48,0x98,0xA6,0xAC,0x37,0x19,0xC2,0x78,0x96,0x1A,0x74,0xA0,0xEF,0xA8,0x11,0xEC,0xEE,0xEF,0x7C,0xAE,0x7D,0xB0,0xF7 -,0xFB,0x52,0xC7,0x0C,0x71,0xB4,0x12,0xB7,0x6F,0x8B,0x07,0x0F,0x3A,0xE0,0x7F,0xDE,0x5E,0x82,0x77,0x7F,0xF7,0x15,0x3E,0xF8,0x70,0x23,0x47,0xDA,0x7E,0xF3,0xAD,0x45,0x38 -,0x70,0xC0,0x9E,0x35,0x91,0x3E,0x4F,0x87,0xE3,0x86,0xAE,0xE3,0x8D,0xE5,0xA3,0x84,0xF8,0xD0,0x74,0x23,0x24,0x38,0x53,0xD7,0x9B,0x0C,0x61,0x3C,0x4B,0x0D,0x3A,0xD0,0x77 -,0x94,0xC8,0x81,0xBE,0x9A,0x1F,0x4B,0xED,0x9F,0x68,0xF4,0xF7,0xF7,0xC7,0xF6,0xED,0xDB,0x87,0x91,0xF6,0xE9,0xB7,0x1B,0x85,0x8F,0x25,0xF8,0xEA,0x37,0xF3,0xC0,0x5F,0x43 -,0x14,0xA6,0xA9,0xEB,0x4D,0x86,0x30,0x9E,0xA5,0x06,0x1D,0xE8,0x39,0x4A,0x77,0xB6,0x6D,0xFE,0xBF,0x7E,0xA1,0x7F,0x1B,0x33,0x00,0xE3,0x67,0xE4,0x8F,0x90,0xE3,0x02,0xEF -,0xEA,0xC7,0x0B,0xFC,0xBD,0x8B,0xC2,0x34,0x75,0xBD,0xC9,0x10,0xC6,0xB3,0xD4,0x20,0x20,0x4F,0x9E,0x3A,0x82,0xFC,0xED,0x3F,0xC3,0x93,0x0A,0xDE,0xF7,0xA2,0x30,0x4D,0x5D -,0x6F,0x32,0x84,0xF1,0x2C,0x35,0x08,0xA0,0xDB,0x94,0xE0,0x33,0x3C,0xC9,0xE0,0x7D,0x2F,0x0A,0xD3,0xD4,0xF5,0x26,0x63,0x60,0xEE,0x52,0x83,0x00,0x3E,0x42,0x8A,0x7C,0x16 -,0x31,0x9F,0x02,0xF0,0xBE,0x17,0x85,0x29,0xD0,0xD8,0xF5,0x26,0x63,0x61,0xCE,0x52,0x83,0x00,0x9D,0xE1,0x5B,0x77,0xFB,0x19,0x9E,0x64,0xF0,0xBE,0x17,0xC5,0x62,0x0A,0xBF -,0x2B,0x08,0x62,0xD4,0x25,0x7F,0xFB,0xCF,0xF0,0xA4,0x82,0xF7,0xFD,0x84,0x06,0x7F,0xAB,0xCF,0xF0,0x34,0x81,0xF7,0xFD,0x84,0x06,0x7F,0xAB,0xCF,0xF0,0x34,0x81,0xF7,0xFD -,0x84,0x06,0x7F,0xAB,0xCF,0xF0,0x34,0x81,0xF7,0xFD,0x84,0x06,0x7F,0xAB,0xCF,0xF0,0x34,0x81,0xF7,0xFD,0x84,0x06,0x7F,0xAB,0xCF,0xF0,0xD4,0x60,0xD2,0xA4,0xFF,0x07,0x40 -,0x33,0x1C,0xA4,0xAE,0x60,0xAD,0xAD,0x00,0x00,0x00,0x00,0x49,0x45,0x4E,0x44,0xAE,0x42,0x60,0x82 +,0x70,0x48,0x59,0x73,0x00,0x00,0x0E,0xC3,0x00,0x00,0x0E,0xC3,0x01,0xC7,0x6F,0xA8,0x64,0x00,0x00,0x18,0xB9,0x49,0x44,0x41,0x54,0x78,0x5E,0xED,0xDD,0x77,0x74,0x54,0xE7 +,0x99,0x06,0x70,0x3B,0xD9,0x78,0x93,0x4D,0xD6,0xCE,0xC9,0xC9,0xD9,0xD8,0x27,0x27,0x8E,0x4F,0x36,0xC5,0x39,0xF1,0x26,0xDE,0x24,0x76,0x5C,0x83,0x37,0x2E,0x34,0x37,0xEC +,0xD0,0x0C,0x32,0x60,0x8A,0x31,0x98,0x66,0x6C,0x20,0x10,0x6C,0x7A,0x15,0x08,0x10,0x48,0x02,0x24,0x64,0x10,0x88,0x22,0x23,0x50,0x03,0x55,0xD4,0x50,0x45,0x6D,0x40,0x23 +,0x09,0x75,0x09,0x75,0x8D,0x1A,0x2A,0xA8,0x3F,0x7B,0xDF,0xCF,0x73,0xB5,0x23,0x31,0x02,0x69,0x84,0x6D,0xD9,0xFB,0xFC,0xCE,0x79,0x8F,0x46,0x33,0xDF,0x9D,0x7B,0xD1,0x65 +,0xFE,0x78,0xDE,0xEF,0xBB,0x77,0xEE,0x4A,0x4F,0x8B,0x47,0xDF,0xA2,0xAF,0x9D,0xBB,0xBE,0x6E,0xD5,0xD9,0x5D,0xFF,0x1D,0xF5,0xB8,0xAD,0xE1,0x5F,0xE4,0x67,0x37,0x6A,0xBE +,0x6B,0xF9,0xFA,0x20,0x6B,0xD8,0xBB,0x8B,0x88,0x88,0x88,0x88,0x88,0x68,0x18,0x90,0x70,0xD2,0xAB,0xC4,0x4E,0x07,0x87,0x41,0x57,0x5F,0x9D,0x9D,0x9D,0x48,0x4D,0x4B,0xC3 +,0x29,0x2F,0x2F,0xEC,0xDE,0xB3,0x47,0x95,0x3C,0x96,0xE7,0xE4,0xB5,0x5B,0xB1,0x65,0x5B,0x6B,0xC7,0x74,0xBB,0xFA,0x86,0xE8,0x09,0xC3,0xFB,0xF6,0xED,0xC3,0xFE,0xFD,0xFB +,0x55,0xB9,0xBA,0xBA,0xE2,0xD0,0xA1,0x43,0xEA,0xA7,0xFC,0xEE,0xE4,0xE4,0x04,0x47,0x47,0x47,0x38,0x68,0xFF,0x6E,0x7B,0x7B,0x7B,0x6C,0xD9,0xB2,0x05,0x1B,0x36,0x6C,0xC0 +,0xDA,0xB5,0x6B,0xB1,0x7A,0xF5,0x6A,0xAC,0x5C,0xB9,0x12,0xCB,0x96,0x2D,0xC3,0x07,0x1F,0x7C,0x80,0x45,0x8B,0x16,0x61,0xFE,0xFC,0xF9,0x98,0x3B,0x77,0x2E,0x66,0xCD,0x9A +,0xA5,0x6A,0xFA,0xF4,0xE9,0xBD,0xF6,0x35,0x8C,0x6A,0xD8,0xD3,0x3E,0x57,0x44,0x44,0x44,0x44,0x44,0x44,0x5F,0x2D,0x99,0xF1,0xD7,0x7E,0xF4,0x94,0xBE,0x02,0x40,0xC2,0x71 +,0x53,0x53,0x53,0xBF,0xD5,0xDA,0xDA,0x8A,0xB6,0xB6,0x36,0xB4,0xB4,0xB4,0xA8,0xDF,0xFB,0x86,0xE9,0xC6,0xC6,0x46,0x78,0x1C,0x3D,0x8A,0xA0,0xE0,0x60,0xE4,0xE4,0xE4,0xE0 +,0xFA,0xF5,0xEB,0xAA,0xE4,0xB1,0x3C,0x27,0xAF,0xC9,0x18,0x6B,0x6C,0xDD,0xF6,0x76,0xC7,0xDC,0xB7,0xBE,0x89,0x0D,0x00,0x09,0xF9,0x5D,0x5D,0x5D,0xAA,0xBA,0xBB,0xBB,0xD1 +,0xDE,0xDE,0xAE,0x7E,0xEA,0xCF,0xE9,0x25,0x4D,0x14,0xBD,0x3A,0x3A,0x3A,0x7A,0x4A,0xC6,0xEB,0x25,0xE7,0x57,0x2F,0x39,0xDF,0x33,0x67,0xCE,0xEC,0xB5,0xAF,0x3B,0x51,0xA6 +,0xDC,0x82,0x07,0xAC,0x3D,0x3F,0xC8,0x1A,0xF6,0xE4,0xB3,0x46,0x44,0x44,0x44,0x44,0x44,0xF4,0x95,0xD2,0x97,0xFD,0x6B,0x0F,0x7B,0x5D,0x02,0xA0,0x87,0x69,0x6F,0xBF,0xA0 +,0x9B,0x2A,0x21,0x29,0x0D,0x6E,0xC7,0x23,0xB0,0x7C,0x93,0x17,0x72,0x0B,0x4A,0xD0,0xDC,0xDC,0xDC,0x2B,0x4C,0x4B,0xA8,0x3C,0xE2,0xE1,0x81,0xE8,0xE8,0x68,0xD4,0xD4,0xD4 +,0x22,0x36,0x21,0x19,0x01,0xC1,0xE1,0xAA,0xE2,0x2F,0xA5,0xA0,0xA6,0xB6,0x56,0xBD,0x26,0x63,0xFA,0xCE,0xE6,0xF7,0xDD,0x36,0x38,0x3C,0x06,0x1B,0x1D,0xDD,0x55,0x85,0x46 +,0xC6,0xDC,0x72,0xDB,0x5B,0x1D,0xB3,0xD4,0x19,0xFF,0x60,0xF8,0x07,0x85,0x21,0xE4,0x42,0xE4,0x17,0xDE,0x00,0x48,0x48,0x48,0x50,0x4D,0x8B,0x2F,0x49,0x4F,0x18,0x96,0x19 +,0x7E,0x09,0xF8,0xB9,0xB9,0xB9,0xC8,0xCB,0xCB,0x43,0x76,0x76,0x36,0x4A,0x4B,0x4B,0x51,0x50,0x50,0xA0,0xAA,0xB0,0xB0,0x10,0x45,0x45,0x45,0x3D,0x55,0x5C,0x5C,0xDC,0xAB +,0xAE,0x5D,0xBB,0x76,0x53,0xC9,0xF3,0xD2,0x00,0xB0,0xB3,0xB3,0xEB,0xB5,0xAF,0xA1,0x57,0xE3,0xB7,0x4E,0xBB,0xAF,0x40,0x7D,0x59,0xEE,0x03,0xDD,0xF8,0xFC,0x52,0x00,0x1B +,0x4B,0x91,0xF3,0x39,0xD8,0x1A,0x28,0xF9,0xBF,0x66,0xEB,0x6A,0x16,0xF1,0xF9,0xA7,0x8D,0x88,0x88,0x88,0x88,0x88,0xE8,0x2B,0xA4,0x87,0x7E,0xCB,0x12,0x12,0x8E,0xF4,0x30 +,0x7D,0x29,0xD5,0xD8,0x53,0x49,0x69,0x19,0x5A,0x08,0x6F,0xC0,0xC4,0x79,0x6E,0x78,0xE1,0xAD,0x3D,0x08,0x0A,0x4F,0x53,0xAB,0x00,0x2C,0xC3,0x94,0x84,0x22,0x99,0xA9,0xAF +,0xAC,0xAA,0x86,0x5F,0x60,0x18,0xC2,0xA2,0xE2,0x10,0x9F,0x7C,0x19,0x09,0x29,0x57,0x10,0x13,0x9F,0x84,0x0B,0x5A,0x90,0xAF,0x36,0x99,0xD4,0x18,0x19,0x6B,0xC9,0x72,0xDB +,0xAD,0xCE,0x47,0xF0,0x9B,0x91,0xD3,0x31,0x6A,0xE6,0x0A,0x3C,0x3E,0x6E,0x0E,0x1E,0x7A,0x6E,0x12,0x76,0x1E,0x38,0xDA,0xEF,0xB6,0xFD,0x1D,0xB3,0x54,0xDA,0x95,0x2C,0x18 +,0xB3,0x72,0x91,0x93,0x57,0x80,0xC8,0xE8,0x98,0x2F,0xBC,0x01,0xE0,0xE9,0xE9,0x89,0x93,0x27,0x4F,0xAA,0xF0,0xFC,0x25,0xE8,0x09,0xC3,0x7B,0xB4,0x60,0x2A,0x33,0xFE,0x12 +,0xFE,0xF3,0xF3,0xF3,0x55,0x03,0xA0,0xAC,0xAC,0x4C,0x05,0x7F,0xCB,0xF0,0x6F,0x2D,0xF0,0x97,0x94,0x94,0x58,0x2D,0x79,0xED,0x8B,0x68,0x00,0x5C,0xCB,0x88,0xFE,0xA3,0x8F +,0xFB,0x02,0x64,0x5C,0xF4,0x46,0x37,0x1A,0xBF,0x65,0x6D,0xCC,0x00,0x4B,0xD1,0xCF,0xFF,0x40,0x6B,0xA0,0xE7,0x7F,0x28,0xAB,0x59,0x74,0xE6,0x8F,0x1B,0x11,0x11,0x11,0x11 +,0x11,0xD1,0xF0,0x22,0x81,0xC5,0x5A,0x98,0x4E,0x36,0x64,0xA0,0xB0,0xB8,0x0C,0x67,0x02,0x53,0xF1,0xA2,0x16,0xFE,0x67,0x2F,0x3F,0x86,0xF2,0xF2,0x8A,0x9B,0xC2,0x94,0x04 +,0x5F,0x99,0x81,0x56,0x61,0x3F,0x3A,0x41,0x6D,0x9B,0x72,0x39,0x53,0x05,0xF0,0xDC,0xFC,0x42,0x5C,0x49,0xCF,0x44,0xBA,0xD1,0xA8,0xC6,0xC8,0x58,0x4B,0xFA,0xB6,0x41,0x17 +,0x2E,0xE2,0x97,0x2F,0xD8,0x61,0xB7,0x6F,0x2C,0xE2,0xAA,0xBB,0xF0,0x5E,0x54,0x3A,0x7E,0xFC,0xDC,0x54,0x3C,0x38,0x62,0x22,0x12,0x92,0x92,0xAD,0x6E,0xDB,0xDF,0x31,0x5F +,0x36,0x66,0x23,0x2B,0x27,0x1F,0x79,0x05,0x5A,0xF0,0xBD,0x56,0x82,0xD8,0xB8,0xF8,0x41,0x05,0x40,0x5B,0x48,0x03,0xA0,0xA6,0xA6,0x06,0x87,0x0F,0x1F,0x56,0x33,0xEF,0x43 +,0x15,0x1A,0x1A,0xAA,0xAE,0xD9,0xEF,0x47,0x4F,0x18,0xDE,0xB5,0x6B,0x97,0x6A,0x00,0x48,0xF8,0x97,0xFD,0x4A,0x48,0x95,0x06,0x80,0x84,0xFE,0xB0,0xB0,0x30,0x84,0x84,0x84 +,0xF4,0x2A,0x79,0xDF,0xFE,0x2A,0x3C,0x3C,0x5C,0xAD,0x1E,0x90,0x26,0x80,0x34,0x00,0xA6,0x4E,0x9D,0xDA,0x6B,0x5F,0x43,0xAD,0x60,0xCF,0xED,0xF3,0x4C,0x06,0x3F,0x5C,0x38 +,0xFC,0x09,0xAE,0xD7,0x34,0x0D,0xF9,0x26,0x80,0x96,0xE7,0xDF,0x5A,0xD9,0xB2,0x02,0xA4,0xEF,0x8A,0x94,0xC1,0xAC,0x66,0xB1,0x64,0xFE,0x68,0x11,0x11,0x11,0x11,0x11,0x11 +,0x0D,0x2F,0x12,0x58,0x2C,0xC3,0x94,0xF1,0x6A,0x1E,0x0A,0x8A,0x4B,0x55,0x80,0xBF,0xDE,0xD8,0x84,0xB7,0x97,0x1C,0xC6,0xC8,0xA9,0x7B,0x11,0x1A,0x9D,0x81,0x1C,0x2D,0x88 +,0xF7,0x0D,0x53,0xB2,0x3C,0x5A,0x66,0x48,0x25,0x6C,0x49,0x00,0xBF,0x92,0x91,0xAD,0x66,0xDE,0x4B,0x4A,0x4A,0x51,0x59,0x59,0x89,0x8A,0x8A,0x4A,0xA4,0x19,0x2E,0xAB,0x31 +,0x32,0xD6,0x92,0xBE,0xED,0xEA,0x1D,0x2E,0x78,0x74,0xEC,0x34,0xEC,0x32,0x96,0xC2,0x2E,0x25,0x0F,0x0F,0x1F,0x31,0xE0,0x27,0xDB,0xE2,0x70,0xFF,0x9F,0x46,0xC1,0xC1,0xD5 +,0xD3,0xEA,0xB6,0x96,0xC7,0x9C,0x6C,0xC8,0x44,0x5A,0xFA,0x55,0xA4,0x67,0xE6,0xA8,0x7D,0x17,0x15,0x5F,0x43,0xA9,0x16,0x84,0x2B,0x2A,0x2A,0x90,0x94,0x9C,0x3C,0xE0,0x00 +,0x68,0x2B,0x69,0x00,0x08,0x93,0xC9,0x04,0x17,0x17,0x17,0xD4,0x6A,0x41,0xD1,0x56,0x12,0xC6,0x7F,0xFD,0xEB,0x5F,0xAB,0xEA,0x47,0x4F,0x18,0xDE,0xB9,0x73,0xA7,0xBA,0x04 +,0x40,0x5F,0xF2,0x2F,0x8D,0x92,0xF2,0xF2,0xF2,0x9B,0x66,0xFC,0xF5,0xD9,0x7D,0x09,0xF8,0x7A,0x49,0xA3,0xC0,0x5A,0xC9,0x6B,0x5F,0x44,0x03,0xE0,0xA2,0xD7,0xBA,0xA5,0x28 +,0x0D,0x40,0x90,0xF3,0x24,0xE4,0x67,0x5C,0xF9,0x85,0xB5,0x31,0x03,0x2C,0xC5,0xF2,0xFC,0xEB,0x0D,0x20,0xBD,0x6C,0x5D,0x01,0x32,0x94,0xD5,0x2C,0x96,0xCC,0x1F,0x2D,0x22 +,0x22,0x22,0x22,0x22,0xA2,0xE1,0x45,0x02,0x8B,0x1E,0xA6,0x62,0x12,0x92,0x91,0x90,0x9A,0x07,0x0F,0xEF,0x78,0x35,0xDB,0x19,0x1C,0x69,0xC4,0xE8,0xB7,0x9D,0x30,0x6B,0xD9 +,0x31,0x15,0x0A,0x8D,0xC6,0x8C,0x9B,0xC2,0x94,0x1E,0xE2,0x43,0x2E,0x44,0x21,0x33,0x3B,0x0F,0x85,0x45,0xD7,0x54,0xF0,0xAF,0xAB,0xAB,0x43,0x7D,0x7D,0xBD,0xF6,0xB3,0x5E +,0x35,0x0E,0xE4,0x77,0xC7,0xBD,0x7B,0xCD,0x5B,0x7D,0x4E,0xDF,0x76,0xDD,0x2E,0x57,0x2D,0xEC,0x8F,0xC4,0x2F,0x1C,0x62,0xF1,0x90,0x9B,0x01,0xF7,0xBB,0x18,0x70,0xEF,0x86 +,0x58,0xD5,0x00,0x70,0xF6,0xF8,0xCC,0xEA,0xB6,0xFA,0x31,0xFB,0x9E,0x0F,0x55,0x61,0x2F,0x3B,0xB7,0x40,0xED,0x5B,0x42,0xBF,0x04,0x71,0x99,0x91,0x97,0x4A,0xB7,0x72,0xCC +,0x77,0x9A,0xDE,0x00,0x10,0xF2,0x6F,0xDF,0xB8,0x71,0xA3,0xDA,0xF7,0x60,0xE9,0xE1,0x7F,0xF2,0xE4,0xC9,0x03,0x6A,0x00,0x6C,0xDF,0xBE,0xBD,0xA7,0x01,0x20,0x4B,0xFE,0xE5 +,0x52,0x00,0xF9,0xF7,0x4B,0xF8,0xBF,0x70,0xE1,0x42,0xAF,0x19,0x7E,0x29,0x59,0x15,0xD0,0x5F,0x45,0x44,0x44,0xA8,0xE6,0x81,0x34,0x01,0xE4,0x5C,0x4F,0x99,0x32,0xA5,0xD7 +,0xBE,0x86,0x52,0x86,0xA4,0x73,0x23,0x32,0x82,0xD6,0xA2,0xBB,0x74,0x2B,0xB2,0xCE,0x4D,0x45,0x44,0xA8,0x33,0xDA,0x9A,0x5A,0xEF,0xB6,0x36,0x76,0x00,0xA5,0xE8,0xE7,0xDF +,0xB2,0x01,0x30,0xD4,0x15,0x20,0x43,0x59,0xCD,0x62,0xC9,0xFC,0xD1,0x22,0x22,0x22,0x22,0x22,0x22,0x1A,0x5E,0x24,0xB0,0xE8,0x61,0x2A,0xBF,0xB0,0x08,0x0B,0x3F,0x39,0xA5 +,0x66,0xFC,0x53,0xD3,0x8B,0xF1,0xEE,0x8A,0xE3,0x18,0x3B,0xDD,0x19,0xE7,0xC3,0x8D,0xEA,0xDA,0xFF,0xDC,0xBC,0xFC,0x9B,0xC2,0xD4,0xF1,0x13,0x27,0x54,0xF0,0x4C,0x35,0x5C +,0x81,0x31,0x23,0xAB,0x27,0xFC,0xCB,0x38,0xB9,0x61,0xA0,0xCC,0x86,0x4B,0x28,0x95,0x31,0x32,0xD6,0x92,0xBE,0x6D,0x44,0x4C,0x82,0x5A,0xEE,0x7F,0xDF,0x08,0x3B,0xDC,0xB7 +,0x3E,0x0E,0xDF,0x5F,0x17,0x87,0x1F,0x3C,0x6B,0x87,0x9F,0x8F,0x98,0x84,0xAB,0xB9,0x5A,0x98,0xB3,0xB2,0xAD,0x7E,0xCC,0x81,0x21,0xE1,0x2A,0xEC,0x95,0x94,0x96,0xA2,0xAA +,0xAA,0x4A,0xED,0x5B,0x9A,0x0A,0x7A,0x59,0x3B,0xE6,0x3B,0xED,0x4E,0xAC,0x00,0xB0,0x0C,0xFF,0x03,0x6D,0x00,0x6C,0xDD,0xBA,0x55,0x35,0x00,0xF4,0xEB,0xFD,0xE5,0x52,0x00 +,0xF9,0x5B,0xEB,0xB3,0xFE,0x7D,0x67,0xFB,0x25,0xE0,0xEB,0x25,0xE3,0xFA,0x2B,0x69,0x00,0xBC,0xF5,0xD6,0x5B,0xBD,0xF6,0x35,0x94,0x0A,0x38,0xB6,0x61,0x49,0x5D,0x66,0x08 +,0x9A,0x0B,0x66,0x03,0x99,0xCF,0x23,0x64,0xD7,0x02,0x54,0x97,0x55,0xDD,0x67,0x6D,0xEC,0x00,0x4A,0xD1,0xCF,0xFF,0x9D,0x5C,0x01,0xA2,0x37,0xA4,0x6C,0x59,0xCD,0x62,0xC9 +,0xFC,0xD1,0x22,0x22,0x22,0x22,0x22,0x22,0x1A,0x5E,0x24,0xB0,0xE8,0x61,0x2A,0x39,0xD5,0x80,0xFC,0xA2,0x4A,0x8C,0xB2,0xDB,0x87,0xD1,0xD3,0x9C,0x54,0xF8,0x9F,0xB1,0xF4 +,0x28,0x5A,0xDB,0xDA,0xD5,0xEB,0x45,0xC5,0xC5,0x37,0x85,0xA9,0x94,0x94,0x14,0x04,0x87,0x84,0x68,0xE1,0xB7,0x06,0xC9,0x29,0xA9,0x6A,0x8C,0xCC,0xFC,0xCB,0xB8,0x86,0x86 +,0x06,0x54,0x57,0x57,0xAB,0xC0,0x24,0x63,0x64,0xAC,0x25,0xCB,0x6D,0xF7,0x7B,0x78,0xE1,0x67,0x7F,0x9D,0x88,0xFB,0x1F,0x1B,0x83,0x07,0xFE,0x3C,0x06,0x0F,0x6A,0x8F,0xBD +,0x03,0xC3,0xFB,0xDD,0x56,0x3F,0xE6,0xD0,0xF0,0x28,0x5C,0x33,0x07,0x34,0x99,0x75,0x97,0xF1,0xF2,0xBC,0x34,0x1F,0xFA,0x3B,0xE6,0x3B,0x6D,0xA8,0xF7,0x00,0xE8,0x1B,0xFE +,0x07,0xDA,0x00,0xD8,0xB4,0x69,0x93,0x6A,0x00,0xE8,0x37,0xFA,0x93,0x06,0x80,0xFC,0x1D,0x24,0xFC,0xCB,0x35,0xFD,0x7D,0x67,0xFD,0x65,0x55,0x40,0x7F,0x15,0x19,0x19,0xA9 +,0xB6,0x95,0x92,0x06,0x80,0x1C,0x83,0xE5,0xBE,0x6C,0xAE,0xE6,0xF2,0x7B,0xFD,0x8E,0x7C,0x08,0xD4,0x45,0xA3,0xF9,0xEA,0x1B,0x68,0xBB,0xFC,0x18,0x22,0x9C,0xA7,0x21,0x3B +,0x25,0xF0,0x59,0xAB,0xE3,0x6F,0x5F,0x8A,0x7E,0xFE,0xEF,0xE4,0x0A,0x90,0xA1,0xAC,0x66,0xB1,0x64,0xFE,0x68,0x11,0x11,0x11,0x11,0x11,0x11,0x0D,0x2F,0x12,0x58,0xF4,0x30 +,0x15,0x1B,0x9F,0x88,0x2A,0x53,0x3D,0xB6,0xEF,0x0F,0xC1,0x98,0x69,0xCE,0x78,0x79,0x86,0x0B,0xCE,0x06,0x19,0xD4,0x77,0xC3,0xCB,0x0A,0x00,0x99,0x45,0xEE,0x1B,0xA6,0x2C +,0x6F,0x9C,0x56,0x5F,0xDF,0x80,0x62,0x35,0xFB,0xAC,0x05,0xF2,0xAA,0x2A,0xD4,0xD6,0xD6,0xA9,0x3B,0xA6,0xF7,0x77,0xE3,0xB4,0xBE,0xDB,0x1A,0x8C,0x99,0xF0,0x3C,0x1B,0x84 +,0x93,0xFE,0xA1,0xC8,0x2D,0x28,0xBE,0xE5,0xB6,0xFA,0x31,0x47,0x5D,0x8C,0xED,0x09,0xFF,0x7A,0xE3,0x41,0x8E,0x55,0x2F,0x6B,0xC7,0x7C,0xA7,0x49,0x03,0x40,0x96,0x84,0x4B +,0x08,0xB7,0x85,0xDC,0xF0,0x4F,0x02,0xBF,0x65,0x0D,0xE4,0x26,0x80,0xEB,0xD7,0xAF,0xEF,0x69,0x00,0x9C,0x3D,0x7B,0x56,0xFD,0x94,0x55,0x10,0x7D,0x67,0xFD,0xF5,0x99,0xFD +,0xD2,0xD2,0x72,0x9C,0x39,0x13,0x81,0x0F,0x3E,0x74,0xC6,0xD8,0x57,0xFF,0x89,0xBF,0x8E,0x58,0xAC,0x4A,0x1E,0xCB,0x73,0x67,0xCF,0x46,0xAA,0x31,0xD2,0x00,0x98,0x34,0x69 +,0x52,0xAF,0x7D,0xD9,0x5A,0x29,0xE7,0x5D,0xEC,0xAE,0x44,0xEC,0x03,0x4A,0x5C,0xD1,0x91,0x31,0x0E,0xED,0x99,0x23,0x50,0x7C,0x61,0x3A,0xA2,0x4E,0x6D,0xC2,0xF5,0xDA,0x1A +,0x5B,0x6E,0x06,0xA8,0xE8,0xE7,0xFF,0x4E,0xAE,0x00,0x19,0xCA,0x6A,0x16,0x4B,0xE6,0x8F,0x16,0x11,0x11,0x11,0x11,0x11,0xD1,0xF0,0x22,0x81,0x45,0x0F,0x53,0x89,0x97,0x92 +,0x90,0x9D,0x9D,0x83,0x82,0xE2,0x4A,0xD8,0xEF,0x0F,0xC6,0x2E,0xB7,0x30,0x5C,0x6F,0x6C,0x81,0x49,0x0B,0xD7,0xD5,0xD5,0x26,0x2D,0x10,0x55,0x59,0x0D,0x53,0x12,0xD4,0x25 +,0xA4,0xCB,0x4C,0xBD,0xDC,0x89,0x5E,0xC6,0x48,0xC9,0xB5,0xD2,0xF2,0x9C,0xBC,0xD6,0xDF,0x57,0xA7,0xD9,0xBA,0xAD,0xE5,0x31,0xA7,0xA7,0x1B,0xB5,0x6D,0x73,0x51,0xA8,0x05 +,0xE0,0x32,0x2D,0xF0,0x56,0x55,0x57,0xAB,0x9B,0xB5,0xDD,0xEA,0x98,0xEF,0xA4,0x84,0x84,0x04,0x15,0x36,0xBF,0x24,0x3D,0x61,0x78,0xCD,0x9A,0x35,0xAA,0x31,0x22,0x8D,0x07 +,0x09,0xFB,0x72,0x29,0x80,0x84,0x60,0x79,0x2C,0xD7,0xF4,0x5B,0xCE,0xFA,0x3B,0x3A,0x7A,0xE0,0xC5,0x91,0xCB,0xB0,0xE0,0xC3,0x03,0x38,0xE1,0x1B,0x8F,0xF4,0x9C,0x32,0x54 +,0x54,0xD7,0x23,0xFF,0x9A,0x09,0x61,0x89,0x05,0x70,0x70,0x8F,0xC0,0xCC,0xF9,0xFB,0x30,0x7A,0xEC,0x4A,0x04,0x07,0x27,0x62,0xE2,0xC4,0x89,0xBD,0xF6,0x75,0x53,0x75,0xD4 +,0xDD,0x83,0xAE,0xAA,0xEF,0x5B,0x7D,0xCD,0xA2,0xCE,0x39,0xCF,0xDD,0xD1,0x56,0x18,0x05,0x14,0xAD,0x04,0xB2,0x67,0xA0,0x23,0x6B,0x02,0x3A,0x73,0xDE,0x82,0xAF,0xFD,0x5C +,0x34,0x5C,0xCB,0xFE,0xA9,0xB5,0x6D,0x7A,0x55,0x5B,0xFD,0x77,0xFA,0x3C,0xA7,0xE8,0xE7,0xFF,0x4E,0xAE,0x00,0x19,0xCA,0x6A,0x16,0x4B,0xE6,0x8F,0x16,0x11,0x11,0x11,0x11 +,0x11,0xD1,0xF0,0x22,0x81,0x45,0x0F,0x53,0x7A,0x49,0x78,0x92,0x59,0x7F,0x99,0x09,0xD6,0x83,0x94,0x65,0x59,0x0B,0x53,0x12,0x44,0x25,0x14,0x9D,0xF2,0xF2,0x52,0xAF,0x4B +,0xC9,0xAC,0xB8,0x3C,0xD7,0x77,0xF6,0xBE,0x2F,0x5B,0xB6,0x95,0x31,0x7D,0x8F,0xEB,0x56,0x25,0xE3,0xBF,0x21,0x7A,0xC2,0xF0,0xEA,0xD5,0xAB,0xD5,0xDF,0x47,0xBF,0xE6,0x5F +,0x5F,0x01,0xD0,0x77,0xE6,0x7F,0xF3,0x96,0xA3,0x98,0x38,0x75,0x0B,0x62,0x53,0xF2,0x51,0x5B,0xDF,0x88,0xAC,0x62,0x93,0x16,0x68,0xAF,0xAB,0xAF,0x10,0xBC,0x10,0x1D,0x8F +,0x98,0xAC,0x6A,0xC4,0x64,0x56,0x21,0x35,0xA7,0x0A,0x27,0xCE,0xA5,0x60,0xDC,0x84,0x0D,0x78,0x69,0xE4,0xCC,0x5E,0xFB,0xB2,0xAC,0xFA,0xCA,0xA2,0x1F,0x7B,0xBB,0xAC,0x81 +,0xDF,0xEE,0xF9,0x38,0xEF,0xF0,0xFE,0x56,0xDF,0x6D,0x73,0x1C,0xFC,0x77,0xCC,0x71,0x08,0x73,0x5A,0xB0,0xE5,0x9C,0xC3,0x1C,0x87,0x33,0x5B,0x66,0xEC,0x0D,0xD8,0xF1,0x9E +,0xBD,0xDF,0xF6,0xB9,0x3B,0x82,0xDD,0x26,0x02,0x75,0x91,0xE8,0xC8,0x9F,0x0B,0x64,0xBC,0x83,0xAE,0x82,0x77,0xD1,0x51,0xF8,0x26,0x52,0x8E,0x2F,0x84,0x97,0xD3,0x72,0x78 +,0x6F,0xB5,0x73,0xF1,0xD9,0x39,0x77,0xC7,0x69,0xFB,0x05,0x5B,0xBC,0xEC,0x17,0x6D,0x3A,0xEB,0xB0,0x70,0x73,0x80,0x83,0xB6,0x9D,0xC3,0x3B,0x8E,0x21,0xDB,0xA7,0x1C,0x38 +,0x72,0x60,0x33,0x4A,0xF3,0xD2,0x7E,0x65,0xB1,0x7F,0x45,0x3F,0xFF,0x77,0x72,0x05,0x88,0xFC,0x2D,0xA5,0xE1,0x64,0xCB,0x6A,0x16,0x4B,0xE6,0x8F,0x16,0x11,0x11,0x11,0x11 +,0x11,0xD1,0xF0,0x22,0x81,0x45,0xC2,0xD1,0x60,0xEB,0xAB,0x66,0xED,0x98,0x6E,0x57,0xDF,0x10,0x3D,0x41,0x7C,0xE5,0xCA,0x95,0x37,0x35,0x00,0x64,0x96,0x5A,0xC2,0xBF,0x5C +,0xD3,0x2F,0x33,0xFF,0xCB,0x57,0x38,0x62,0xCE,0x02,0x27,0xD4,0x37,0x68,0xC1,0x3F,0xBF,0x04,0x61,0x09,0x97,0x71,0xD1,0x50,0x00,0xC3,0x95,0x0C,0xF8,0x87,0x5F,0x42,0x44 +,0x72,0x1E,0x42,0x0D,0xE5,0x38,0x17,0x97,0x83,0xD4,0x2B,0x99,0xEA,0x3A,0x77,0xE3,0xD5,0x02,0x4C,0x78,0x7B,0x0B,0x26,0x4C,0x5A,0xDF,0x6B,0x7F,0x3D,0xD5,0xDD,0x74,0x77 +,0x66,0xF8,0x31,0x84,0x3A,0x2D,0x42,0xE7,0x8D,0xAB,0xE8,0x6E,0xCF,0x44,0x7B,0x4B,0x1A,0x5A,0x1A,0x63,0xD1,0xDA,0x22,0x15,0x83,0xA6,0xEB,0x51,0x68,0xA8,0x8D,0xC4,0x8D +,0xFC,0x6D,0x68,0x2B,0xDE,0x03,0x54,0xFC,0x03,0x28,0x59,0x88,0xCE,0xE2,0x25,0xE8,0xAE,0x58,0x08,0x54,0xDA,0x03,0x35,0xFE,0xE8,0x6A,0xBE,0x88,0x96,0xBA,0x68,0x74,0x68 +,0xDB,0xA3,0x23,0x03,0xAD,0x8D,0x97,0x80,0xD6,0x34,0x34,0x14,0x04,0xE1,0xB4,0xD3,0x87,0x08,0x0F,0x3E,0x8E,0xFA,0x9A,0xFC,0x9F,0x58,0xEC,0x5F,0x91,0xF3,0x29,0xC1,0xFE +,0x4E,0xAF,0x00,0x19,0xCA,0x6A,0x16,0x9D,0xF9,0xA3,0x45,0x44,0x44,0x44,0x44,0x44,0x34,0xBC,0x98,0x33,0x0B,0x7D,0x7D,0xF4,0x04,0xF1,0xE5,0xCB,0x97,0xA3,0xA3,0xA3,0x43 +,0x85,0x7F,0xB9,0xEE,0x5F,0x1A,0x00,0x72,0x03,0x3C,0x99,0xF5,0x97,0x59,0xF1,0xA0,0xA0,0x38,0x4C,0x98,0xB2,0x19,0x4D,0xCD,0x2D,0x48,0x35,0xE6,0xE2,0x4A,0x56,0x1E,0xB2 +,0xB2,0x73,0x91,0x53,0x79,0x03,0xB9,0x95,0xAD,0xB8,0x5A,0xD1,0x06,0x43,0x71,0x33,0x62,0x2E,0x17,0xE1,0x5C,0x74,0x2A,0x02,0x23,0x12,0xD0,0xDC,0xD2,0xA2,0x96,0xB9,0x67 +,0x65,0xE7,0xE3,0xA5,0x57,0x3E,0xC6,0xF8,0xF1,0x6B,0x7B,0xED,0xB3,0xA7,0xDA,0x6B,0xFF,0x35,0x3B,0xDE,0xF7,0xF9,0x80,0x43,0xF3,0x90,0x13,0x23,0x61,0xFE,0x14,0x50,0x7B +,0x04,0xAD,0x65,0x7B,0xD1,0x51,0xE9,0x88,0xF6,0x8A,0x3D,0xE8,0xAC,0xDA,0x8B,0x2E,0xD3,0x01,0x15,0xF6,0xDB,0x4B,0xB7,0x01,0x75,0xDB,0x81,0xF2,0x1D,0x68,0x2F,0xD9,0x89 +,0xF6,0xAA,0x2D,0x40,0xC5,0x21,0x74,0x6A,0xE3,0x50,0xEB,0x8A,0x8E,0x02,0xED,0x3D,0x2A,0xF7,0x69,0xCF,0xED,0x43,0xCC,0xE9,0xD9,0xF0,0x72,0x9A,0x01,0x43,0xD8,0x01,0x94 +,0x14,0xE5,0xA2,0xB9,0xA9,0xEE,0x1E,0x8B,0x7D,0x2B,0x7A,0x03,0x60,0xA0,0x35,0x98,0x06,0x90,0x34,0x55,0x6C,0x5D,0xCD,0x22,0xCC,0x1F,0x2D,0x22,0x22,0x22,0x22,0x22,0x22 +,0xFA,0x2A,0x99,0x33,0xDA,0xD7,0x59,0x4F,0x08,0x5F,0xBA,0x74,0x69,0xBF,0x0D,0x80,0xF0,0xF0,0x08,0x8C,0x7D,0x75,0x15,0x92,0x0C,0xB9,0x6A,0xA9,0xBF,0x8C,0x6B,0x6A,0x6E +,0x46,0x48,0x44,0x0C,0x2E,0xE7,0x57,0xA1,0xB8,0x1E,0x28,0xA8,0xED,0x82,0xB1,0xAC,0x15,0x51,0x69,0x45,0xA8,0x36,0xD5,0xA8,0x71,0x52,0x12,0x98,0x65,0x25,0xC1,0xF1,0xD3 +,0xA1,0x78,0xE2,0xE9,0xC5,0x58,0xB9,0x32,0xB4,0xD7,0x7E,0x2D,0xAB,0x2D,0x27,0xFC,0xF1,0xC0,0x83,0xFF,0x40,0x5A,0x80,0x16,0xE8,0x6B,0xFC,0xB5,0x90,0xFF,0x19,0x50,0x75 +,0x54,0x7B,0xAC,0x55,0xF5,0x11,0xB4,0xD5,0x78,0x68,0xBF,0xBB,0x7F,0xDE,0x1C,0xA8,0xD4,0x9E,0xAB,0xF4,0xD6,0x1E,0xFB,0xA0,0x5D,0xFB,0x1D,0x95,0xEE,0xE8,0xA8,0x3B,0x86 +,0xEE,0x6A,0xED,0xF5,0x1A,0x77,0xB4,0x65,0xAC,0x43,0xA8,0xFB,0x38,0x9C,0x76,0x9D,0x85,0x8C,0xB4,0x60,0x94,0x94,0x56,0xA2,0xA1,0xBE,0xA5,0xDF,0x7B,0x00,0x0C,0xB6,0xBE +,0x2C,0xE6,0xFF,0x6A,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0xB6,0x93,0x7C,0xA9,0xD7,0xE2,0xC5,0x8B,0x55,0xB0,0xD7,0xEF,0xFA,0x2F,0x37,0x03,0x94,0x6B,0xE1,0x65,0xF6,0xDF +,0xD7,0x37,0x0A,0xB3,0x17,0xB9,0xA0,0xB3,0xAB,0x4B,0x85,0x7A,0xB9,0xE6,0x3F,0x20,0x2C,0x06,0x59,0xE5,0x2D,0x28,0xAC,0x03,0x8A,0xCC,0x95,0x51,0xDE,0x8E,0xAB,0x79,0x85 +,0x38,0xE6,0x1D,0x84,0x33,0x41,0xD1,0xB8,0x9A,0x93,0xA7,0xEE,0xFD,0x20,0xEF,0x27,0xD7,0xBF,0xBF,0x31,0x65,0x3B,0x26,0x4E,0xEC,0x67,0x15,0x80,0xB9,0x6A,0xCA,0xAB,0xEF +,0x0D,0xFC,0x6C,0x25,0x22,0xDC,0xDF,0x00,0x8C,0x9F,0xA2,0x33,0xF3,0x4D,0xB4,0xA6,0xFE,0x16,0x48,0xFC,0x1D,0x60,0x78,0x04,0x48,0xF9,0x2D,0x3A,0x12,0x7F,0xA3,0xFD,0xD4 +,0x7E,0x4F,0x7D,0x04,0xDD,0xC9,0x0F,0x03,0x69,0x0F,0xA3,0x2B,0xF9,0x3F,0x81,0x24,0xED,0xB1,0xF6,0x7C,0x65,0xF0,0x28,0xF8,0xEC,0x9C,0x04,0x9F,0xA3,0xEB,0x90,0x99,0x1D +,0x87,0xF2,0x8A,0xAA,0x7B,0x9B,0x1B,0x5B,0xBE,0x65,0x65,0x7F,0xC3,0x9E,0xF9,0x54,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0xD9,0x4E,0xF2,0xA5,0x5E,0x0B,0x16,0x2C,0xE8,0xB7 +,0x01,0xB0,0xF4,0x23,0x17,0x7C,0xE6,0x17,0xAF,0xC2,0xBF,0x7C,0x55,0xE0,0x49,0xFF,0x70,0x64,0x9B,0x80,0xFC,0x5A,0xA0,0x40,0x0B,0xFE,0x7A,0xA5,0x97,0xB5,0x21,0x36,0xC5 +,0x88,0x6B,0xA5,0xE5,0x08,0x8C,0x4C,0x82,0xE7,0xF9,0x04,0x04,0x84,0x27,0xA8,0xF7,0x93,0x15,0x05,0x5B,0x76,0x9D,0xC0,0x93,0xCF,0x2C,0x54,0xB9,0xB6,0xBF,0xEA,0xEA,0x36 +,0x7D,0x0F,0x8D,0xF8,0x56,0xF2,0xF9,0x4D,0x8B,0xC2,0xDC,0x67,0xA0,0xF5,0xCA,0x0E,0x74,0x5E,0x1D,0x8B,0xCE,0xB4,0x3F,0xA0,0x3D,0xF1,0x11,0xC0,0xF0,0x27,0x20,0xE3,0x09 +,0x2D,0xF4,0x3F,0x0A,0xA4,0xFE,0x41,0xFB,0xFD,0xBF,0xD1,0x9D,0xF2,0x7B,0xF5,0x7B,0xA7,0xF1,0x09,0x64,0xFA,0xFC,0x11,0xE7,0x9D,0x5E,0x43,0x9C,0xCF,0x01,0x94,0xE5,0xA5 +,0xA3,0xB6,0xAE,0xF2,0x07,0xD6,0xF6,0x63,0xAE,0x61,0xCF,0x7C,0xAA,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x6C,0x27,0xF9,0x52,0xAF,0x79,0xF3,0xE6,0xA1,0xBD,0xBD,0x5D,0x85 +,0x75,0xB9,0xF1,0x9F,0xDC,0x0C,0x50,0x1A,0x00,0xF2,0x4D,0x00,0x2F,0x8D,0x5E,0x8E,0xBC,0xC2,0x72,0xF8,0x84,0xC6,0xE1,0x90,0x5F,0x22,0xCE,0x5F,0xAE,0xC5,0xA5,0xE2,0x76 +,0xE4,0xD5,0x00,0x79,0xB5,0x9F,0x37,0x02,0xAE,0x56,0x75,0x22,0x21,0xBD,0xB0,0x67,0xE9,0xBF,0x5E,0x49,0xA9,0xE9,0xC8,0xCE,0xC9,0xC5,0x89,0x33,0xE7,0xE1,0xE1,0x15,0x7C +,0xDB,0x06,0x80,0x65,0x65,0x25,0xF8,0x3E,0x1F,0x76,0x74,0x06,0x1A,0x53,0x0E,0xA0,0xCE,0xF8,0x32,0x70,0x65,0x04,0x3A,0xD3,0x9E,0xD6,0xEA,0x49,0x20,0xFD,0x29,0xB4,0xA7 +,0x3E,0x86,0x8E,0xB4,0xC7,0x81,0x8C,0x11,0xE8,0x32,0x3C,0x03,0x53,0xCA,0x28,0xF8,0x38,0x8D,0x46,0x56,0xBC,0x0F,0x8A,0x73,0xF3,0x51,0x63,0xBA,0xFE,0x3D,0x6B,0xEF,0x6B +,0x51,0xC3,0x9E,0xF9,0x54,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0xD9,0x4E,0xF2,0xA5,0x5E,0x73,0xE6,0xCC,0xE9,0x69,0x00,0xF8,0xF8,0xF8,0xA8,0x95,0x00,0x7A,0x03,0xE0,0x99 +,0x67,0x17,0xA1,0xBC,0xAA,0x16,0x31,0x49,0x46,0x1C,0x38,0x9F,0x81,0xB3,0xC9,0x26,0x84,0x65,0x36,0x22,0xA1,0xB0,0x15,0xE9,0xE5,0x1D,0x48,0x2F,0x6B,0x47,0x72,0xD1,0x0D +,0x5C,0xCE,0xCC,0xB9,0xA9,0x01,0x20,0xDF,0x04,0x70,0xC4,0x2B,0x40,0x7D,0xC5,0x9E,0xCB,0xE9,0x38,0x3C,0xF9,0xD4,0x02,0x95,0x6B,0x07,0x5A,0x09,0xBE,0xBB,0x66,0x5F,0x70 +,0x5F,0x0C,0x34,0x45,0x00,0x39,0x6F,0xA0,0xDD,0x38,0x1A,0xDD,0x57,0x5F,0xD6,0x7E,0xBE,0x04,0x64,0x8F,0x05,0x72,0x5F,0x41,0x73,0xDA,0xF3,0xDA,0xE3,0x57,0x91,0x1B,0x32 +,0x0A,0x41,0x87,0x3F,0x42,0x45,0x41,0x21,0x6A,0x1A,0x9A,0xBE,0x6B,0xED,0xFD,0xFA,0xD4,0xB0,0x67,0x3E,0x55,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0xB6,0x93,0x7C,0xA9,0xD7 +,0xCC,0x99,0x33,0x7B,0x1A,0x00,0x12,0xFA,0xF5,0x15,0x00,0x72,0x03,0xBF,0x67,0x9E,0x59,0x88,0x98,0xCB,0xA5,0x38,0x16,0x10,0x87,0xD3,0xC1,0x71,0x08,0x8A,0x4D,0x87,0x5F +,0xB4,0x11,0xFE,0xA9,0x35,0x08,0xBC,0x52,0x8F,0x60,0xAD,0xCE,0xA5,0xD5,0x22,0x32,0x3E,0xAD,0x57,0xF8,0x97,0xCB,0x05,0x64,0xFB,0x90,0x0B,0x51,0x58,0xB8,0xC1,0x15,0x7B +,0x3F,0x4B,0x1C,0x50,0x03,0xA0,0xB3,0xBB,0xBE,0xE7,0x66,0x7D,0x09,0xFE,0x5B,0xDF,0xCF,0x89,0xD8,0x0D,0x34,0xA6,0xA3,0xBB,0x68,0x26,0x50,0x3C,0x0B,0xB8,0x36,0x1B,0x5D +,0x85,0xEF,0xA0,0x35,0x67,0x0A,0xDA,0xF3,0xEC,0xB4,0xE7,0xDE,0xD1,0x7E,0x7F,0x1B,0xDD,0x19,0xB3,0x70,0xF0,0x9F,0xAF,0xA3,0xBA,0xA0,0xE0,0x3F,0x2C,0xDF,0xEF,0x16,0x35 +,0xEC,0x99,0x4F,0x15,0x11,0x11,0x11,0x11,0x11,0x11,0x91,0xED,0x24,0x5F,0xEA,0x35,0x7D,0xFA,0x74,0xB4,0xB5,0xB5,0xF5,0x5C,0x02,0x20,0xDF,0x06,0x50,0x5B,0x5B,0xAB,0x02 +,0xFC,0x98,0x57,0x56,0xE1,0x4C,0x44,0x16,0x0E,0x04,0xE6,0xC0,0xE1,0x74,0xAA,0xBA,0x57,0x80,0x04,0x7C,0xFF,0x0B,0xF1,0xF0,0x8C,0x29,0xC7,0xD1,0x8B,0x65,0x70,0x0F,0xBF +,0x06,0xE7,0xF3,0xD9,0x38,0xE1,0x17,0x8E,0xBD,0x1E,0x01,0x30,0xD5,0xD6,0xA9,0xAF,0x00,0x94,0x7B,0x09,0x24,0x25,0x27,0x63,0xD6,0x27,0xEE,0xD8,0xE2,0x16,0x31,0xA8,0x4B +,0x00,0xA4,0x02,0x3E,0x9D,0xBF,0xED,0x46,0xA1,0x3F,0xDA,0xEB,0x4F,0xA0,0xBB,0x6C,0x05,0x3A,0x4B,0xB4,0xBA,0xF6,0x31,0xBA,0x4A,0xD6,0xA8,0xEA,0x2E,0xD5,0x1E,0x97,0x2E +,0x47,0x47,0xC9,0x07,0x40,0xC9,0xFB,0xF0,0x75,0x7C,0x03,0xD9,0x71,0x41,0xCF,0x58,0xBE,0x47,0x7B,0x57,0xD3,0xDD,0x96,0xBF,0x5B,0xD4,0xB0,0x67,0x3E,0x55,0x44,0x44,0x44 +,0x44,0x44,0x44,0x44,0xB6,0x93,0x7C,0xA9,0x97,0x9D,0x9D,0x5D,0x4F,0x03,0x40,0xBE,0xFA,0xCF,0xB2,0x01,0x30,0x67,0xEE,0x76,0x6C,0x70,0x0A,0x86,0x67,0x78,0x3E,0x3E,0x0D +,0xB8,0xD4,0x6B,0x96,0x3F,0xF9,0x72,0x26,0x9C,0x7D,0x92,0xE0,0xE0,0x9B,0x8D,0xCD,0xA7,0x33,0xF0,0xF1,0x31,0x03,0x96,0xBA,0x5E,0x42,0x6C,0xD2,0x65,0xF5,0x5E,0x99,0x99 +,0x99,0x58,0xB5,0x79,0x1F,0x96,0x38,0x9C,0xC3,0xFC,0x75,0x5E,0x83,0x6A,0x00,0xB4,0x14,0x25,0xFD,0x36,0xFC,0xF4,0x02,0xA0,0x39,0x1B,0x2D,0x0D,0x8E,0xE8,0xAA,0xD8,0x01 +,0x34,0xB8,0xA2,0x3E,0x6B,0x27,0xE4,0xDE,0x00,0x86,0xC0,0x8F,0x80,0xAA,0x43,0x5A,0xED,0x05,0x6A,0x76,0x02,0xA6,0x75,0xC8,0x8C,0x5C,0x88,0xC0,0xA3,0xEB,0xD1,0x59,0xDF +,0xD4,0xEB,0x2B,0xFF,0x3A,0x3A,0x1A,0xF9,0x2D,0x00,0x44,0x44,0x44,0x44,0x44,0x44,0xF4,0xFF,0x93,0xE4,0x4B,0xBD,0x26,0x4F,0x9E,0xAC,0x1A,0x00,0x32,0xFB,0xDF,0xB7,0x01 +,0xE0,0xE7,0x17,0x8D,0x29,0xB3,0x1D,0x11,0x90,0x50,0x84,0x35,0x87,0xC2,0xD5,0x38,0xCB,0x26,0xC0,0x9E,0x23,0x7E,0x5A,0xF0,0x4F,0xC3,0xF2,0x4F,0x93,0xB1,0x68,0x7F,0x3C +,0x66,0xEF,0x8E,0xC6,0xBE,0x63,0xE7,0x90,0x95,0x95,0x85,0xC4,0xC4,0x44,0xBC,0xBB,0x7C,0x1B,0xB6,0x1D,0x89,0xC4,0xD8,0x09,0x5B,0x6E,0xFB,0x35,0x80,0x52,0x8D,0x80,0x16 +,0xD6,0xEB,0xEE,0x49,0x3A,0xB7,0x1B,0x57,0xA2,0x37,0x6B,0xA1,0x3F,0x13,0x9D,0xCD,0x67,0x80,0x46,0x4F,0x64,0x46,0x7F,0x0C,0x4F,0x87,0xC9,0x48,0x39,0xB7,0x05,0x91,0x27 +,0x57,0xC1,0xDB,0x65,0x1A,0x5A,0x4B,0xDC,0x80,0x9A,0x83,0xE8,0xA8,0x75,0x47,0x6B,0xE5,0x5E,0xB8,0x6C,0x9A,0x80,0xA6,0xB2,0x6B,0x3F,0xB2,0xF6,0xDE,0x7D,0x6A,0xD8,0x33 +,0x9F,0x2A,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0xDB,0x49,0xBE,0xD4,0x6B,0xC2,0x84,0x09,0xEA,0x3B,0xFB,0xAD,0x35,0x00,0x22,0x23,0xA3,0xF0,0xF2,0xAB,0xAB,0x60,0x7F,0xE4 +,0x22,0x1C,0x7D,0xD2,0xB1,0xCD,0xCD,0x07,0xF5,0xF5,0xF5,0x68,0x6A,0x6A,0xC2,0x8D,0x1B,0x37,0xB0,0x64,0x97,0x1F,0xDE,0x77,0x8E,0xC3,0xBB,0x8E,0x17,0x31,0x7D,0x47,0x04 +,0x26,0x6E,0x0A,0xC1,0x6E,0x77,0x6F,0x24,0x24,0x24,0xE0,0xB4,0xF7,0x59,0x2C,0xDF,0xFA,0x29,0x96,0x6C,0xF7,0xC7,0x13,0x4F,0x2F,0xC6,0xCC,0x99,0x3E,0x2A,0xD7,0x0E,0xA4 +,0xC2,0x8E,0xBD,0x67,0xDF,0x91,0xEF,0xAF,0x05,0xFF,0x48,0x74,0x99,0x3C,0x11,0xE8,0xF1,0x0E,0x7C,0x0F,0x2F,0x43,0x61,0x56,0x32,0x2A,0x4A,0xEB,0x7F,0x58,0x5F,0x7D,0xFD +,0xDF,0xD2,0xE3,0xCE,0x8D,0x38,0x6C,0x3F,0x11,0xA5,0x89,0xAB,0x80,0x3A,0x57,0x74,0x97,0x6C,0xC6,0xA9,0x1D,0xA3,0x51,0x9E,0x1E,0xF3,0xA8,0xBC,0xC7,0xE7,0xCD,0x04,0xEB +,0xEF,0xAF,0x95,0xB2,0xD3,0xC1,0x61,0xD0,0x35,0x18,0x9D,0x9D,0x9D,0x48,0x4D,0x4B,0xC3,0x29,0x2F,0x2F,0xEC,0xDE,0xB3,0x47,0x95,0x3C,0x96,0xE7,0xE4,0xB5,0x5B,0x31,0x9F +,0x2A,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0xDB,0x49,0xBE,0xD4,0xEB,0xCD,0x37,0xDF,0x54,0x0D,0x00,0x6B,0x97,0x00,0x98,0x4C,0x26,0x84,0x86,0x26,0xE2,0xD5,0x37,0xD7,0xE1 +,0x48,0xA0,0x11,0xEB,0x8F,0x25,0x21,0x27,0x27,0x07,0x85,0x85,0x85,0xD8,0xEE,0x7C,0x0C,0x76,0xDB,0x42,0x31,0x65,0x6B,0x18,0x26,0x6C,0x0C,0xC1,0xEB,0x6B,0xCE,0x63,0xD4 +,0x4A,0x3F,0xCC,0x5E,0xE3,0x86,0xC0,0xC0,0x40,0x38,0x1D,0x3C,0x8C,0x8D,0x6E,0x61,0xF8,0xDB,0xA8,0x95,0x78,0xE5,0x95,0x0F,0x54,0xA6,0xBD,0x5D,0xB5,0x76,0x37,0xDD,0x8D +,0x7A,0xD3,0xF7,0x2E,0xB8,0x2F,0x01,0x9A,0x63,0x51,0x76,0xD9,0x1D,0x07,0xED,0xC7,0x23,0x39,0xF4,0x14,0x2A,0x73,0xAF,0xA0,0xA6,0xB2,0xE2,0xDF,0x2D,0xC7,0x37,0x16,0xA7 +,0xFD,0x2A,0xC0,0x6D,0xFD,0x07,0xBE,0x07,0x67,0x03,0x55,0x9F,0x22,0xD5,0xF7,0x7D,0x44,0x79,0x6D,0x47,0x57,0x6B,0xBF,0xD7,0xFE,0xEB,0xA5,0x48,0xA0,0x97,0x66,0x46,0x7F +,0x25,0x7F,0x17,0x59,0xF5,0xD0,0xD2,0xD2,0xA2,0x7E,0x1F,0x4C,0x03,0xA0,0xB1,0xB1,0x11,0x1E,0x47,0x8F,0x22,0x28,0x38,0x58,0xFD,0xCD,0xE4,0xBE,0x08,0x52,0xF2,0x58,0x9E +,0x93,0xD7,0x64,0x4C,0x7F,0xCC,0xA7,0x8A,0x88,0x88,0x88,0x88,0x88,0x88,0xC8,0x76,0x92,0x2F,0xF5,0x7A,0xED,0xB5,0xD7,0x6E,0xD9,0x00,0x90,0x6F,0x06,0x58,0xB3,0xD6,0x15 +,0x6F,0xDA,0x6D,0x87,0x9B,0xBF,0x01,0x57,0xD2,0x8D,0x08,0x8F,0x88,0xC2,0xAB,0x1F,0x79,0xE0,0xE5,0x8F,0x03,0x30,0x66,0x95,0x3F,0x5E,0x5C,0xE1,0x83,0x11,0x4B,0xBD,0xF1 +,0xEC,0x42,0x4F,0xBC,0xBA,0xD4,0x1D,0x1E,0x9E,0xA7,0xB0,0x6D,0xBF,0x0F,0xC6,0xFC,0x7D,0x1D,0x7E,0xFF,0xE8,0x64,0x95,0x67,0x07,0x5A,0x15,0x86,0xC8,0x3F,0x5F,0xF2,0x9E +,0x8B,0xA8,0xD3,0xF3,0x70,0xC2,0x65,0x19,0x0A,0x92,0x2F,0xA1,0xE2,0x5A,0xD5,0x8F,0x1A,0xEA,0x5B,0x7A,0x5D,0xDB,0x6F,0x59,0x79,0xF1,0x7E,0x7F,0x73,0xDD,0x30,0x09,0x55 +,0x69,0x8E,0xF0,0xDC,0x35,0x0D,0x37,0x4C,0xD9,0x3F,0xB5,0x36,0xCE,0xA2,0x14,0xBD,0x01,0xE0,0xED,0x17,0x74,0x53,0x25,0x24,0xA5,0xC1,0xED,0x78,0x04,0x96,0x6F,0xF2,0x42 +,0x6E,0x41,0x09,0x9A,0x9B,0x9B,0x07,0xDC,0x00,0x90,0xD9,0xFD,0x23,0x1E,0x1E,0x88,0x8E,0x8E,0x46,0x4D,0x4D,0x2D,0x82,0xC3,0x63,0xB0,0xD1,0xD1,0x5D,0x55,0x68,0x64,0x0C +,0x6A,0xB4,0xBF,0xAF,0xBC,0x26,0x63,0xFA,0x5B,0x09,0x60,0x3E,0x55,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0xB6,0x93,0x7C,0xA9,0xD7,0xB8,0x71,0xE3,0xD4,0x72,0x7E,0x99,0xE5 +,0x96,0x92,0x59,0x69,0x69,0x08,0xC8,0x73,0x52,0xF2,0xBB,0xDC,0xD0,0xEF,0xC3,0x8F,0x76,0x63,0xEC,0xEB,0x1F,0xC3,0xC9,0xDD,0x17,0x87,0xBC,0xA3,0xB0,0xE2,0x60,0x34,0xEC +,0x36,0x9F,0xC7,0x1B,0xAB,0xCF,0x62,0xDC,0x4A,0x2F,0x4C,0xFE,0xF8,0x33,0x2C,0xDE,0xE1,0x8B,0x2D,0x9F,0x86,0xE3,0x23,0x7B,0x3F,0x8C,0x1C,0xBB,0x0A,0x7F,0x79,0xE2,0xEF +,0x2A,0xCB,0x0E,0xA6,0xC2,0x4F,0x6F,0x5C,0xEC,0xB1,0xFD,0x35,0x24,0x06,0xEF,0x47,0xF1,0xD5,0xCB,0x68,0xAE,0x6B,0xB8,0xC7,0xDA,0xB8,0xBE,0xD5,0x54,0x62,0x7C,0xE8,0xCC +,0xC1,0x95,0xD8,0xF5,0xC9,0xDF,0x51,0x5D,0x98,0xF8,0x3B,0x6B,0x63,0x2C,0x4A,0xB1,0x6C,0x00,0x5C,0x4A,0x35,0xF6,0x54,0x52,0x5A,0x86,0x16,0xD2,0x1B,0x30,0x71,0x9E,0x1B +,0x5E,0x78,0x6B,0x0F,0x82,0xC2,0xD3,0xD4,0xDF,0x66,0xA0,0x0D,0x00,0x59,0xE2,0x2F,0xB3,0xFC,0x95,0x55,0xD5,0xD8,0xEA,0x7C,0x04,0xBF,0x19,0x39,0x1D,0xA3,0x66,0xAE,0xC0 +,0xE3,0xE3,0xE6,0xE0,0xA1,0xE7,0x26,0x61,0xE7,0x81,0xA3,0xA8,0x36,0x99,0xD4,0x18,0x19,0x6B,0x8D,0xF9,0x54,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0xD9,0x4E,0xF2,0xA5,0x5E +,0xE3,0xC7,0x8F,0x87,0xDC,0x07,0xE0,0x56,0xF5,0xFA,0xEB,0xAF,0x63,0xE4,0xC8,0x91,0x78,0xF6,0xD9,0x57,0xF0,0xC4,0xD3,0xEF,0xE1,0xF5,0xB7,0x36,0xE3,0xFD,0xB5,0x5E,0x58 +,0xB7,0x3F,0x04,0xF6,0x47,0x2F,0x62,0xDB,0x91,0x68,0xAC,0xDE,0x7B,0x1E,0xEF,0xAE,0x3E,0x81,0x97,0x27,0x6C,0xC0,0x13,0x4F,0xCD,0xC5,0xF8,0xF1,0x33,0x55,0x8E,0x1D,0x6C +,0x05,0x9D,0x76,0x7E,0xBB,0x26,0x27,0xF9,0xE1,0xDA,0xB2,0x12,0xD4,0x5E,0x6F,0x44,0x73,0x47,0xDD,0x3D,0x1D,0xB0,0x7A,0x27,0xFF,0x9B,0xAB,0xE9,0xFA,0xB7,0x0D,0xB1,0xFE +,0xFF,0x73,0x39,0x29,0xF4,0x49,0xAB,0xAF,0xFF,0x5F,0x29,0xD6,0x1A,0x00,0xC9,0x86,0x0C,0x14,0x16,0x97,0xE1,0x4C,0x60,0x2A,0x5E,0xD4,0xC2,0xFF,0xEC,0xE5,0xC7,0x50,0x5E +,0x5E,0x31,0xA8,0x4B,0x00,0x4E,0x9E,0x3C,0x89,0xDC,0xDC,0x5C,0x04,0x5D,0xB8,0x88,0x5F,0xBE,0x60,0x87,0xDD,0xBE,0xB1,0x88,0xAB,0xEE,0xC2,0x7B,0x51,0xE9,0xF8,0xF1,0x73 +,0x53,0xF1,0xE0,0x88,0x89,0x48,0x48,0x4A,0x56,0x63,0x64,0xAC,0x35,0xE6,0x53,0x45,0x44,0x44,0x44,0x44,0x44,0x44,0x64,0x3B,0xC9,0x97,0x43,0xA9,0xB5,0x6B,0x1D,0xF0,0x5F +,0x7F,0x98,0x8C,0xC7,0xFE,0xF2,0x1E,0x9E,0x7C,0x6A,0xBE,0x2A,0x79,0xFC,0xC8,0xEF,0x27,0x62,0xCD,0x9A,0x1D,0xDA,0x10,0xEB,0xDB,0x0D,0xA6,0x5A,0x3A,0x9A,0xEE,0xBE,0xDE +,0xD5,0xF6,0x6D,0x6B,0xAF,0xDD,0xAE,0x9A,0x9B,0xEA,0x6E,0xB7,0x6A,0x40,0xB1,0x6C,0x00,0x18,0xAF,0xE6,0xA1,0xA0,0xB8,0x14,0xC6,0xAC,0x5C,0x5C,0x6F,0x6C,0xC2,0xDB,0x4B +,0x0E,0x63,0xE4,0xD4,0xBD,0x08,0x8D,0xCE,0x40,0x8E,0x16,0xD4,0x07,0xD3,0x00,0x90,0x9B,0xFD,0xC9,0xF5,0xFE,0xAB,0x77,0xB8,0xE0,0xD1,0xB1,0xD3,0xB0,0xCB,0x58,0x0A,0xBB +,0x94,0x3C,0x3C,0x7C,0xC4,0x80,0x9F,0x6C,0x8B,0xC3,0xFD,0x7F,0x1A,0x05,0x07,0x57,0x4F,0x35,0x46,0xC6,0x5A,0x63,0x3E,0x55,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0xB6,0x93 +,0x7C,0x39,0xD4,0x3A,0x73,0xE6,0x0C,0x96,0x2C,0x59,0xD2,0xAB,0xE4,0xB9,0xBE,0xE3,0x06,0x5B,0x9D,0xED,0xA5,0x3F,0xB4,0xF6,0xFC,0x1D,0x2E,0x45,0x6F,0x00,0xC4,0x24,0x24 +,0x23,0x21,0x35,0x0F,0x1E,0xDE,0xF1,0xEA,0xFA,0xFC,0xE0,0x48,0x23,0x46,0xBF,0xED,0x84,0x59,0xCB,0x8E,0xA9,0xCB,0x21,0x8C,0xC6,0x0C,0x9B,0x1A,0x00,0xEB,0x76,0xB9,0x6A +,0x61,0x7F,0x24,0x7E,0xE1,0x10,0x8B,0x87,0xDC,0x0C,0xB8,0xDF,0xC5,0x80,0x7B,0x37,0xC4,0xAA,0x06,0x80,0xB3,0xC7,0x67,0xA8,0xAB,0xAB,0x83,0xE3,0xDE,0xBD,0xE6,0xAD,0x7A +,0x33,0x9F,0x2A,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0xDB,0x49,0xBE,0x1C,0x5E,0x65,0x79,0x77,0xFF,0x01,0x2E,0xF7,0xB7,0x52,0xDD,0xDA,0xB6,0x9D,0xB8,0xED,0x37,0x00,0x48 +,0x29,0x7A,0x03,0x20,0xBF,0xB0,0x08,0x0B,0x3F,0x39,0xA5,0x66,0xFC,0x53,0xD3,0x8B,0xF1,0xEE,0x8A,0xE3,0x18,0x3B,0xDD,0x19,0xE7,0xC3,0x8D,0xEA,0xDA,0xFF,0xDC,0xBC,0xFC +,0x41,0x35,0x00,0x8E,0x9F,0x38,0x81,0xBC,0xBC,0x3C,0x44,0xC4,0x24,0xA8,0xE5,0xFE,0xF7,0x8D,0xB0,0xC3,0x7D,0xEB,0xE3,0xF0,0xFD,0x75,0x71,0xF8,0xC1,0xB3,0x76,0xF8,0xF9 +,0x88,0x49,0xB8,0x9A,0x9B,0xAF,0xC6,0xC8,0x58,0x6B,0xCC,0xA7,0x8A,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x6C,0x65,0xCE,0xD8,0x3D,0x0D,0x80,0xE4,0x54,0x03,0xF2,0x8B,0x2A +,0x31,0xCA,0x6E,0x1F,0x46,0x4F,0x73,0x52,0xE1,0x7F,0xC6,0xD2,0xA3,0x68,0x6D,0x6B,0x57,0xAF,0x17,0x15,0x17,0x0F,0xAA,0x01,0x90,0x92,0x92,0x82,0xE0,0x90,0x10,0x98,0x4C +,0x35,0xD8,0xEF,0xE1,0x85,0x9F,0xFD,0x75,0x22,0xEE,0x7F,0x6C,0x0C,0x1E,0xF8,0xF3,0x18,0x3C,0xA8,0x3D,0xF6,0x0E,0x0C,0x57,0x2B,0x04,0x64,0x8C,0x8C,0xB5,0xC6,0x7C,0xA8 +,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x64,0x2B,0x73,0xC6,0xEE,0x69,0x00,0xC4,0xC6,0x27,0xA2,0xCA,0x54,0x8F,0xED,0xFB,0x43,0x30,0x66,0x9A,0x33,0x5E,0x9E,0xE1,0x82,0xB3 +,0x41,0x06,0xB4,0xB5,0xB5,0xA9,0x15,0x00,0xF2,0x15,0x89,0x83,0x69,0x00,0x58,0x7E,0x0D,0x60,0x7D,0x7D,0x03,0x0C,0xC6,0x4C,0x78,0x9E,0x0D,0xC2,0x49,0xFF,0x50,0xE4,0x16 +,0x14,0xAB,0x6F,0x56,0xE0,0xD7,0x00,0x12,0x11,0x11,0x11,0x11,0x11,0x11,0x7D,0xC1,0xCC,0x19,0xBB,0xA7,0x01,0x90,0x78,0x29,0x09,0xD9,0xD9,0x39,0x28,0x28,0xAE,0x84,0xFD +,0xFE,0x60,0xEC,0x72,0x0B,0xC3,0xF5,0xC6,0x16,0x98,0x6A,0x6A,0x50,0x5D,0x6D,0x42,0x65,0x65,0xD5,0xA0,0x1A,0x00,0x42,0x42,0xBE,0x04,0x7C,0x99,0xE5,0xCF,0xC9,0xC9,0x51 +,0xDB,0x4B,0xC9,0x9D,0xFF,0xE5,0x39,0x79,0x4D,0xC6,0xF4,0xC7,0x7C,0xA8,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x64,0x2B,0x73,0xC6,0xEE,0x69,0x00,0xE8,0xD5,0xDC,0xDC,0xAC +,0x66,0xFD,0xE5,0xC6,0x7F,0xF2,0xD8,0xF2,0x35,0xA9,0xC1,0x34,0x00,0x84,0xCC,0xEE,0xCB,0x12,0xFF,0x53,0x5E,0x5E,0x6A,0x5B,0x29,0xF9,0xDA,0x3F,0x79,0xAE,0xBF,0x99,0x7F +,0x9D,0xF9,0x50,0x89,0x88,0x88,0x88,0x88,0x88,0x88,0xC8,0x56,0xE6,0x8C,0xDD,0x13,0xCA,0x07,0x53,0x5F,0x16,0xF3,0xA1,0x12,0x11,0x11,0x11,0x11,0x11,0x11,0x91,0xAD,0xCC +,0x19,0x7B,0x58,0x33,0x1F,0x2A,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0xD9,0xCA,0x9C,0xB1,0x87,0x35,0xF3,0xA1,0x12,0x11,0x11,0x11,0x11,0x11,0x11,0x91,0xAD,0xCC,0x19,0x7B +,0x58,0x33,0x1F,0x2A,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0xD9,0xCA,0x9C,0xB1,0x87,0x35,0xF3,0xA1,0x12,0x11,0x11,0x11,0x11,0x11,0x11,0x91,0xAD,0xCC,0x19,0x7B,0x58,0x33 +,0x1F,0x2A,0x11,0x11,0x11,0x11,0x11,0xD1,0x57,0xE4,0xAE,0xBB,0xFE,0x17,0xF6,0xCE,0x1C,0xA4,0x51,0x4A,0x79,0x7F,0x00,0x00,0x00,0x00,0x49,0x45,0x4E,0x44,0xAE,0x42,0x60 +,0x82 } ; } diff --git a/src/x_resource_projects/TestAtlas1/x_TestAtlas1_Atlas_AUTOGEN_BINDERS.cs b/src/x_resource_projects/TestAtlas1/x_TestAtlas1_Atlas_AUTOGEN_BINDERS.cs index a2bf71717..edac80ed9 100644 --- a/src/x_resource_projects/TestAtlas1/x_TestAtlas1_Atlas_AUTOGEN_BINDERS.cs +++ b/src/x_resource_projects/TestAtlas1/x_TestAtlas1_Atlas_AUTOGEN_BINDERS.cs @@ -1,4 +1,4 @@ -//AUTOGEN, 2020-04-20T21:27:56 +//AUTOGEN, 2020-11-26T21:57:10 //source: D:\projects\PixelFarm\src\x_resource_projects\TestAtlas1\TestAtlas1.csproj //tools: D:\projects\PixelFarm\src\Tools\PaintLabResTool\bin\Debug\PaintLabResTool.exe using PixelFarm.Drawing;