WillNilges / inkpath

A plugin for transcribing hand-drawn notes, diagrams, and tables onto xournalpp documents
GNU General Public License v2.0
18 stars 1 forks source link

XML Parser error: Wrong count of points (2) #11

Open WillNilges opened 2 years ago

WillNilges commented 2 years ago

It's possible to save documents that have Inkpath objects on them, but loading does not work. It fails with XML Parser error: Wrong count of points (2). No idea why.

Going to cut open one of my saves and see if I can figure it out.

WillNilges commented 2 years ago

Think I figured it out. Inkpath outputs strokes that look like this sometimes:

<stroke tool="pen" ts="0" fn="" color="#000000ff" width="1.50000000">270.20000000 338.60000000</stroke>

You can fix it by running :g/>\d\+.\d\+ \d\+.\d\+<\/stroke>/d in Vim.

WillNilges commented 2 years ago

Now, how do we prevent this output from showing up in the first place :thinking:

WillNilges commented 2 years ago

Fixed it in the Xournalpp API. I wonder if we could somehow detect it from Inkpath and avoid sending the bad splines in the first place. Also, I wonder what this'll do to the dots of "I's" and stuff. Gonna have to watch out for that. Might keep this issue open until it's clear that it's not an issue.