svgconv: SVG to OpenVG path converter


svgconv is a command line tool used to convert path data from SVG files into something that can be easily rendered using OpenVG. The output of the tool can be directly included into a C application and its format is well suited for rendering with OpenVG.

Converting and using converted content

Here are is a very high-level procedure for using converted SVG files:

  1. Convert an SVG file into a .inl file (C format)
    $ svgconv --prefix=obj1 arc1.svg > arc1.inl
  2. #include the .inl file into some C file that wishes to use the converted path data
    /* Include the data, symbols will be prefixed with 'obj1' */
    #include "arc1.inl"
    /* And convert into OpenVG path data */
  3. Render the object using OpenVG calls
    /* Render object 'obj1' with OpenVG */
    for(i=0;i < NUM_CHILI_PATHS;i++)
        vgSetColor(paint, obj_paths[i].color | 255);
        vgDrawPath(chiliPath[i], VG_FILL_PATH);

Please see c-run-time/render.c source file for more details on how to use OpenVG for rendering your paths.

Command line options


svgconv [--prefix=<prefix>] [--version] infile


--prefix=<prefix> Set the symbol used to prefix all generated C identifiers
--version Print svgconv version number Logo