/* See LICENSE file for copyright and license details. */ #include "common.h" #ifndef TEST void rtgrpblib_fill_shapes(double *restrict image, size_t rowsize, const RASTER *raster) { const CELL *cells = raster->cells; double inklevel; size_t x, y; #ifndef ROWWISE_RESET_INKLEVEL inklevel = 0; #endif for (y = 0; y < raster->height; y++) { #ifdef ROWWISE_RESET_INKLEVEL inklevel = 0; #endif for (x = 0; x < raster->width; x++) { image[x] = fmin(fabs(inklevel + cells[x].cell_coverage), 1.0); inklevel += cells[x].opposite_coverage; } image = &image[rowsize]; cells = &cells[raster->width]; } } #else int main(void) { return 0; /* TODO add test */ } #endif