New Demo: Pavlovia Paint

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.

Code

Try it

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

  1. Is this specifically for stylus pad types of inputs, or does this also mouse movements?

  2. I am assuming the PNG is only a recreation of the pen movements. However, would it be useful if it also could include the background stimuli (if any) to see how the pen drawing would be overlaid over any stimuli?

    Best regards,
    Issac

  1. I’ve designed it to work with both mouse and touchscreen.
  2. I imagine this should be possible, but the data file would need to have the path to the image and its size. However, since you could also manually overlay the images in GIMP, then this isn’t a priority until I have a study that needs the feature.
1 Like