Update of /cvsroot/pure-data/externals/unauthorized/grid In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5094
Modified Files: CHANGES.LOG grid.c help-grid.pd Log Message: Added GOP supoort
Index: help-grid.pd =================================================================== RCS file: /cvsroot/pure-data/externals/unauthorized/grid/help-grid.pd,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** help-grid.pd 30 Mar 2004 04:11:42 -0000 1.3 --- help-grid.pd 2 Mar 2005 02:45:49 -0000 1.4 *************** *** 1,6 **** #N canvas 26 1 763 647 10; ! #X obj 71 76 grid grid1 200 0 199 200 0 199 1 1 1 10 10 188 197; ! #X floatatom 72 293 5 0 0; ! #X floatatom 257 282 5 0 0; #X text 41 21 Grid is a 2-dimensional control object; #X text 319 449 (invoke with <right mouse>Properties ); --- 1,6 ---- #N canvas 26 1 763 647 10; ! #X obj 72 77 grid grid1 200 0 199 200 0 199 1 1 1 10 10 192 224; ! #X floatatom 72 293 5 0 0 0 - - -; ! #X floatatom 257 282 5 0 0 0 - - -; #X text 41 21 Grid is a 2-dimensional control object; #X text 319 449 (invoke with <right mouse>Properties ); *************** *** 29,38 **** #X msg 653 271 ; pd dsp 1; #X obj 276 417 *~; ! #X floatatom 276 360 0 0 0; #X obj 357 397 line~; ! #X floatatom 188 380 0 0 0; #X obj 188 494 cos~; #X obj 188 450 +~; ! #X floatatom 228 506 0 0 100; #N canvas 159 26 495 270 output 0; #X obj 338 160 t b; --- 29,38 ---- #X msg 653 271 ; pd dsp 1; #X obj 276 417 *~; ! #X floatatom 276 360 0 0 0 0 - - -; #X obj 357 397 line~; ! #X floatatom 188 380 0 0 0 0 - - -; #X obj 188 494 cos~; #X obj 188 450 +~; ! #X floatatom 228 506 0 0 100 0 - - -; #N canvas 159 26 495 270 output 0; #X obj 338 160 t b; *************** *** 90,94 **** #X obj 276 385 osc~ 0; #X obj 357 371 pack 0 50; ! #X floatatom 357 318 0 0 0; #X obj 357 345 / 100; #X text 188 345 carrier; --- 90,94 ---- #X obj 276 385 osc~ 0; #X obj 357 371 pack 0 50; ! #X floatatom 357 318 0 0 0 0 - - -; #X obj 357 345 / 100; #X text 188 345 carrier; *************** *** 105,110 **** #X text 40 32 It was inspired by the chaospad device; #X text 346 568 * Y step : Y delta for an Y update; ! #X floatatom 474 85 5 0 0; ! #X floatatom 586 84 5 0 0; #X obj 411 82 pack f f; #X msg 332 81 goto $1 $2; --- 105,110 ---- #X text 40 32 It was inspired by the chaospad device; #X text 346 568 * Y step : Y delta for an Y update; ! #X floatatom 474 85 5 0 0 0 - - -; ! #X floatatom 586 84 5 0 0 0 - - -; #X obj 411 82 pack f f; #X msg 332 81 goto $1 $2; *************** *** 113,136 **** #X text 333 63 Set position :; #X text 631 85 Y; ! #X floatatom 486 120 5 0 0; ! #X floatatom 586 121 5 0 0; #X obj 423 119 pack f f; #X msg 546 120 bang; #X text 530 120 X; #X text 634 121 Y; ! #X floatatom 528 156 5 0 0; ! #X floatatom 633 156 5 0 0; #X obj 465 153 pack f f; #X msg 593 154 bang; #X text 578 155 X; #X text 679 156 Y; ! #X floatatom 503 191 5 0 0; ! #X floatatom 607 190 5 0 0; #X obj 440 188 pack f f; #X msg 568 189 bang; #X text 553 190 X; #X text 656 191 Y; ! #X floatatom 539 224 5 0 0; ! #X floatatom 638 226 5 0 0; #X obj 472 223 pack f f; #X msg 600 224 bang; --- 113,136 ---- #X text 333 63 Set position :; #X text 631 85 Y; ! #X floatatom 486 120 5 0 0 0 - - -; ! #X floatatom 586 121 5 0 0 0 - - -; #X obj 423 119 pack f f; #X msg 546 120 bang; #X text 530 120 X; #X text 634 121 Y; ! #X floatatom 528 156 5 0 0 0 - - -; ! #X floatatom 633 156 5 0 0 0 - - -; #X obj 465 153 pack f f; #X msg 593 154 bang; #X text 578 155 X; #X text 679 156 Y; ! #X floatatom 503 191 5 0 0 0 - - -; ! #X floatatom 607 190 5 0 0 0 - - -; #X obj 440 188 pack f f; #X msg 568 189 bang; #X text 553 190 X; #X text 656 191 Y; ! #X floatatom 539 224 5 0 0 0 - - -; ! #X floatatom 638 226 5 0 0 0 - - -; #X obj 472 223 pack f f; #X msg 600 224 bang;
Index: CHANGES.LOG =================================================================== RCS file: /cvsroot/pure-data/externals/unauthorized/grid/CHANGES.LOG,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CHANGES.LOG 30 Mar 2004 04:11:42 -0000 1.2 --- CHANGES.LOG 2 Mar 2005 02:45:49 -0000 1.3 *************** *** 1,2 **** --- 1,4 ---- + 0.6 + added GOP support 0.5 Adapted for pd 0.37
Index: grid.c =================================================================== RCS file: /cvsroot/pure-data/externals/unauthorized/grid/grid.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** grid.c 30 Mar 2004 04:11:42 -0000 1.6 --- grid.c 2 Mar 2005 02:45:49 -0000 1.7 *************** *** 36,40 **** static int pointsize = 5;
! static char *grid_version = "grid: version 0.5, written by Yves Degoyon (ydegoyon@free.fr)";
#define GRID_SYS_VGUI2(a,b) if (guidebug) \ --- 36,40 ---- static int pointsize = 5;
! static char *grid_version = "grid: version 0.6, written by Yves Degoyon (ydegoyon@free.fr)";
#define GRID_SYS_VGUI2(a,b) if (guidebug) \ *************** *** 61,66 **** static void grid_draw_update(t_grid *x, t_glist *glist) { ! t_canvas *canvas=glist_getcanvas(glist); ! t_int xpoint=x->x_current, ypoint=x->y_current;
// later : try to figure out what's this test for ?? --- 61,66 ---- static void grid_draw_update(t_grid *x, t_glist *glist) { ! t_canvas *canvas=glist_getcanvas(glist); ! t_int xpoint=x->x_current, ypoint=x->y_current;
// later : try to figure out what's this test for ?? *************** *** 73,82 **** }
! if ( x->x_current < x->x_obj.te_xpix ) xpoint = x->x_obj.te_xpix; ! if ( x->x_current > x->x_obj.te_xpix + x->x_width - pointsize ) ! xpoint = x->x_obj.te_xpix + x->x_width - pointsize; ! if ( x->y_current < x->x_obj.te_ypix ) ypoint = x->x_obj.te_ypix; ! if ( x->y_current > x->x_obj.te_ypix + x->x_height - pointsize ) ! ypoint = x->x_obj.te_ypix + x->x_height - pointsize; // draw the selected point GRID_SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -fill #FF0000 -tags %xPOINT\n", --- 73,82 ---- }
! if ( x->x_current < text_xpix(&x->x_obj, glist) ) xpoint = text_xpix(&x->x_obj, glist); ! if ( x->x_current > text_xpix(&x->x_obj, glist) + x->x_width - pointsize ) ! xpoint = text_xpix(&x->x_obj, glist) + x->x_width - pointsize; ! if ( x->y_current < text_ypix(&x->x_obj, glist) ) ypoint = text_ypix(&x->x_obj, glist); ! if ( x->y_current > text_ypix(&x->x_obj, glist) + x->x_height - pointsize ) ! ypoint = text_ypix(&x->x_obj, glist) + x->x_height - pointsize; // draw the selected point GRID_SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -fill #FF0000 -tags %xPOINT\n", *************** *** 92,133 **** static void grid_draw_new(t_grid *x, t_glist *glist) { ! t_canvas *canvas=glist_getcanvas(glist); ! char *tagRoot;
rtext_new(glist, (t_text *)x ); tagRoot = rtext_gettag(glist_findrtext(glist,(t_text *)x)); GRID_SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -fill #124392 -tags %xGRID\n", ! canvas, x->x_obj.te_xpix, x->x_obj.te_ypix, ! x->x_obj.te_xpix + x->x_width, x->x_obj.te_ypix + x->x_height, x); GRID_SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -tags %so0\n", ! canvas, x->x_obj.te_xpix, x->x_obj.te_ypix + x->x_height+1, ! x->x_obj.te_xpix+7, x->x_obj.te_ypix + x->x_height+2, tagRoot); GRID_SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -tags %so1\n", ! canvas, x->x_obj.te_xpix+x->x_width-7, x->x_obj.te_ypix + x->x_height+1, ! x->x_obj.te_xpix+x->x_width, x->x_obj.te_ypix + x->x_height+2, tagRoot);
if ( x->x_grid ) { ! int xlpos = x->x_obj.te_xpix+x->x_width/x->x_xlines; ! int ylpos = x->x_obj.te_ypix+x->x_height/x->x_ylines; int xcount = 1; int ycount = 1; ! while ( xlpos < x->x_obj.te_xpix+x->x_width ) { GRID_SYS_VGUI9(".x%x.c create line %d %d %d %d -fill #FFFFFF -tags %xLINE%d%d\n", ! canvas, xlpos, x->x_obj.te_ypix, ! xlpos, x->x_obj.te_ypix+x->x_height, x, xcount, 0 ); xlpos+=x->x_width/x->x_xlines; xcount++; } ! while ( ylpos < x->x_obj.te_ypix+x->x_height ) { GRID_SYS_VGUI9(".x%x.c create line %d %d %d %d -fill #FFFFFF -tags %xLINE%d%d\n", ! canvas, x->x_obj.te_xpix, ylpos, ! x->x_obj.te_xpix+x->x_width, ylpos, x, 0, ycount); ylpos+=x->x_height/x->x_ylines; --- 92,133 ---- static void grid_draw_new(t_grid *x, t_glist *glist) { ! t_canvas *canvas=glist_getcanvas(glist); ! char *tagRoot;
rtext_new(glist, (t_text *)x ); tagRoot = rtext_gettag(glist_findrtext(glist,(t_text *)x)); GRID_SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -fill #124392 -tags %xGRID\n", ! canvas, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist), ! text_xpix(&x->x_obj, glist) + x->x_width, text_ypix(&x->x_obj, glist) + x->x_height, x); GRID_SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -tags %so0\n", ! canvas, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist) + x->x_height+1, ! text_xpix(&x->x_obj, glist)+7, text_ypix(&x->x_obj, glist) + x->x_height+2, tagRoot); GRID_SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -tags %so1\n", ! canvas, text_xpix(&x->x_obj, glist)+x->x_width-7, text_ypix(&x->x_obj, glist) + x->x_height+1, ! text_xpix(&x->x_obj, glist)+x->x_width, text_ypix(&x->x_obj, glist) + x->x_height+2, tagRoot);
if ( x->x_grid ) { ! int xlpos = text_xpix(&x->x_obj, glist)+x->x_width/x->x_xlines; ! int ylpos = text_ypix(&x->x_obj, glist)+x->x_height/x->x_ylines; int xcount = 1; int ycount = 1; ! while ( xlpos < text_xpix(&x->x_obj, glist)+x->x_width ) { GRID_SYS_VGUI9(".x%x.c create line %d %d %d %d -fill #FFFFFF -tags %xLINE%d%d\n", ! canvas, xlpos, text_ypix(&x->x_obj, glist), ! xlpos, text_ypix(&x->x_obj, glist)+x->x_height, x, xcount, 0 ); xlpos+=x->x_width/x->x_xlines; xcount++; } ! while ( ylpos < text_ypix(&x->x_obj, glist)+x->x_height ) { GRID_SYS_VGUI9(".x%x.c create line %d %d %d %d -fill #FFFFFF -tags %xLINE%d%d\n", ! canvas, text_xpix(&x->x_obj, glist), ylpos, ! text_xpix(&x->x_obj, glist)+x->x_width, ylpos, x, 0, ycount); ylpos+=x->x_height/x->x_ylines; *************** *** 140,159 **** static void grid_draw_move(t_grid *x, t_glist *glist) { ! t_canvas *canvas=glist_getcanvas(glist); ! char *tagRoot;
tagRoot = rtext_gettag(glist_findrtext(glist,(t_text *)x)); GRID_SYS_VGUI7(".x%x.c coords %xGRID %d %d %d %d\n", canvas, x, ! x->x_obj.te_xpix, x->x_obj.te_ypix, ! x->x_obj.te_xpix+x->x_width, x->x_obj.te_ypix+x->x_height); GRID_SYS_VGUI7(".x%x.c coords %so0 %d %d %d %d\n", canvas, tagRoot, ! x->x_obj.te_xpix, x->x_obj.te_ypix + x->x_height+1, ! x->x_obj.te_xpix+7, x->x_obj.te_ypix + x->x_height+2 ); GRID_SYS_VGUI7(".x%x.c coords %so1 %d %d %d %d\n", canvas, tagRoot, ! x->x_obj.te_xpix+x->x_width-7, x->x_obj.te_ypix + x->x_height+1, ! x->x_obj.te_xpix+x->x_width, x->x_obj.te_ypix + x->x_height+2 ); if ( x->x_point ) { --- 140,159 ---- static void grid_draw_move(t_grid *x, t_glist *glist) { ! t_canvas *canvas=glist_getcanvas(glist); ! char *tagRoot;
tagRoot = rtext_gettag(glist_findrtext(glist,(t_text *)x)); GRID_SYS_VGUI7(".x%x.c coords %xGRID %d %d %d %d\n", canvas, x, ! text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist), ! text_xpix(&x->x_obj, glist)+x->x_width, text_ypix(&x->x_obj, glist)+x->x_height); GRID_SYS_VGUI7(".x%x.c coords %so0 %d %d %d %d\n", canvas, tagRoot, ! text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist) + x->x_height+1, ! text_xpix(&x->x_obj, glist)+7, text_ypix(&x->x_obj, glist) + x->x_height+2 ); GRID_SYS_VGUI7(".x%x.c coords %so1 %d %d %d %d\n", canvas, tagRoot, ! text_xpix(&x->x_obj, glist)+x->x_width-7, text_ypix(&x->x_obj, glist) + x->x_height+1, ! text_xpix(&x->x_obj, glist)+x->x_width, text_ypix(&x->x_obj, glist) + x->x_height+2 ); if ( x->x_point ) { *************** *** 162,182 **** if ( x->x_grid ) { ! int xlpos = x->x_obj.te_xpix+x->x_width/x->x_xlines; ! int ylpos = x->x_obj.te_ypix+x->x_height/x->x_ylines; int xcount = 1; int ycount = 1; ! while ( xlpos < x->x_obj.te_xpix+x->x_width ) { GRID_SYS_VGUI9(".x%x.c coords %xLINE%d%d %d %d %d %d\n", ! canvas, x, xcount, 0, xlpos, x->x_obj.te_ypix, ! xlpos, x->x_obj.te_ypix + x->x_height); xlpos+=x->x_width/x->x_xlines; xcount++; } ! while ( ylpos < x->x_obj.te_ypix+x->x_height ) { GRID_SYS_VGUI9(".x%x.c coords %xLINE%d%d %d %d %d %d\n", ! canvas, x, 0, ycount, x->x_obj.te_xpix, ylpos, ! x->x_obj.te_xpix + x->x_width, ylpos); ylpos+=x->x_height/x->x_ylines; ycount++; --- 162,182 ---- if ( x->x_grid ) { ! int xlpos = text_xpix(&x->x_obj, glist)+x->x_width/x->x_xlines; ! int ylpos = text_ypix(&x->x_obj, glist)+x->x_height/x->x_ylines; int xcount = 1; int ycount = 1; ! while ( xlpos < text_xpix(&x->x_obj, glist)+x->x_width ) { GRID_SYS_VGUI9(".x%x.c coords %xLINE%d%d %d %d %d %d\n", ! canvas, x, xcount, 0, xlpos, text_ypix(&x->x_obj, glist), ! xlpos, text_ypix(&x->x_obj, glist) + x->x_height); xlpos+=x->x_width/x->x_xlines; xcount++; } ! while ( ylpos < text_ypix(&x->x_obj, glist)+x->x_height ) { GRID_SYS_VGUI9(".x%x.c coords %xLINE%d%d %d %d %d %d\n", ! canvas, x, 0, ycount, text_xpix(&x->x_obj, glist), ylpos, ! text_xpix(&x->x_obj, glist) + x->x_width, ylpos); ylpos+=x->x_height/x->x_ylines; ycount++; *************** *** 188,194 **** static void grid_draw_erase(t_grid* x,t_glist* glist) { ! t_canvas *canvas=glist_getcanvas(glist); ! int i; ! char *tagRoot;
tagRoot = rtext_gettag(glist_findrtext(glist,(t_text *)x)); --- 188,194 ---- static void grid_draw_erase(t_grid* x,t_glist* glist) { ! t_canvas *canvas=glist_getcanvas(glist); ! int i; ! char *tagRoot;
tagRoot = rtext_gettag(glist_findrtext(glist,(t_text *)x)); *************** *** 217,221 **** static void grid_draw_select(t_grid* x,t_glist* glist) { ! t_canvas *canvas=glist_getcanvas(glist);
if(x->x_selected) --- 217,221 ---- static void grid_draw_select(t_grid* x,t_glist* glist) { ! t_canvas *canvas=glist_getcanvas(glist);
if(x->x_selected) *************** *** 237,241 **** t_float xmodstep, ymodstep;
! xvalue = x->x_min + (x->x_current - x->x_obj.te_xpix) * (x->x_max-x->x_min) / x->x_width ; if (xvalue < x->x_min ) xvalue = x->x_min; if (xvalue > x->x_max ) xvalue = x->x_max; --- 237,241 ---- t_float xmodstep, ymodstep;
! xvalue = x->x_min + (x->x_current - text_xpix(&x->x_obj, x->x_glist)) * (x->x_max-x->x_min) / x->x_width ; if (xvalue < x->x_min ) xvalue = x->x_min; if (xvalue > x->x_max ) xvalue = x->x_max; *************** *** 244,248 **** outlet_float( x->x_xoutlet, xvalue );
! yvalue = x->y_max - (x->y_current - x->x_obj.te_ypix ) * (x->y_max-x->y_min) / x->x_height ; if (yvalue < x->y_min ) yvalue = x->y_min; if (yvalue > x->y_max ) yvalue = x->y_max; --- 244,248 ---- outlet_float( x->x_xoutlet, xvalue );
! yvalue = x->y_max - (x->y_current - text_ypix(&x->x_obj, x->x_glist) ) * (x->y_max-x->y_min) / x->x_height ; if (yvalue < x->y_min ) yvalue = x->y_min; if (yvalue > x->y_max ) yvalue = x->y_max; *************** *** 260,267 **** t_grid* x = (t_grid*)z;
! *xp1 = x->x_obj.te_xpix; ! *yp1 = x->x_obj.te_ypix; ! *xp2 = x->x_obj.te_xpix+x->x_width; ! *yp2 = x->x_obj.te_ypix+x->x_height; }
--- 260,267 ---- t_grid* x = (t_grid*)z;
! *xp1 = text_xpix(&x->x_obj, x->x_glist); ! *yp1 = text_ypix(&x->x_obj, x->x_glist); ! *xp2 = text_xpix(&x->x_obj, x->x_glist)+x->x_width; ! *yp2 = text_ypix(&x->x_obj, x->x_glist)+x->x_height; }
*************** *** 272,276 **** // post( "saving grid : %s", x->x_name->s_name ); binbuf_addv(b, "ssiissiffiffiffiiff", gensym("#X"),gensym("obj"), ! (t_int)x->x_obj.te_xpix, (t_int)x->x_obj.te_ypix, gensym("grid"), x->x_name, x->x_width, x->x_min, x->x_max, x->x_height, --- 272,276 ---- // post( "saving grid : %s", x->x_name->s_name ); binbuf_addv(b, "ssiissiffiffiffiiff", gensym("#X"),gensym("obj"), ! (t_int)text_xpix(&x->x_obj, x->x_glist), (t_int)text_ypix(&x->x_obj, x->x_glist), gensym("grid"), x->x_name, x->x_width, x->x_min, x->x_max, x->x_height, *************** *** 362,367 **** { t_grid *x = (t_grid *)z; ! int xold = x->x_obj.te_xpix; ! int yold = x->x_obj.te_ypix;
// post( "grid_displace dx=%d dy=%d", dx, dy ); --- 362,367 ---- { t_grid *x = (t_grid *)z; ! int xold = text_xpix(&x->x_obj, glist); ! int yold = text_ypix(&x->x_obj, glist);
// post( "grid_displace dx=%d dy=%d", dx, dy ); *************** *** 371,375 **** x->x_obj.te_ypix += dy; x->y_current += dy; ! if(xold != x->x_obj.te_xpix || yold != x->x_obj.te_ypix) { grid_draw_move(x, x->x_glist); --- 371,375 ---- x->x_obj.te_ypix += dy; x->y_current += dy; ! if(xold != text_xpix(&x->x_obj, glist) || yold != text_ypix(&x->x_obj, glist)) { grid_draw_move(x, x->x_glist); *************** *** 423,428 **** // post( "grid_set x=%f y=%f", newx, newy );
! x->x_current = newx + x->x_obj.te_xpix; ! x->y_current = newy + x->x_obj.te_ypix; if(xold != x->x_current || yold != x->y_current) { --- 423,428 ---- // post( "grid_set x=%f y=%f", newx, newy );
! x->x_current = newx + text_xpix(&x->x_obj, x->x_glist); ! x->y_current = newy + text_ypix(&x->x_obj, x->x_glist); if(xold != x->x_current || yold != x->y_current) { *************** *** 440,449 **** if (xvalue > x->x_max ) xvalue = x->x_max;
! x->x_current = x->x_obj.te_xpix + ((xvalue - x->x_min) / x->x_max) * x->x_width;
if (yvalue < x->y_min ) yvalue = x->y_min; if (yvalue > x->y_max ) yvalue = x->y_max;
! x->y_current = x->x_obj.te_ypix + (1 - ((yvalue - x->y_min) / x->y_max)) * x->x_height;
if(xold != x->x_current || yold != x->y_current) { --- 440,449 ---- if (xvalue > x->x_max ) xvalue = x->x_max;
! x->x_current = text_xpix(&x->x_obj, x->x_glist) + ((xvalue - x->x_min) / x->x_max) * x->x_width;
if (yvalue < x->y_min ) yvalue = x->y_min; if (yvalue > x->y_max ) yvalue = x->y_max;
! x->y_current = text_ypix(&x->x_obj, x->x_glist) + (1 - ((yvalue - x->y_min) / x->y_max)) * x->x_height;
if(xold != x->x_current || yold != x->y_current) { *************** *** 461,470 **** if (xvalue > x->x_max ) xvalue = x->x_max;
! x->x_current = x->x_obj.te_xpix + ((xvalue - x->x_min) / x->x_max) * x->x_width;
if (yvalue < x->y_min ) yvalue = x->y_min; if (yvalue > x->y_max ) yvalue = x->y_max;
! x->y_current = x->x_obj.te_ypix + (1 - ((yvalue - x->y_min) / x->y_max)) * x->x_height;
if(xold != x->x_current || yold != x->y_current) { --- 461,470 ---- if (xvalue > x->x_max ) xvalue = x->x_max;
! x->x_current = text_xpix(&x->x_obj, x->x_glist) + ((xvalue - x->x_min) / x->x_max) * x->x_width;
if (yvalue < x->y_min ) yvalue = x->y_min; if (yvalue > x->y_max ) yvalue = x->y_max;
! x->y_current = text_ypix(&x->x_obj, x->x_glist) + (1 - ((yvalue - x->y_min) / x->y_max)) * x->x_height;
if(xold != x->x_current || yold != x->y_current) { *************** *** 479,487 **** t_float xvalue, yvalue;
! xvalue = x->x_min + (x->x_current - x->x_obj.te_xpix) * (x->x_max-x->x_min) / x->x_width ; if (xvalue < x->x_min ) xvalue = x->x_min; if (xvalue > x->x_max ) xvalue = x->x_max;
! yvalue = x->y_max - (x->y_current - x->x_obj.te_ypix ) * (x->y_max-x->y_min) / x->x_height ; if (yvalue < x->y_min ) yvalue = x->y_min; if (yvalue > x->y_max ) yvalue = x->y_max; --- 479,487 ---- t_float xvalue, yvalue;
! xvalue = x->x_min + (x->x_current - text_xpix(&x->x_obj, x->x_glist)) * (x->x_max-x->x_min) / x->x_width ; if (xvalue < x->x_min ) xvalue = x->x_min; if (xvalue > x->x_max ) xvalue = x->x_max;
! yvalue = x->y_max - (x->y_current - text_ypix(&x->x_obj, x->x_glist) ) * (x->y_max-x->y_min) / x->x_height ; if (yvalue < x->y_min ) yvalue = x->y_min; if (yvalue > x->y_max ) yvalue = x->y_max; *************** *** 493,502 **** if (xvalue > x->x_max ) xvalue = x->x_max;
! x->x_current = x->x_obj.te_xpix + ((xvalue - x->x_min) / x->x_max) * x->x_width;
if (yvalue < x->y_min ) yvalue = x->y_min; if (yvalue > x->y_max ) yvalue = x->y_max;
! x->y_current = x->x_obj.te_ypix + (1 - ((yvalue - x->y_min) / x->y_max)) * x->x_height;
if(xold != x->x_current || yold != x->y_current) { --- 493,502 ---- if (xvalue > x->x_max ) xvalue = x->x_max;
! x->x_current = text_xpix(&x->x_obj, x->x_glist) + ((xvalue - x->x_min) / x->x_max) * x->x_width;
if (yvalue < x->y_min ) yvalue = x->y_min; if (yvalue > x->y_max ) yvalue = x->y_max;
! x->y_current = text_ypix(&x->x_obj, x->x_glist) + (1 - ((yvalue - x->y_min) / x->y_max)) * x->x_height;
if(xold != x->x_current || yold != x->y_current) { *************** *** 512,520 **** t_float xvalue, yvalue;
! xvalue = x->x_min + (x->x_current - x->x_obj.te_xpix) * (x->x_max-x->x_min) / x->x_width ; if (xvalue < x->x_min ) xvalue = x->x_min; if (xvalue > x->x_max ) xvalue = x->x_max;
! yvalue = x->y_max - (x->y_current - x->x_obj.te_ypix ) * (x->y_max-x->y_min) / x->x_height ; if (yvalue < x->y_min ) yvalue = x->y_min; if (yvalue > x->y_max ) yvalue = x->y_max; --- 512,520 ---- t_float xvalue, yvalue;
! xvalue = x->x_min + (x->x_current - text_xpix(&x->x_obj, x->x_glist)) * (x->x_max-x->x_min) / x->x_width ; if (xvalue < x->x_min ) xvalue = x->x_min; if (xvalue > x->x_max ) xvalue = x->x_max;
! yvalue = x->y_max - (x->y_current - text_ypix(&x->x_obj, x->x_glist) ) * (x->y_max-x->y_min) / x->x_height ; if (yvalue < x->y_min ) yvalue = x->y_min; if (yvalue > x->y_max ) yvalue = x->y_max; *************** *** 526,535 **** if (xvalue > x->x_max ) xvalue = x->x_max;
! x->x_current = x->x_obj.te_xpix + ((xvalue - x->x_min) / x->x_max) * x->x_width;
if (yvalue < x->y_min ) yvalue = x->y_min; if (yvalue > x->y_max ) yvalue = x->y_max;
! x->y_current = x->x_obj.te_ypix + (1 - ((yvalue - x->y_min) / x->y_max)) * x->x_height;
if(xold != x->x_current || yold != x->y_current) { --- 526,535 ---- if (xvalue > x->x_max ) xvalue = x->x_max;
! x->x_current = text_xpix(&x->x_obj, x->x_glist) + ((xvalue - x->x_min) / x->x_max) * x->x_width;
if (yvalue < x->y_min ) yvalue = x->y_min; if (yvalue > x->y_max ) yvalue = x->y_max;
! x->y_current = text_ypix(&x->x_obj, x->x_glist) + (1 - ((yvalue - x->y_min) / x->y_max)) * x->x_height;
if(xold != x->x_current || yold != x->y_current) {