This demo has three parts.
The first routine is a drawing tool which allows the user to change colours and pen thickness, as well as delete the previous stroke. Each pen movement is recorded into the data file as a separate row.
The second routine recreates the image at double speed, noting when the pen is lifted or a stroke is deleted.
These two routines work both locally and online. The final element is a separate Python file (written by ChatGPT) which only runs locally but creates a PNG file from each CSV file it finds in the data folder (irrespective of whether the data comes from PsychoPy or PsychoJS), using the participant number as the file name.
There is a switch in the expInfo dialogue box to select whether deletions are saved or fully deleted.
It now works in both landscape and portrait mode. Please add any feature requests to this thread.
Happy Christmas!
If you use this code, please cite as:
Morys-Carter, W. L. (2025, December 25). Pavlovia Paint [Computer software]. Pavlovia. https://doi.org/10.17605/OSF.IO/X5N9C