diff options
author | Juha Vehviläinen <jusu@users.sourceforge.net> | 2002-07-06 17:50:18 +0000 |
---|---|---|
committer | Juha Vehviläinen <jusu@users.sourceforge.net> | 2002-07-06 17:50:18 +0000 |
commit | 4d64e4cd434426234a5c313c151cd79b6afc299e (patch) | |
tree | 5c23dd6acc65b869741d3bb9d33912d74bb7407d /Plugins/xshred.c |
*** empty log message ***svn2git-root
svn path=/trunk/Framestein/; revision=27
Diffstat (limited to 'Plugins/xshred.c')
-rw-r--r-- | Plugins/xshred.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Plugins/xshred.c b/Plugins/xshred.c new file mode 100644 index 0000000..6918e50 --- /dev/null +++ b/Plugins/xshred.c @@ -0,0 +1,20 @@ +#include <stdlib.h> +#include "plugin.h" + +void perform_copy(_frame f1, _frame f2, _args a) +{ + int step, w, h, y, pixelsize=f1.pixelformat/8; + + if(!a.s) return; + + step = atoi(a.s); + if(step<=0) step=1; + + w = f1.width<f2.width ? f1.width : f2.width; + h = f1.height<f2.height ? f1.height : f2.height; + + for(y=0; y<h; y+=step) + { + memcpy(scanline(f2, y), scanline(f1, y), pixelsize*w); + } +} |