From 4d0529a2768e0a1c46eff03d107f12f8876e5d59 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Mon, 2 Oct 2006 17:20:56 +0000 Subject: Fix new alpha blending code to use the source image width instead of the destination width when computing the start pointer. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5503 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Image.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/Fl_Image.cxx b/src/Fl_Image.cxx index 3121a0f4e..bfb9a8eec 100644 --- a/src/Fl_Image.cxx +++ b/src/Fl_Image.cxx @@ -325,7 +325,7 @@ void Fl_RGB_Image::desaturate() { // Composite an image with alpha on systems that don't have accelerated // alpha compositing... static void alpha_blend(Fl_RGB_Image *img, int X, int Y, int W, int H, int cx, int cy) { - uchar *srcptr = (uchar*)img->array + img->d() * (W * cy + cx); + uchar *srcptr = (uchar*)img->array + img->d() * (img->w() * cy + cx); int srcskip = img->d() * (img->w() - W); uchar *dst = new uchar[W * H * 3]; -- cgit v1.2.3