diff options
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -159,4 +159,25 @@ intolerant_eq(double a, double b) }\ } while (0) +# if 0 +static void +print_raster(const RASTER *r) { + size_t y, x; + fprintf(stderr, "\nOutline (area)\n"); + for (y = 0; y < r->height; y++) { + for (x = 0; x < r->width; x++) + fprintf(stderr, r->cells[y * r->width + x].cell_coverage ? "%+.4lf " : " 0 ", + r->cells[y * r->width + x].cell_coverage); + printf("\n"); + } + fprintf(stderr, "\nOutline (shadow)\n"); + for (y = 0; y < r->height; y++) { + for (x = 0; x < r->width; x++) + fprintf(stderr, r->cells[y * r->width + x].opposite_coverage ? "%+.4lf " : " 0 ", + r->cells[y * r->width + x].opposite_coverage); + printf("\n"); + } +} +# endif + #endif |