From ded124f1cc463bac9e076146a4ffb77b8a370e0c Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 21 Oct 2004 10:51:08 +0200 Subject: rewrote resource dict handling --- render/rendertext.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'render/rendertext.c') diff --git a/render/rendertext.c b/render/rendertext.c index cc181657..81afeafa 100644 --- a/render/rendertext.c +++ b/render/rendertext.c @@ -33,13 +33,13 @@ static void blitcolorglyph(fz_pixmap *out, fz_glyph *gl, int xo, int yo, fz_rend { for (sx = 0; sx < gl->w; sx++) { - dx = xo + sx + gl->lsb - out->x; dy = yo - sy + gl->top - out->y; + if (dy < 0) continue; + if (dy >= out->h) break; + dx = xo + sx + gl->lsb - out->x; if (dx < 0) continue; - if (dy < 0) continue; - if (dx >= out->w) continue; - if (dy >= out->h) continue; + if (dx >= out->w) break; sa = gl->bitmap[sx + sy * gl->w]; ssa = 255 - sa; -- cgit v1.2.3