* THE SOFTWARE.
*/
#include "vkvg.h"
+
+#ifndef VKVG_NSVG_H
+#define VKVG_NSVG_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*! @defgroup nsvg Nano SVG
* @brief Render SVG drawings
- *
+ *
* [NanoSVG](https://github.com/memononen/nanosvg) does not suit production needs, but is implemented
- * in vkvg for quickly presenting some outputs with the library.
+ * in vkvg for quickly presenting some outputs with the library.
*
* First load svg file with #nsvg_load_file() then render it with vkvg by calling #vkvg_render_svg().
* The #NSVGimage pointer has to be destroyed by calling #nsvg_destroy()
/**
* @brief nanosvg image structure
- *
+ *
*/
typedef struct NSVGimage NSVGimage;
/**
* @brief load svg file
- *
+ *
* Load basic svg file and store datas in a #NSVGimage structure.
* @param dev VkvgDevice to use for loading the svg file, needed for dpy.
* @param filePath the path of the svg file to load
vkvg_public
NSVGimage* nsvg_load_file (VkvgDevice dev, const char* filePath);
/**
- * @brief
- *
- * @param dev
- * @param fragment
- * @return NSVGimage*
+ * @brief
+ *
+ * @param dev
+ * @param fragment
+ * @return NSVGimage*
*/
vkvg_public
NSVGimage* nsvg_load (VkvgDevice dev, char* fragment);
/**
- * @brief
- *
- * @param svg
+ * @brief
+ *
+ * @param svg
*/
vkvg_public
void nsvg_destroy (NSVGimage* svg);
/**
- * @brief
- *
- * @param svg
- * @param width
- * @param height
+ * @brief
+ *
+ * @param svg
+ * @param width
+ * @param height
*/
vkvg_public
void nsvg_get_size (NSVGimage* svg, int* width, int* height);
/**
* @brief render #NSVGimage with vkvg context
- *
+ *
* Render a svg drawing loaded with #nsvg_load_file() or #nsvg_load() using
* a valid #VkvgContext. Svg rendering is guarded with a save/restore so that the supplied context
* is not affected by the rendering and will be restored to it's previous state.
- *
+ *
* @param ctx the #VkvgContext to use for rendering.
* @param svg the #NSVGimage to render
* @param subId Render only a subpart of the svg identified by a named svg group or NULL for
vkvg_public
void vkvg_render_svg (VkvgContext ctx, NSVGimage* svg, char* subId);
/** @}*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif