[PD] subtle redrawing bug

Jonathan Wilkes jancsika at yahoo.com
Wed Mar 25 06:31:51 CET 2015


 From canvas_setgraph in g_canvas.c (with my own comments added):
         if (glist_isvisible(x) && x->gl_goprect)
             glist_redraw(x); // This ends with a redraw of the GOP 
window itself on the parent
         if (x->gl_owner && !x->gl_loading && glist_isvisible(x->gl_owner))
         {
             gobj_vis(&x->gl_gobj, x->gl_owner, 1); // This draws the 
GOP window for a second time if the above conditional is met
             canvas_fixlinesfor(x->gl_owner, &x->gl_obj);
         }

It's a rather innocuous bug since Pd-Vanilla erases the entire graph the 
moment you draw or update it.  But because tk gives you no tools to 
inspect the data drawn on a tk canvas, it's extremely difficult to track 
down bugs like these.  (I found it with chromium-devtools, which 
visually highlights graphical elements when you browse them in the html.)

-Jonathan



More information about the Pd-list mailing list