diff options
Diffstat (limited to 'Backends/VkvgBackend/src/SvgHandle.cs')
| -rw-r--r-- | Backends/VkvgBackend/src/SvgHandle.cs | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/Backends/VkvgBackend/src/SvgHandle.cs b/Backends/VkvgBackend/src/SvgHandle.cs deleted file mode 100644 index 0a6f3007..00000000 --- a/Backends/VkvgBackend/src/SvgHandle.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2021 Jean-Philippe Bruyère <jp_bruyere@hotmail.com> -// -// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT) - -using System; -using Drawing2D; - -namespace Crow.VkvgBackend -{ - public sealed class SvgHandle : ISvgHandle { - - internal IntPtr handle; - - #region CTOR - public SvgHandle (Device dev, Span<byte> bytes) - { - /*int size = svgFragment.Length * 4 + 1; - Span<byte> bytes = size > 512 ? new byte[size] : stackalloc byte[size]; - int encodedBytes = Crow.Text.Encoding.ToUtf8 (svgFragment, bytes); - bytes[encodedBytes] = 0;*/ - handle = NativeMethods.nsvg_load (dev.Handle, ref bytes.GetPinnableReference()); - } - public SvgHandle (Device dev, string file_name) - { - handle = NativeMethods.nsvg_load_file (dev.Handle, file_name); - } - #endregion - - public void Render(IContext cr) {} - //NativeMethods.vkvg_render_svg((cr as Context).handle, handle, null); - public void Render (IContext cr, string id) {} - //NativeMethods.vkvg_render_svg((cr as Context).handle, handle, id); - public Size Dimensions { - get { - NativeMethods.nsvg_get_size (handle, out int w, out int h); - return new Size (w, h); - } - } - public void Dispose() { - NativeMethods.nsvg_destroy (handle); - } - - } -} |