[PD-cvs] pd/src desire.c, 1.1.2.25, 1.1.2.26 desire.h, 1.1.2.2, 1.1.2.3
Mathieu Bouchard
matju at users.sourceforge.net
Sat Sep 24 05:11:07 CEST 2005
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5297
Modified Files:
Tag: devel_0_39
desire.c desire.h
Log Message:
removed coords from t_linetraverser and fixed crash in reflecttitle (oops)
Index: desire.h
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.h,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -d -r1.1.2.2 -r1.1.2.3
*** desire.h 16 Sep 2005 19:13:09 -0000 1.1.2.2
--- desire.h 24 Sep 2005 03:11:05 -0000 1.1.2.3
***************
*** 265,271 ****
int tr_nin;
int tr_inno;
! int tr_x11, tr_y11, tr_x12, tr_y12;
int tr_x21, tr_y21, tr_x22, tr_y22;
! int tr_lx1, tr_ly1, tr_lx2, tr_ly2;
t_outconnect *tr_nextoc;
int tr_nextoutno;
--- 265,271 ----
int tr_nin;
int tr_inno;
! /* int tr_x11, tr_y11, tr_x12, tr_y12;
int tr_x21, tr_y21, tr_x22, tr_y22;
! int tr_lx1, tr_ly1, tr_lx2, tr_ly2;*/
t_outconnect *tr_nextoc;
int tr_nextoutno;
Index: desire.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v
retrieving revision 1.1.2.25
retrieving revision 1.1.2.26
diff -C2 -d -r1.1.2.25 -r1.1.2.26
*** desire.c 24 Sep 2005 02:03:11 -0000 1.1.2.25
--- desire.c 24 Sep 2005 03:11:05 -0000 1.1.2.26
***************
*** 180,192 ****
}
! void canvas_setcurrent(t_canvas *x)
! {
! pd_pushsym(&x->gl_pd);
! }
!
! void canvas_unsetcurrent(t_canvas *x)
! {
! pd_popsym(&x->gl_pd);
! }
t_canvasenvironment *canvas_getenv(t_canvas *x)
--- 180,185 ----
}
! void canvas_setcurrent (t_canvas *x) {pd_pushsym(&x->gl_pd);}
! void canvas_unsetcurrent(t_canvas *x) { pd_popsym(&x->gl_pd);}
t_canvasenvironment *canvas_getenv(t_canvas *x)
***************
*** 317,324 ****
t->tr_nout = obj_noutlets(ob);
outno = 0;
- if (glist_isvisible(t->tr_x))
- gobj_getrect(y, t->tr_x,
- &t->tr_x11, &t->tr_y11, &t->tr_x12, &t->tr_y12);
- else t->tr_x11 = t->tr_y11 = t->tr_x12 = t->tr_y12 = 0;
}
t->tr_nextoutno = outno + 1;
--- 310,313 ----
***************
*** 330,354 ****
t->tr_nin = obj_ninlets(t->tr_ob2);
if (!t->tr_nin) bug("drawline");
- if (glist_isvisible(t->tr_x))
- {
- int inplus = (t->tr_nin == 1 ? 1 : t->tr_nin - 1);
- int outplus = (t->tr_nout == 1 ? 1 : t->tr_nout - 1);
- gobj_getrect(&t->tr_ob2->ob_g, t->tr_x,
- &t->tr_x21, &t->tr_y21, &t->tr_x22, &t->tr_y22);
- t->tr_lx1 = t->tr_x11 +
- ((t->tr_x12 - t->tr_x11 - IOWIDTH) * t->tr_outno) /
- outplus + IOMIDDLE;
- t->tr_ly1 = t->tr_y12;
- t->tr_lx2 = t->tr_x21 +
- ((t->tr_x22 - t->tr_x21 - IOWIDTH) * t->tr_inno)/inplus +
- IOMIDDLE;
- t->tr_ly2 = t->tr_y21;
- }
- else
- {
- t->tr_x21 = t->tr_y21 = t->tr_x22 = t->tr_y22 = 0;
- t->tr_lx1 = t->tr_ly1 = t->tr_lx2 = t->tr_ly2 = 0;
- }
-
return (rval);
}
--- 319,322 ----
***************
*** 627,633 ****
else namebuf[0] = 0;
char foo[666];
! sprintf("%s%c%s - %s",x->gl_name->s_name, (x->gl_dirty? '*' : ' '), namebuf,
canvas_getdir(x)->s_name);
! sys_mgui(x,"window_title",foo);
}
--- 595,601 ----
else namebuf[0] = 0;
char foo[666];
! sprintf(foo,"%s%c%s - %s",x->gl_name->s_name, (x->gl_dirty? '*' : ' '), namebuf,
canvas_getdir(x)->s_name);
! sys_mgui(x,"window_title","s",gensym(foo));
}
***************
*** 2636,2665 ****
/* having failed to find a box, we try lines now. */
if (!runmode && !altmod && !shiftmod)
! {
! t_linetraverser t;
! t_outconnect *oc;
! float fx = xpos, fy = ypos;
! t_glist *glist2 = glist_getcanvas(x);
! linetraverser_start(&t, glist2);
! while (oc = linetraverser_next(&t))
! {
! float lx1 = t.tr_lx1, ly1 = t.tr_ly1,
! lx2 = t.tr_lx2, ly2 = t.tr_ly2;
! float area = (lx2 - lx1) * (fy - ly1) -
! (ly2 - ly1) * (fx - lx1);
! float dsquare = (lx2-lx1) * (lx2-lx1) + (ly2-ly1) * (ly2-ly1);
! if (area * area >= 50 * dsquare) continue;
! if ((lx2-lx1) * (fx-lx1) + (ly2-ly1) * (fy-ly1) < 0) continue;
! if ((lx2-lx1) * (lx2-fx) + (ly2-ly1) * (ly2-fy) < 0) continue;
! if (doit)
! {
! glist_selectline(glist2, oc,
! canvas_getindex(glist2, &t.tr_ob->ob_g), t.tr_outno,
! canvas_getindex(glist2, &t.tr_ob2->ob_g), t.tr_inno);
! }
! canvas_setcursor(x, CURSOR_EDITMODE_DISCONNECT);
! return;
! }
! }
canvas_setcursor(x, CURSOR_EDITMODE_NOTHING);
if (doit)
--- 2604,2608 ----
/* having failed to find a box, we try lines now. */
if (!runmode && !altmod && !shiftmod)
! {/* was trying to select wire here*/}
canvas_setcursor(x, CURSOR_EDITMODE_NOTHING);
if (doit)
***************
*** 5962,5982 ****
t_linetraverser t;
t_outconnect *oc;
! for (g = x->gl_list; g; g = g->g_next)
! {
gobj_vis(g, x, 0);
gobj_vis(g, x, 1);
}
! /* redraw all the lines */
! linetraverser_start(&t, x);
! while (oc = linetraverser_next(&t))
! sys_vgui(".x%lx.c coords l%lx %d %d %d %d\n",
! glist_getcanvas(x), oc,
! t.tr_lx1, t.tr_ly1, t.tr_lx2, t.tr_ly2);
canvas_drawredrect(x, 0);
! if (x->gl_goprect)
! {
! post("draw it");
! canvas_drawredrect(x, 1);
! }
}
if (x->gl_owner && glist_isvisible(x->gl_owner))
--- 5905,5915 ----
t_linetraverser t;
t_outconnect *oc;
! for (g = x->gl_list; g; g = g->g_next) {
gobj_vis(g, x, 0);
gobj_vis(g, x, 1);
}
! sys_mgui(x,"draw_canvas_wires","");
canvas_drawredrect(x, 0);
! if (x->gl_goprect) canvas_drawredrect(x, 1);
}
if (x->gl_owner && glist_isvisible(x->gl_owner))
***************
*** 12436,12442 ****
for (i=0; i<argc; i++) {
void *p;
- char bof[666];
- atom_string(argv+i,bof,666);
- /*fprintf(stderr,"%d: %s\n",i,bof);*/
switch (fmt[i]) {
case '*': case ';': goto break2;
--- 12369,12372 ----
More information about the Pd-cvs
mailing list