Revision: 9805 http://pure-data.svn.sourceforge.net/pure-data/?rev=9805&view=rev Author: mrtof Date: 2008-05-14 15:24:09 -0700 (Wed, 14 May 2008)
Log Message: ----------- Fixed a bug in the width of breakpoints widget
Modified Paths: -------------- trunk/externals/tof/src/breakpoints.c trunk/externals/tof/src/breakpoints~.c trunk/externals/tof/src/breakpoints~.h trunk/externals/tof/src/w_breakpoints.h
Modified: trunk/externals/tof/src/breakpoints.c =================================================================== --- trunk/externals/tof/src/breakpoints.c 2008-05-14 18:59:09 UTC (rev 9804) +++ trunk/externals/tof/src/breakpoints.c 2008-05-14 22:24:09 UTC (rev 9805) @@ -14,7 +14,6 @@
#include "breakpoints~.h"
-#define BACKGROUNDWIDTH "1" #include "w_breakpoints.h"
static t_class *breakpoints_class; @@ -296,8 +295,8 @@ { t_breakpoints *x = (t_breakpoints *)pd_new(breakpoints_class);
+ x->borderwidth = 1;
- x->x_f = 0; x->args = STATES; x->finalvalues = getbytes( x->args*sizeof(t_float));
Modified: trunk/externals/tof/src/breakpoints~.c =================================================================== --- trunk/externals/tof/src/breakpoints~.c 2008-05-14 18:59:09 UTC (rev 9804) +++ trunk/externals/tof/src/breakpoints~.c 2008-05-14 22:24:09 UTC (rev 9805) @@ -14,7 +14,6 @@
#include "breakpoints~.h"
-#define BACKGROUNDWIDTH "2" #include "w_breakpoints.h"
static t_class *breakpoints_class; @@ -327,8 +326,8 @@ { t_breakpoints *x = (t_breakpoints *)pd_new(breakpoints_class);
+ x->borderwidth = 2;
- x->x_f = 0; x->args = STATES; x->finalvalues = getbytes( x->args*sizeof(t_float));
Modified: trunk/externals/tof/src/breakpoints~.h =================================================================== --- trunk/externals/tof/src/breakpoints~.h 2008-05-14 18:59:09 UTC (rev 9804) +++ trunk/externals/tof/src/breakpoints~.h 2008-05-14 22:24:09 UTC (rev 9805) @@ -32,7 +32,8 @@ t_float totaldur; t_int args; /* get rid of that */ t_int resizing; - t_int resizeable; + t_int resizeable; + t_int borderwidth;
t_symbol* r_sym; //receive symbol t_symbol* s_sym; //send symbol
Modified: trunk/externals/tof/src/w_breakpoints.h =================================================================== --- trunk/externals/tof/src/w_breakpoints.h 2008-05-14 18:59:09 UTC (rev 9804) +++ trunk/externals/tof/src/w_breakpoints.h 2008-05-14 22:24:09 UTC (rev 9805) @@ -9,9 +9,7 @@
#define BACKGROUNDCOLOR "grey86" #define LINECOLOR "grey30" -#ifndef BACKGROUNDWIDTH -#define BACKGROUNDWIDTH "1" -#endif + #define BORDER 2
@@ -238,11 +236,11 @@ ypos = (int) text_ypix(&x->x_obj,glist); x->w.numclock = clock_new(x, (t_method) breakpoints_delnum); sys_vgui(".x%x.c create rectangle \ -%d %d %d %d -tags %xS -fill "BACKGROUNDCOLOR" -width "BACKGROUNDWIDTH"\n", +%d %d %d %d -tags %xS -fill "BACKGROUNDCOLOR" -width %d\n", glist_getcanvas(glist), xpos-BORDER, ypos-BORDER, xpos + x->w.width+2*BORDER, ypos + x->w.height+2*BORDER, - x); + x,x->borderwidth);
xscale = x->w.width/x->duration[x->last_state]; yscale = x->w.height;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.