lib2geom-path-boolean
Exposes lib2geom boolean path algorithms used in the Inkscape project to a node.js project
lib2geom path boolean N-API addon
Exposes lib2geom boolean path algorithms used in the Inkscape project to a node.js project
Installation
As N-API module (recommended)
npm i lib2geom-path-boolean-addon@n-api
With post-install build via cmake-js
npm i -g cmake-js
Debian-based, e.g. Ubuntu
sudo apt-get install g++ cmake libdouble-conversion-dev libgsl-dev libcairo2-dev
Windows (not recommended, linux can build for Windows)
- https://osdn.net/projects/mingw/downloads/68260/mingw-get-setup.exe/ (use to install base and g++)
- https://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.zip/download
- https://nodejs.org/en/download/
- https://github.com/wingtk/gvsbuild (dependency: extras installed with nodejs)
- https://sourceforge.net/projects/gnu-scientific-library-windows/
npm i lib2geom-path-boolean-addon
API
intersectPathData
Given 2 strings which are svg
subtractPathData
Given 2 strings which are svg
Usage
const intersectPathData subtractPathData = ; const intersection = ; const subtraction = ;