]> O.S.I.I.S - jp/vkvg.git/commitdiff
add include guard to vkvg_nsvg.h
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Mon, 31 Aug 2020 13:44:16 +0000 (15:44 +0200)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Mon, 31 Aug 2020 13:44:16 +0000 (15:44 +0200)
include/vkvg-nsvg.h

index ad419c38b3b34a1866b029bb2844086e28ef2eaf..b4abdf37db6bcf53351a7408ef45f581c32c2c9a 100644 (file)
  * 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
@@ -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