From 4d64e4cd434426234a5c313c151cd79b6afc299e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juha=20Vehvil=C3=A4inen?= Date: Sat, 6 Jul 2002 17:50:18 +0000 Subject: *** empty log message *** svn path=/trunk/Framestein/; revision=27 --- Plugins/xbend.c | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 Plugins/xbend.c (limited to 'Plugins/xbend.c') diff --git a/Plugins/xbend.c b/Plugins/xbend.c new file mode 100644 index 0000000..1ba9959 --- /dev/null +++ b/Plugins/xbend.c @@ -0,0 +1,99 @@ +#include +#include +#include "plugin.h" + +void perform_effect(_frame f, _args a) +{ + byte pixelsize = f.pixelformat/8; + int x, y, pos, pos2, widthminuspos, widthminuspos2; + pixel8 *p, *tp=0; + char *t; + + if(!a.s) return; + + pos = atoi(a.s); + if(t = strstr(a.s, " ")) + { + pos2 = atoi(t+1); + tp = (pixel8 *)malloc(f.width*pixelsize); + } + + if(pos<0) pos=0; + if(pos>=f.width) pos=f.width-1; + if(pos2<0) pos2=0; + if(pos2>=f.width) pos2=f.width-1; + + widthminuspos = f.width-pos; + widthminuspos2 = f.width-pos2; + + for(y=0; y=w) pos=w-1; + if(pos2<0) pos2=0; + if(pos2>=w) pos2=w-1; + + widthminuspos = f1.width-pos; + widthminuspos2 = f1.width-pos2; + widthminusone = w-1; + + for(y=0; y