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: - ebox_start_layer(background_layer) - ebox_paint_layer() draw_waveform function: - ebox_start_layer(waveform_layer) - egraphics_line_fast(... here the waveform is defined ...) - ebox_end_layer() - ebox_paint_layer() paint function: - draw_background() - draw_waveform() redraw function: - ebox_invalidate_layer(background_layer) - ebox_invalidate_layer(waveform_layer) - paint() - ebox_redraw() 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 _______________________________________________ [email protected] mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
