FloatImg/funcs/rectangle.c
2021-10-17 18:32:53 +02:00

33 lines
659 B
C

/*
* R E C T A N G L E
* This is an eternal WIP, sorry...
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <math.h>
#include "../floatimg.h"
/* --------------------------------------------------------------------- */
int fimg_clear_rectangle(FloatImg *pi, int coo[4])
{
int line, off;
#if DEBUG_LEVEL
fprintf(stderr, ">>> %s ( %p %p )\n", __func__, pi, coo);
#endif
/* please add boudary checks */
for (line=0; line<coo[3]; line++) {
off = (line+coo[1])*pi->width + coo[0];
fprintf(stderr, "line %d off %d\n", line, off);
}
return -1;
}
/* --------------------------------------------------------------------- */