vkvg is a multiplatform c library for drawing 2D vector graphics with Vulkan. It's api follows the same pattern as Cairo, but new functions and original drawing mechanics may be added.
vkvg is in early development stage, api may change, any contribution is welcome.
For API documentation and usage, please refer to the Cairo documentation.
- Fill (with stencil even-odd technic) and Stroke functional.
- Basic painting operation.
- Font system with caching operational.
- Linear Gradients.
- Line caps and joins.
- Context should be thread safe, extensive tests required.
- Image loading and writing with stb lib
- Test includes svg rendering with nanoSVG
- Vulkan
- FontConfig
- Freetype
- PkgConfig (currently used only to find harbfbuzz)
- Harfbuzz
- GLSLC: spirv compiler, included in LunarG SDK (building only)
- xxd: generate headers with precompiled shaders (building only)
- GLFW (only for running demo app)
- CMake
if glslc or xxd are not present, a precompiled version of the shaders is stored in the git tree.
git clone https://github.com/jpbruyere/vkvg.git # Download source code from github
cd vkvg # Enter the source directory
git submodule update --init --recursive # Dowload vkhelpers sources
mkdir build # Create build directory
cd build
cmake .. # Run CMake, optionaly setup glslc path
make # Run Make
- Radial gradients.
- Dashed lines.
- Operators.
- Improve stroke algorithms.
- Offscreen pattern building.
- Optimize vulkan memory allocations by sub-allocating from a single shared memory chunk per type.
- Optimize command submissions.
- Test SDF font rendering.
- Avoid line joins inside curves and arc.
- Structured unit testing.
- Perf and memory checks.
- Code clean and comment.
- Documentations.