Update of /cvsroot/pure-data/externals/pidip/modules In directory sc8-pr-cvs1:/tmp/cvs-serv15692
Modified Files: pdp_text.c Log Message: ok, last update for 0.12.10
Index: pdp_text.c =================================================================== RCS file: /cvsroot/pure-data/externals/pidip/modules/pdp_text.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** pdp_text.c 17 Sep 2003 20:09:08 -0000 1.2 --- pdp_text.c 29 Oct 2003 22:43:08 -0000 1.3 *************** *** 78,81 **** --- 78,82 ---- char *pname; char *pdname; + t_int len;
if ( x->x_nbtexts >= x->x_capacity ) *************** *** 96,101 ****
// allocate new text area ! pdname = x->x_text_array[x->x_nbtexts] = (char *) malloc( strlen( argv[0].a_w.w_symbol->s_name ) ); ! pname=argv[0].a_w.w_symbol->s_name; while (*(pname)) { --- 97,105 ----
// allocate new text area ! len = strlen( argv[0].a_w.w_symbol->s_name ); ! pdname = x->x_text_array[x->x_nbtexts] = (char *) getbytes( len+1 ); ! pname = (char *) getbytes( len+1 ); ! memset( pname, 0x0, len+1 ); ! memcpy( pname, argv[0].a_w.w_symbol->s_name, len ); while (*(pname)) { *************** *** 155,159 **** x->x_scroll[x->x_nbtexts] = (int)argv[7].a_w.w_float; } -
post( "pdp_text : added text >%s< @ %d (r=%d g=%d b=%d)", --- 159,162 ---- *************** *** 350,354 **** x->x_scroll = scroll; x->x_nbtexts = csize; ! x->x_capacity = csize; if ( x->x_nbtexts > 0 ) { --- 353,357 ---- x->x_scroll = scroll; x->x_nbtexts = csize; ! x->x_capacity = (int) fnewsize; if ( x->x_nbtexts > 0 ) { *************** *** 359,362 **** --- 362,366 ---- x->x_current = -1; } + post( "pdp_text : resized to %d", (int) fnewsize ); }
*************** *** 435,439 **** imlib_get_text_size( x->x_text_array[ti], &text_width, &text_height);
! imlib_text_draw( x->x_xoffsets[ti] - (0.5*text_width) + (cos(x->x_angle[ti]) * x->x_scroll[ti]), x->x_yoffsets[ti] - (0.5*text_height) + (sin(x->x_angle[ti]) * x->x_scroll[ti]), x->x_text_array[ti] ); }
--- 439,445 ---- imlib_get_text_size( x->x_text_array[ti], &text_width, &text_height);
! imlib_text_draw( x->x_xoffsets[ti] - (0.5*text_width) + (cos(x->x_angle[ti]) * x->x_scroll[ti]), ! x->x_yoffsets[ti] - (0.5*text_height) + (sin(x->x_angle[ti]) * x->x_scroll[ti]), ! x->x_text_array[ti] ); }