Updated X11DRV_DIB_GetDIBits to properly handle bottom-up DIBs

manipulation.
Corrected XGetSubImage arguments order.
This commit is contained in:
Francois Jacques 2000-07-08 18:34:39 +00:00 committed by Alexandre Julliard
parent 187271092a
commit 7d35413162
1 changed files with 15 additions and 7 deletions

View File

@ -2701,9 +2701,9 @@ int X11DRV_DIB_GetImageBits( const X11DRV_DIB_IMAGEBITS_DESCR *descr )
return lines; return lines;
} } } }
XGetSubImage( display, descr->drawable, descr->xDest, descr->yDest, XGetSubImage( display, descr->drawable, descr->xSrc, descr->ySrc,
descr->width, descr->height, AllPlanes, ZPixmap, descr->width, lines, AllPlanes, ZPixmap,
bmpImage, descr->xSrc, descr->ySrc ); bmpImage, descr->xDest, descr->yDest );
/* Transfer the pixels */ /* Transfer the pixels */
switch(descr->infoBpp) switch(descr->infoBpp)
@ -3013,13 +3013,21 @@ INT X11DRV_DIB_GetDIBits(
descr.depth = bmp->bitmap.bmBitsPixel; descr.depth = bmp->bitmap.bmBitsPixel;
descr.drawable = (Pixmap)bmp->physBitmap; descr.drawable = (Pixmap)bmp->physBitmap;
descr.gc = BITMAP_GC(bmp); descr.gc = BITMAP_GC(bmp);
descr.xSrc = 0;
descr.ySrc = startscan;
descr.xDest = 0;
descr.yDest = 0;
descr.width = bmp->bitmap.bmWidth; descr.width = bmp->bitmap.bmWidth;
descr.height = bmp->bitmap.bmHeight; descr.height = bmp->bitmap.bmHeight;
descr.colorMap = info->bmiColors; descr.colorMap = info->bmiColors;
descr.xDest = 0;
descr.yDest = 0;
descr.xSrc = 0;
if (descr.lines > 0)
{
descr.ySrc = descr.height - startscan - 1;
}
else
{
descr.ySrc = startscan;
}
if (dib) if (dib)
descr.useShm = (dib->shminfo.shmid != -1); descr.useShm = (dib->shminfo.shmid != -1);