diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2006-10-02 17:20:56 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2006-10-02 17:20:56 +0000 |
| commit | 4d0529a2768e0a1c46eff03d107f12f8876e5d59 (patch) | |
| tree | b1609816592b1b116579c373520e08fc194d056c /src | |
| parent | 849ecabf538ff53965ef652bf4f2d0581cd5f8b4 (diff) | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Image.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
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]; |
