From: oetiker Date: Mon, 2 May 2005 19:47:05 +0000 (+0000) Subject: when walking the bytes use the pitch not the width X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=58ec29cf42e0f188e10b302c48cf970bb23a1400;p=rrdtool-all.git when walking the bytes use the pitch not the width git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2@477 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/program/src/rrd_gfx.c b/program/src/rrd_gfx.c index 01507063..cdb92e10 100644 --- a/program/src/rrd_gfx.c +++ b/program/src/rrd_gfx.c @@ -658,7 +658,7 @@ int gfx_render_png (gfx_canvas_t *canvas, if (buf_x < 0 || buf_x >= (long)pys_width) continue; buf_x *= bytes_per_pixel ; - font_alpha = *(bit->bitmap.buffer + iy * bit->bitmap.width + ix); + font_alpha = *(bit->bitmap.buffer + iy * bit->bitmap.pitch + ix); if (font_alpha > 0){ fcolor[3] = (art_u8)((double)font_alpha / gr * falpha); art_rgba_rgba_composite(buffer + buf_y + buf_x ,fcolor,1);