[PD-cvs] pd/src g_graph.c,1.3.4.2,1.3.4.2.2.1
Tim Blechmann
timblech at users.sourceforge.net
Sun May 22 14:46:02 CEST 2005
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9484
Modified Files:
Tag: devel_0_39
g_graph.c
Log Message:
upgrading to 0.39-test2
Index: g_graph.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_graph.c,v
retrieving revision 1.3.4.2
retrieving revision 1.3.4.2.2.1
diff -C2 -d -r1.3.4.2 -r1.3.4.2.2.1
*** g_graph.c 11 Nov 2004 22:30:41 -0000 1.3.4.2
--- g_graph.c 22 May 2005 12:46:00 -0000 1.3.4.2.2.1
***************
*** 11,14 ****
--- 11,15 ----
#include "t_tk.h"
#include "g_canvas.h"
+ #include "s_stuff.h" /* for sys_hostfontsize */
#include <stdio.h>
#include <string.h>
***************
*** 40,44 ****
gobj_vis(y, x, 1);
if (class_isdrawcommand(y->g_pd))
! canvas_redrawallfortemplate(glist_getcanvas(x));
}
--- 41,46 ----
gobj_vis(y, x, 1);
if (class_isdrawcommand(y->g_pd))
! canvas_redrawallfortemplate(template_findbyname(canvas_makebindsym(
! glist_getcanvas(x)->gl_name)), 0);
}
***************
*** 91,94 ****
--- 93,101 ----
}
}
+ /* if we're a drawing command, erase all scalars now, before deleting
+ it; we'll redraw them once it's deleted below. */
+ if (drawcommand)
+ canvas_redrawallfortemplate(template_findbyname(canvas_makebindsym(
+ glist_getcanvas(x)->gl_name)), 2);
gobj_delete(y, x);
if (glist_isvisible(canvas))
***************
*** 105,109 ****
pd_free(&y->g_pd);
if (chkdsp) canvas_update_dsp();
! if (drawcommand) canvas_redrawallfortemplate(canvas);
canvas_setdeleting(canvas, wasdeleting);
x->gl_valid = ++glist_valid;
--- 112,118 ----
pd_free(&y->g_pd);
if (chkdsp) canvas_update_dsp();
! if (drawcommand)
! canvas_redrawallfortemplate(template_findbyname(canvas_makebindsym(
! glist_getcanvas(x)->gl_name)), 1);
canvas_setdeleting(canvas, wasdeleting);
x->gl_valid = ++glist_valid;
***************
*** 129,133 ****
}
if (suspended)
! canvas_resume_dsp(dspstate);
}
--- 138,142 ----
}
if (suspended)
! canvas_resume_dsp(dspstate);
}
***************
*** 643,646 ****
--- 652,657 ----
extern t_widgetbehavior text_widgetbehavior;
+ t_symbol *garray_getname(t_garray *x);
+
/* Note that some code in here would also be useful for drawing
***************
*** 693,697 ****
int i;
float f;
!
/* draw a rectangle around the graph */
sys_vgui(".x%lx.c create line\
--- 704,709 ----
int i;
float f;
! t_gobj *g;
! t_symbol *arrayname;
/* draw a rectangle around the graph */
sys_vgui(".x%lx.c create line\
***************
*** 699,703 ****
glist_getcanvas(x->gl_owner),
x1, y1, x1, y2, x2, y2, x2, y1, x1, y1, tag);
!
/* draw ticks on horizontal borders. If lperb field is
zero, this is disabled. */
--- 711,727 ----
glist_getcanvas(x->gl_owner),
x1, y1, x1, y2, x2, y2, x2, y1, x1, y1, tag);
!
! /* if there's just one "garray" in the graph, write its name
! along the top */
! if ((g = x->gl_list) && !g->g_next && (g->g_pd == garray_class))
! {
! int ymin = (y1 < y2 ? y1 : y2);
! t_symbol *s = garray_getname((t_garray *)g);
! sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor sw\
! -font -*-courier-bold--normal--%d-* -tags %s\n",
! (long)glist_getcanvas(x), x1, ymin, s->s_name,
! sys_hostfontsize(glist_getfont(x)), tag);
! }
!
/* draw ticks on horizontal borders. If lperb field is
zero, this is disabled. */
More information about the Pd-cvs
mailing list