VKVG  
Vulkan Vector Graphics
Loading...
Searching...
No Matches
vkvg-svg.h
Go to the documentation of this file.
1// Copyright (c) 2018-2026 Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
2//
3// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
4
5#ifndef VKVG_SVG_H
6#define VKVG_SVG_H
7
8#include "vkvg.h"
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14typedef struct _svg_placeholder* VkvgSvg;
15
26vkvg_public VkvgSurface vkvg_surface_create_from_svg(VkvgDevice dev, uint32_t width, uint32_t height,
27 const char* svgFilePath);
38vkvg_public VkvgSurface vkvg_surface_create_from_svg_fragment(VkvgDevice dev, uint32_t width, uint32_t height,
39 char* svgFragment);
48vkvg_public void vkvg_svg_get_dimensions(VkvgSvg svg, uint32_t* width, uint32_t* height);
49
57vkvg_public VkvgSvg vkvg_svg_load(const char* svgFilePath);
58
64vkvg_public VkvgSvg vkvg_svg_load_fragment(char* svgFragment);
65
72vkvg_public void vkvg_svg_render(VkvgSvg svg, VkvgContext ctx, const char* id);
73
78vkvg_public void vkvg_svg_destroy(VkvgSvg svg);
79
80#ifdef __cplusplus
81}
82#endif
83#endif
struct _vkvg_context_t * VkvgContext
The Vkvg drawing Context.
Definition vkvg.h:306
struct _vkvg_device_t * VkvgDevice
Opaque pointer on a Vkvg device structure.
Definition vkvg.h:325
struct _vkvg_surface_t * VkvgSurface
Opaque pointer on a Vkvg Surface structure.
Definition vkvg.h:318
void vkvg_svg_destroy(VkvgSvg svg)
release VkvgSvg pointer resources.
struct _svg_placeholder * VkvgSvg
Definition vkvg-svg.h:14
VkvgSvg vkvg_svg_load(const char *svgFilePath)
Load svg file in memory.
VkvgSvg vkvg_svg_load_fragment(char *svgFragment)
Load svg from an svg source fragment.
void vkvg_svg_get_dimensions(VkvgSvg svg, uint32_t *width, uint32_t *height)
get svg dimensions.
VkvgSurface vkvg_surface_create_from_svg_fragment(VkvgDevice dev, uint32_t width, uint32_t height, char *svgFragment)
create surface from svg fragment
void vkvg_svg_render(VkvgSvg svg, VkvgContext ctx, const char *id)
render svg on a context.
VkvgSurface vkvg_surface_create_from_svg(VkvgDevice dev, uint32_t width, uint32_t height, const char *svgFilePath)
load svg file into Surface
Main header of the VKVG library.