From 34da1ae5a8584c3dbd3b5278c07076424378dca9 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 13 Oct 2010 13:04:20 +0000 Subject: Remove (broken?) center-of-pixel adjustments in image rendering. --- draw/imagedraw.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'draw') diff --git a/draw/imagedraw.c b/draw/imagedraw.c index 5ffe5ed8..017eaf39 100644 --- a/draw/imagedraw.c +++ b/draw/imagedraw.c @@ -202,8 +202,8 @@ fz_paintimageimp(fz_pixmap *dst, fz_bbox scissor, fz_pixmap *img, fz_matrix ctm, ctm.b = roundup(ctm.b); ctm.c = roundup(ctm.c); ctm.d = roundup(ctm.d); - ctm.e = floorf(ctm.e);// + 0.5f; - ctm.f = floorf(ctm.f);// + 0.5f; + ctm.e = floorf(ctm.e); + ctm.f = floorf(ctm.f); } bbox = fz_roundrect(fz_transformrect(ctm, fz_unitrect)); @@ -225,9 +225,8 @@ fz_paintimageimp(fz_pixmap *dst, fz_bbox scissor, fz_pixmap *img, fz_matrix ctm, fd = inv.d * 65536; /* Calculate initial texture positions. Do a half step to start. */ - /* Also, convert from texture space to sample space (subtract 1/2) */ - u = (fa * x) + (fc * y) + inv.e * 65536 + ((fa+fc)>>1) - 32768; - v = (fb * x) + (fd * y) + inv.f * 65536 + ((fb+fd)>>1) - 32768; + u = (fa * x) + (fc * y) + inv.e * 65536 + ((fa+fc)>>1); + v = (fb * x) + (fd * y) + inv.f * 65536 + ((fb+fd)>>1); dp = dst->samples + ((y - dst->y) * dst->w + (x - dst->x)) * dst->n; n = dst->n; -- cgit v1.2.3