summaryrefslogtreecommitdiff
path: root/draw
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2010-10-13 13:04:20 +0000
committerTor Andersson <tor@ghostscript.com>2010-10-13 13:04:20 +0000
commit34da1ae5a8584c3dbd3b5278c07076424378dca9 (patch)
treec48c596f03a3a993d56b3b851f607f7f6383c347 /draw
parent64b1c2c0b9d01abe4b37cca8929588875e6ba474 (diff)
downloadmupdf-34da1ae5a8584c3dbd3b5278c07076424378dca9.tar.xz
Remove (broken?) center-of-pixel adjustments in image rendering.
Diffstat (limited to 'draw')
-rw-r--r--draw/imagedraw.c9
1 files changed, 4 insertions, 5 deletions
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;