Hi Pierre,
Currently, graphics data is drawn to the canvas, but nothing is erased. If I specify a new waveform, it is drawn over the previous one, instead of removing it first.
The real code is a bit messy due to the implementation details, but below is the skeleton, containing the framework interactions and key data. The paint function is called at startup from the framework (via eclass_guiinit?). The redraw function is called when the waveform is changed (manual at the moment).
draw_background function:
draw_waveform function:
paint function:
redraw function:
You can look at the current code in my toy github repository: https://github.com/electrickery/pd-playground/tree/cicm/cicm-wavesel
Greetings,
Fred Jan