diff options
Diffstat (limited to 'pixman/pixman-edge-imp.h')
-rw-r--r-- | pixman/pixman-edge-imp.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/pixman/pixman-edge-imp.h b/pixman/pixman-edge-imp.h index 74720d1..a4698ed 100644 --- a/pixman/pixman-edge-imp.h +++ b/pixman/pixman-edge-imp.h @@ -49,10 +49,14 @@ RASTERIZE_EDGES (pixman_image_t *image, rx = r->x; #if N_BITS == 1 /* For the non-antialiased case, round the coordinates up, in effect - * sampling the center of the pixel. (The AA case does a similar - * adjustment in RENDER_SAMPLES_X) */ - lx += X_FRAC_FIRST(1); - rx += X_FRAC_FIRST(1); + * sampling just slightly to the left of the pixel. This is so that + * when the sample point lies exactly on the line, we round towards + * north-west. + * + * (The AA case does a similar adjustment in RENDER_SAMPLES_X) + */ + lx += X_FRAC_FIRST(1) - pixman_fixed_e; + rx += X_FRAC_FIRST(1) - pixman_fixed_e; #endif /* clip X */ if (lx < 0) |