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
This commit is contained in:
Michael R Sweet
2006-10-02 17:20:56 +00:00
parent 849ecabf53
commit 4d0529a276
+1 -1
View File
@@ -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];