Update of /cvsroot/pure-data/externals/pidip/modules In directory sc8-pr-cvs1:/tmp/cvs-serv17888/modules
Modified Files: Makefile Makefile.in pdp_pen.c pdp_xcanvas.c Log Message: PiDiP 0.12.11
Index: Makefile =================================================================== RCS file: /cvsroot/pure-data/externals/pidip/modules/Makefile,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Makefile 30 Oct 2003 19:30:10 -0000 1.9 --- Makefile 8 Dec 2003 22:45:54 -0000 1.10 *************** *** 11,19 **** pdp_cycle.o pdp_transform.o pdp_shagadelic.o \ pdp_dice.o pdp_puzzle.o pdp_text.o pdp_form.o \ ! pdp_compose.o pdp_cmap.o pdp_aa.o pdp_ascii.o \ pdp_ffmpeg~.o pdp_live~.o pdp_segsnd~.o pdp_noquark.o \ pdp_juxta.o pdp_capture.o pdp_smuck.o pdp_lumafilt.o \ pdp_transition.o pdp_imgloader.o pdp_imgsaver.o pdp_cache.o \ ! pdp_canvas.o pdp_pen.o pdp_shape.o pdp_fqt.o pdp_fcqt.o
all_modules: $(OBJECTS) --- 11,20 ---- pdp_cycle.o pdp_transform.o pdp_shagadelic.o \ pdp_dice.o pdp_puzzle.o pdp_text.o pdp_form.o \ ! pdp_compose.o pdp_cmap.o pdp_ascii.o \ pdp_ffmpeg~.o pdp_live~.o pdp_segsnd~.o pdp_noquark.o \ pdp_juxta.o pdp_capture.o pdp_smuck.o pdp_lumafilt.o \ pdp_transition.o pdp_imgloader.o pdp_imgsaver.o pdp_cache.o \ ! pdp_canvas.o pdp_pen.o pdp_shape.o pdp_fqt.o pdp_fcqt.o \ ! pdp_ocanvas.o # pdp_xcanvas.o pdp_aa.o
all_modules: $(OBJECTS)
Index: Makefile.in =================================================================== RCS file: /cvsroot/pure-data/externals/pidip/modules/Makefile.in,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Makefile.in 30 Oct 2003 19:30:51 -0000 1.9 --- Makefile.in 8 Dec 2003 22:45:54 -0000 1.10 *************** *** 11,19 **** pdp_cycle.o pdp_transform.o pdp_shagadelic.o \ pdp_dice.o pdp_puzzle.o pdp_text.o pdp_form.o \ ! pdp_compose.o pdp_cmap.o pdp_aa.o pdp_ascii.o \ pdp_ffmpeg~.o pdp_live~.o pdp_segsnd~.o pdp_noquark.o \ pdp_juxta.o pdp_capture.o pdp_smuck.o pdp_lumafilt.o \ pdp_transition.o pdp_imgloader.o pdp_imgsaver.o pdp_cache.o \ ! pdp_canvas.o pdp_pen.o pdp_shape.o pdp_fqt.o pdp_fcqt.o
all_modules: $(OBJECTS) --- 11,20 ---- pdp_cycle.o pdp_transform.o pdp_shagadelic.o \ pdp_dice.o pdp_puzzle.o pdp_text.o pdp_form.o \ ! pdp_compose.o pdp_cmap.o pdp_ascii.o \ pdp_ffmpeg~.o pdp_live~.o pdp_segsnd~.o pdp_noquark.o \ pdp_juxta.o pdp_capture.o pdp_smuck.o pdp_lumafilt.o \ pdp_transition.o pdp_imgloader.o pdp_imgsaver.o pdp_cache.o \ ! pdp_canvas.o pdp_pen.o pdp_shape.o pdp_fqt.o pdp_fcqt.o \ ! pdp_ocanvas.o # pdp_xcanvas.o pdp_aa.o
all_modules: $(OBJECTS)
Index: pdp_pen.c =================================================================== RCS file: /cvsroot/pure-data/externals/pidip/modules/pdp_pen.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** pdp_pen.c 17 Oct 2003 20:54:40 -0000 1.2 --- pdp_pen.c 8 Dec 2003 22:45:54 -0000 1.3 *************** *** 51,54 **** --- 51,56 ---- t_int x_green; t_int x_blue; + t_int x_xoffset; + t_int x_yoffset;
t_int x_pwidth; *************** *** 76,79 **** --- 78,83 ---- t_int px, py;
+ if ( !x->x_bdata ) return; + X = X*x->x_vwidth; Y = Y*x->x_vheight; *************** *** 128,131 **** --- 132,137 ---- short int nX, nY;
+ if ( !x->x_bdata ) return; + nbits++; // post( "pdp_pen_do_fill : X=%d, Y=%d stack=%d", (t_int)X, (t_int)Y, nbits ); *************** *** 287,290 **** --- 293,297 ---- static void pdp_pen_clear(t_pdp_pen *x) { + if ( !x->x_bdata ) return; if ( x->x_vsize > 0 ) { *************** *** 301,304 **** --- 308,321 ---- }
+ static void pdp_pen_xoffset(t_pdp_pen *x, t_floatarg xoffset) + { + x->x_xoffset = (int) xoffset; + } + + static void pdp_pen_yoffset(t_pdp_pen *x, t_floatarg yoffset) + { + x->x_yoffset = (int) yoffset; + } + static void pdp_pen_mode(t_pdp_pen *x, t_floatarg mode) { *************** *** 373,383 **** for(px=0; px<x->x_vwidth; px++) { ! if ( *(pbY+py*x->x_vwidth+px) != 0 ) { ! *(pnY+py*x->x_vwidth+px) = *(pbY+py*x->x_vwidth+px); ! *(pnU+(py>>1)*(x->x_vwidth>>1)+(px>>1)) = ! *(pbU+(py>>1)*(x->x_vwidth>>1)+(px>>1)); ! *(pnV+(py>>1)*(x->x_vwidth>>1)+(px>>1)) = ! *(pbV+(py>>1)*(x->x_vwidth>>1)+(px>>1)); } } --- 390,404 ---- for(px=0; px<x->x_vwidth; px++) { ! if ( ( (px-x->x_xoffset)>=0 ) && ( (px-x->x_xoffset)<x->x_vwidth ) && ! ( (py-x->x_yoffset)>=0 ) && ( (py-x->x_yoffset)<x->x_vheight ) ) { ! if ( *(pbY+(py-x->x_yoffset)*x->x_vwidth+(px-x->x_xoffset)) != 0 ) ! { ! *(pnY+py*x->x_vwidth+px) = *(pbY+(py-x->x_yoffset)*x->x_vwidth+(px-x->x_xoffset)); ! *(pnU+(py>>1)*(x->x_vwidth>>1)+(px>>1)) = ! *(pbU+((py-x->x_yoffset)>>1)*(x->x_vwidth>>1)+((px-x->x_xoffset)>>1)); ! *(pnV+(py>>1)*(x->x_vwidth>>1)+(px>>1)) = ! *(pbV+((py-x->x_yoffset)>>1)*(x->x_vwidth>>1)+((px-x->x_xoffset)>>1)); ! } } } *************** *** 460,463 **** --- 481,486 ----
x->x_outlet0 = outlet_new(&x->x_obj, &s_anything); + inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_float, gensym("xoffset")); + inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_float, gensym("yoffset"));
x->x_packet0 = -1; *************** *** 471,474 **** --- 494,499 ---- x->x_green = 255; x->x_blue = 255; + x->x_xoffset = 0; + x->x_yoffset = 0;
x->x_pwidth = 3; *************** *** 499,502 **** --- 524,529 ---- class_addmethod(pdp_pen_class, (t_method)pdp_pen_rgb, gensym("rgb"), A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, A_NULL); class_addmethod(pdp_pen_class, (t_method)pdp_pen_mode, gensym("mode"), A_DEFFLOAT, A_NULL); + class_addmethod(pdp_pen_class, (t_method)pdp_pen_xoffset, gensym("xoffset"), A_DEFFLOAT, A_NULL); + class_addmethod(pdp_pen_class, (t_method)pdp_pen_yoffset, gensym("yoffset"), A_DEFFLOAT, A_NULL);
}
Index: pdp_xcanvas.c =================================================================== RCS file: /cvsroot/pure-data/externals/pidip/modules/pdp_xcanvas.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pdp_xcanvas.c 29 Oct 2003 02:17:54 -0000 1.1 --- pdp_xcanvas.c 8 Dec 2003 22:45:54 -0000 1.2 *************** *** 27,30 **** --- 27,31 ---- #include "pdp.h" #include "pdp_xwindow.h" + #include <X11/extensions/XShm.h> #include <math.h>