From bd59776488898e5a183798804caae1e7ecaddc0c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Philippe=20Bruy=C3=A8re?= Date: Sat, 4 May 2019 21:41:32 +0200 Subject: [PATCH] wip --- .gitignore | 20 +---- Crow/Default.style | 4 +- .../GraphicObjects/SaturationValueSelector.cs | 2 +- Crow/src/vkvg/Context.cs | 10 +-- Crow/src/vkvg/Enums.cs | 2 +- Crow/src/vkvg/NativeMethods.cs | 4 +- Crow/src/vkvg/Pattern.cs | 6 +- Samples/HelloWorld/HelloWorld.csproj | 82 ++++++------------- Samples/HelloWorld/main.cs | 6 +- Samples/HelloWorld/packages.config | 9 -- 10 files changed, 40 insertions(+), 105 deletions(-) delete mode 100644 Samples/HelloWorld/packages.config diff --git a/.gitignore b/.gitignore index e3dbba2d..fcf4a26d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,27 +2,11 @@ build Win_x86 Crow.userprefs -Debug packages *.nupkg *.user .vs/ /GOLib.suo /tmp -/bin/* -/obj/* -/GOLib.userprefs -/Tests/obj/* -CrowIDE/obj -Crow/obj -/Tests/bin/* -/UnitTest/obj -/UnitTest/bin -MonoDevelop.GOLib/bin/ -MonoDevelop.GOLib/build/ -MonoDevelop.GOLib/obj/ -Tests/Tests.sln -Tests/Tests.userprefs -src/GraphicObjects/Panel.cs -src/GraphicObjects/VerticalWrappingWidget.cs -src/GraphicObjects/HorizontalWrappingWidget.cs +bin +obj diff --git a/Crow/Default.style b/Crow/Default.style index b924b219..309c99ae 100644 --- a/Crow/Default.style +++ b/Crow/Default.style @@ -57,8 +57,8 @@ MenuItem { //Background = "vgradient|0:DimGrey|1:Black"; //Background = "Transparent"; Foreground = "LightGrey"; - //MouseEnter = "{Background=SteelBlue;}"; - //MouseLeave = "{Background=Transparent;}"; + MouseEnter = "{Background=SteelBlue;}"; + MouseLeave = "{Background=Transparent;}"; //MouseEnter = "{Background = vgradient|0:SteelBlue|1:Jet;Foreground=White;}"; //MouseLeave = "{Foreground=LightGrey;Background=Transparent;}"; SelectionBackground = "Transparent"; diff --git a/Crow/src/GraphicObjects/SaturationValueSelector.cs b/Crow/src/GraphicObjects/SaturationValueSelector.cs index 68c497b3..88eaff09 100644 --- a/Crow/src/GraphicObjects/SaturationValueSelector.cs +++ b/Crow/src/GraphicObjects/SaturationValueSelector.cs @@ -106,7 +106,7 @@ namespace Crow ctx.Arc (mousePos.X, mousePos.Y, 3.5, 0, Math.PI * 2.0); ctx.LineWidth = 0.5; ctx.Stroke (); - ctx.Translate (-0.5, -0.5); + ctx.Translate (-1.0, -1.0); ctx.Arc (mousePos.X, mousePos.Y, 3.5, 0, Math.PI * 2.0); ctx.SetSourceColor (Color.White); ctx.Stroke (); diff --git a/Crow/src/vkvg/Context.cs b/Crow/src/vkvg/Context.cs index 9566caff..6b71b3a2 100644 --- a/Crow/src/vkvg/Context.cs +++ b/Crow/src/vkvg/Context.cs @@ -4,7 +4,7 @@ // Author: // Jean-Philippe Bruyère // -// Copyright (c) 2018 jp +// Copyright (c) 2018-2019 jp // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -25,10 +25,8 @@ // THE SOFTWARE. using System; using System.Text; -using Crow; -namespace vkvg -{ +namespace vkvg { public class Context: IDisposable { @@ -179,10 +177,6 @@ namespace vkvg public void ClosePath () { NativeMethods.vkvg_close_path (handle); } - -// public void Rectangle (float x, float y, float width, float height){ -// NativeMethods.vkvg_rectangle (); -// } public void MoveTo (PointD p){ NativeMethods.vkvg_move_to (handle, (float)p.X, (float)p.Y); } diff --git a/Crow/src/vkvg/Enums.cs b/Crow/src/vkvg/Enums.cs index f6fedd54..a72b0784 100644 --- a/Crow/src/vkvg/Enums.cs +++ b/Crow/src/vkvg/Enums.cs @@ -4,7 +4,7 @@ // Author: // Jean-Philippe Bruyère // -// Copyright (c) 2013-2017 Jean-Philippe Bruyère +// Copyright (c) 2013-2019 Jean-Philippe Bruyère // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Crow/src/vkvg/NativeMethods.cs b/Crow/src/vkvg/NativeMethods.cs index 4f137ccd..7039a9af 100644 --- a/Crow/src/vkvg/NativeMethods.cs +++ b/Crow/src/vkvg/NativeMethods.cs @@ -4,7 +4,7 @@ // Author: // Jean-Philippe Bruyère // -// Copyright (c) 2018 jp +// Copyright (c) 2018-2019 Jean-Philippe Bruyère // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -197,7 +197,7 @@ namespace vkvg internal static extern void vkvg_pattern_destroy (IntPtr pat); [DllImport (libvkvg, CallingConvention=CallingConvention.Cdecl)] - internal static extern void vkvg_patter_add_color_stop (IntPtr pat, float offset, float r, float g, float b, float a); + internal static extern void vkvg_pattern_add_color_stop (IntPtr pat, float offset, float r, float g, float b, float a); [DllImport (libvkvg, CallingConvention=CallingConvention.Cdecl)] internal static extern void vkvg_pattern_set_extend (IntPtr pat, Extend extend); [DllImport (libvkvg, CallingConvention=CallingConvention.Cdecl)] diff --git a/Crow/src/vkvg/Pattern.cs b/Crow/src/vkvg/Pattern.cs index 096a7e5a..7ca3df2f 100644 --- a/Crow/src/vkvg/Pattern.cs +++ b/Crow/src/vkvg/Pattern.cs @@ -4,7 +4,7 @@ // Author: // Jean-Philippe Bruyère // -// Copyright (c) 2019 jp +// Copyright (c) 2019 Jean-Philippe Bruyère // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -76,10 +76,10 @@ namespace vkvg { } public void AddColorStop (float offset, float r, float g, float b, float a = 1f) { - NativeMethods.vkvg_patter_add_color_stop (handle, offset, r, g, b, a); + NativeMethods.vkvg_pattern_add_color_stop (handle, offset, r, g, b, a); } public void AddColorStop (float offset, Crow.Color c) { - NativeMethods.vkvg_patter_add_color_stop (Handle, offset, (float)c.R, (float)c.G, (float)c.B, (float)c.A); + NativeMethods.vkvg_pattern_add_color_stop (Handle, offset, (float)c.R, (float)c.G, (float)c.B, (float)c.A); } #region IDisposable implementation diff --git a/Samples/HelloWorld/HelloWorld.csproj b/Samples/HelloWorld/HelloWorld.csproj index a56481e6..64976e45 100644 --- a/Samples/HelloWorld/HelloWorld.csproj +++ b/Samples/HelloWorld/HelloWorld.csproj @@ -1,63 +1,33 @@ - - + + - Exe - v4.7.1 - $(SolutionDir)build\$(Configuration)\samples\ - 8.0.30703 - 2.0 - {1F18E74F-BCC9-481C-8888-89D81CBB30BE} + net471;netstandard2.0 + $(SolutionDir)build\$(Configuration)\ + Exe + https://github.com/jpbruyere/Crow + https://opensource.org/licenses/MIT + true + false 0.8.0 - - true - full - false - DEBUG - prompt - 4 - - - true - 4 - - - + + + + + + + + + + + + data\%(RecursiveDir)%(Filename)%(Extension) + HelloWorld.%(Filename)%(Extension) - - - - - - ..\..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll - - - ..\..\packages\glTF2Loader.1.1.3-alpha\lib\net35\glTFLoader.dll - - - ..\..\packages\System.Numerics.Vectors.4.6.0-preview4.19212.13\lib\net46\System.Numerics.Vectors.dll - - - - - ..\..\packages\System.Runtime.CompilerServices.Unsafe.4.6.0-preview4.19212.13\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll - - - ..\..\packages\Vulkan.0.1.2.6\lib\netstandard2.0\VK.dll - - - ..\..\packages\CVKL.0.1.2\lib\netstandard2.0\CVKL-dotnet.dll - - - - - {C2980F9B-4798-4C05-99E2-E174810F7C7B} - Crow - - + + - + - - + \ No newline at end of file diff --git a/Samples/HelloWorld/main.cs b/Samples/HelloWorld/main.cs index 633ab13c..32552200 100644 --- a/Samples/HelloWorld/main.cs +++ b/Samples/HelloWorld/main.cs @@ -1,8 +1,4 @@ -using System; -using System.Threading; -using Crow; -using CVKL; -using VK; +using Crow; namespace HelloWorld { diff --git a/Samples/HelloWorld/packages.config b/Samples/HelloWorld/packages.config deleted file mode 100644 index fba81ebc..00000000 --- a/Samples/HelloWorld/packages.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file -- 2.47.3