From: Jean-Philippe Bruyère Date: Mon, 31 Aug 2020 13:44:16 +0000 (+0200) Subject: add include guard to vkvg_nsvg.h X-Git-Tag: v0.2.0~90 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=a07ebb11798ceff81d70068c40a53eb16c690ef5;p=jp%2Fvkvg.git add include guard to vkvg_nsvg.h --- diff --git a/include/vkvg-nsvg.h b/include/vkvg-nsvg.h index ad419c3..b4abdf3 100644 --- a/include/vkvg-nsvg.h +++ b/include/vkvg-nsvg.h @@ -20,11 +20,19 @@ * 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() @@ -32,12 +40,12 @@ /** * @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 @@ -46,37 +54,37 @@ typedef struct NSVGimage NSVGimage; 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 @@ -85,3 +93,9 @@ void nsvg_get_size (NSVGimage* svg, int* width, int* height); vkvg_public void vkvg_render_svg (VkvgContext ctx, NSVGimage* svg, char* subId); /** @}*/ + +#ifdef __cplusplus +} +#endif + +#endif