Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Wynn
purr-data
Commits
3f0b65b6
Commit
3f0b65b6
authored
Jan 10, 2016
by
Jonathan Wilkes
Browse files
remove remaining unneeded sys_vgui calls from g_template.c and port drawimage_free GUI call
parent
882c2e62
Changes
2
Hide whitespace changes
Inline
Side-by-side
pd/nw/pdgui.js
View file @
3f0b65b6
...
...
@@ -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
;
...
...
pd/src/g_template.c
View file @
3f0b65b6
...
...
@@ -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)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment