I don't know how to create efficient SVGs for the data. I attached a sample of my SVG output, and I'm wondering how I can combine the data to create a good conversion.
Here's a sample of the SVG file I generated with the tool:
Code: Select all
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/2.2/DTD/svg11.dtd">
<svg width="210mm" height="297mm" version="1.1" xmlns="http://www.w3.org/2000/svg">
<g inkscape:label="Layer 0" inkscape:groupmode="layer" id="layer0">
<!-- Start of stroke -->
<g id="group0">
<rect x="64684pt" y="3979pt" width="1cm" height="1cm" />
<!-- Pressure: 651 -->
<!-- Tilt: (x = 0, y = 0) -->
<rect x="64685pt" y="3981pt" width="1cm" height="1cm" />
<!-- Pressure: 724 -->
<!-- Tilt: (x = 0, y = 0) -->
...
</g>
</g>
<g inkscape:label="Layer 3" inkscape:groupmode="layer" id="layer3">
<!-- Start of stroke -->
<g id="group10">
...
</g>
</g>
</svg>
EDIT: I added <g> tags for grouping a "stroke".
EDIT 2: I added layer support for Inkscape.
The data explained:
In a <rect> there's x and y. The data from the Inkling is the number (without "pt"). I hardcoded the width and height attributes to be "1cm".
For all the other data, I put the exact number into the comment.
So, how should the ideal SVG look like having this data?
P.S. I'll release the software under the GPLv3+ license whenever it's useful (if you'd like to help developing the program I can share the code. It's written in C).