mirror of
https://github.com/fltk/fltk.git
synced 2026-06-07 17:35:39 +08:00
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:
+1
-1
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user