From: Jean-Philippe Bruyère Date: Thu, 2 May 2019 00:39:29 +0000 (+0200) Subject: update nsvg iface with subPath parameter, but nsvg doesn't handle g elements X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=152bc103da8a40d737ecf4e9a824ab5d5dde97cb;p=jp%2Fcrow.git update nsvg iface with subPath parameter, but nsvg doesn't handle g elements --- diff --git a/Crow/src/vkvg/Context.cs b/Crow/src/vkvg/Context.cs index b3cea152..9566caff 100644 --- a/Crow/src/vkvg/Context.cs +++ b/Crow/src/vkvg/Context.cs @@ -248,8 +248,8 @@ namespace vkvg public void SetSourceSurface (Surface surf, float x = 0f, float y = 0f) { NativeMethods.vkvg_set_source_surface (handle, surf.Handle, x, y); } - public void RenderSvg (IntPtr nsvgImage) { - NativeMethods.vkvg_render_svg (handle, nsvgImage); + public void RenderSvg (IntPtr nsvgImage, string subId = null) { + NativeMethods.vkvg_render_svg (handle, nsvgImage, subId); } internal static byte[] TerminateUtf8(string s) { diff --git a/Crow/src/vkvg/NativeMethods.cs b/Crow/src/vkvg/NativeMethods.cs index dd1757e9..4f137ccd 100644 --- a/Crow/src/vkvg/NativeMethods.cs +++ b/Crow/src/vkvg/NativeMethods.cs @@ -280,7 +280,7 @@ namespace vkvg [DllImport (libvkvg, CallingConvention = CallingConvention.Cdecl)] internal static extern void nsvg_get_size (IntPtr nsvgImage, out int width, out int height); [DllImport (libvkvg, CallingConvention = CallingConvention.Cdecl)] - internal static extern void vkvg_render_svg (IntPtr ctx, IntPtr nsvgImage); + internal static extern void vkvg_render_svg (IntPtr ctx, IntPtr nsvgImage, string subId); #endregion } }