ref: 29c96c7ead583a633d3e05b9df1eca529b7d996f
parent: b53bbd5a75d2682dc6606269714bec8f8d9d9796
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Thu Jul 11 21:13:11 EDT 2024
add a small hack until a correct scaling is implemented
--- a/rast.c
+++ b/rast.c
@@ -459,8 +459,9 @@
int w, i, r, k, npts, npx, ns;
double scale;
- scale = (double)h / (g->yMax - g->yMin);
- w = *wo = (g->xMax - g->xMin) * scale;
+ /* FIXME those epsilons and ceil is a rather dumb hack for now */
+ scale = (double)h / (g->yMax - g->yMin) + ε;
+ w = *wo = ceil((g->xMax - g->xMin) * scale + ε);
npx = w * h;
fp = calloc(1, npx*sizeof(*fp));