Commit 3f0b65b6 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

remove remaining unneeded sys_vgui calls from g_template.c and port drawimage_free GUI call

parent 882c2e62
......@@ -2768,6 +2768,15 @@ function gui_drawimage_new(obj_tag, file_path, canvasdir, flags) {
}
}
function gui_drawimage_free(obj_tag) {
if (drawimage_data[obj_tag] && drawimage_data[obj_tag].length) {
post("drawimage: freed " + drawimage_data[obj_tag].length + " images");
drawimage_data[obj_tag] = []; // empty the image(s)
} else {
post("drawimage: warning: no image data to free");
}
}
function img_size_setter(cid, obj, obj_tag, i) {
var img = new pd_window.window.Image(),
w, h;
......
......@@ -6106,8 +6106,9 @@ static void plot_vis(t_gobj *z, t_glist *glist, t_glist *parentglist,
}
/* make sure the array drawings are behind the graph */
sys_vgui(".x%lx.c lower plot%lx graph%lx\n", glist_getcanvas(glist),
data, glist);
/* not doing this yet with the GUI port... */
//sys_vgui(".x%lx.c lower plot%lx graph%lx\n", glist_getcanvas(glist),
// data, glist);
/* We're done with the outline; now draw all the points.
This code is inefficient since the template has to be
......@@ -7541,8 +7542,13 @@ static void drawimage_vis(t_gobj *z, t_glist *glist, t_glist *parentglist,
svg_togui(svg, template, data);
gui_end_vmess();
}
else sys_vgui("pdtk_drawimage_unvis .x%lx.c .x%lx.i\n",
glist_getcanvas(glist), data);
else
{
/* We don't actually need this-- the image should get destroyed
automatically. */
//sys_vgui("pdtk_drawimage_unvis .x%lx.c .x%lx.i\n",
// glist_getcanvas(glist), data);
}
}
static t_float drawimage_motion_ycumulative;
......@@ -7718,7 +7724,8 @@ static void drawimage_free(t_drawimage *x)
//sprintf(buf, ".x%lx", (t_int)x);
sprintf(buf, ".x%lx", (long unsigned int)x);
pd_unbind(&x->x_obj.ob_pd, gensym(buf));
sys_vgui("pdtk_drawimage_free .x%lx\n", (t_int)x);
//sys_vgui("pdtk_drawimage_free .x%lx\n", (t_int)x);
gui_vmess("gui_drawimage_free", "x", x);
}
static void drawimage_setup(void)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment