Allow to record and play strokes with different settings
Submitted by Laxminarayan G Kamath A
Created attachment 371731 The PDF generated by my BoogieBoard
tl;dr .. being able to record and play brush strokes , preferably to InkML is awesome! look at the attachments!
The looong one: [some of this may not seem important , but will help me with other bugs I want to report. I will link this bug instead of repeating the whole story]
I have a BoogieBoard https://myboogieboard.com/ . It allows to draw on the single pixel LCD, and stores the result in PDF files (sample attached). I assumed the PDF just had an image, so using some python and pdfrw, I tried extracting the image.
But to my amazement, there was an XML file. Upon proper inspection, I found out it was an InkML https://www.w3.org/TR/InkML/ . I really loved the specification , and with some initial struggle, was able to extract it . I wrote a quick script initially to read the strokes and draw it using GIMP. (Kudos to their team for using a relatively open format!!)
The scripts are available here: https://github.com/kamathln/boogiepdf WARNING: The script was written as a toy, is buggy, and hogs CPU and takes a long time to render if you don't skip importing pressure(which is unfortunately pointless) . It also makes itself as the default for PDF files (at least on my machine), which can create a crater under you if it thinks it is a good time to make thumbnails for the whole folder. (This is because there is no GIMP procedure with which I can play the whole stroke back with dynamics or opacity and pressure information - so for every step in the stroke, I have to set the opacity and size of the brush - and I have not even implemented the angles, as my device does not record them)
That is when I realized It would be awesome to record and play strokes. Imagine:
- being able to experiment with how a set of strokes is rendered.
- being able to repeat a set of strokes in the same image with slightly different settings, angle, perspective (say to draw fur, grass, lion mane, hair
- being able to share a set of strokes across projects .. Say I use my digitizer to create a good page corner decoration, and using GIMP, record those strokes to an InkML file. I could then use the same strokes in different projects using different brush settings, dynamics, colors, and what not, according to the theme of the project!
- being able to share the same stroke with other apps like InkScape, Krita, Blender! Or some animation software that animates your strokes exactly how you recorded it.
Attachment 371731, "The PDF generated by my BoogieBoard":