Do not clip source rectangle even by visible region for bitblts.

Added field 'totalExtent' to WIN_DC_INFO.
This commit is contained in:
Ulrich Weigand 1998-10-14 18:06:44 +00:00 committed by Alexandre Julliard
parent ff1c569d5c
commit 27bb362fe1
5 changed files with 25 additions and 6 deletions

View File

@ -1043,9 +1043,10 @@ static BOOL32 BITBLT_GetVisRectangles( DC *dcDst, INT32 xDst, INT32 yDst,
SetRect32( &rect, xSrc, ySrc, xSrc + widthSrc, ySrc + heightSrc );
if (widthSrc < 0) SWAP_INT32( &rect.left, &rect.right );
if (heightSrc < 0) SWAP_INT32( &rect.top, &rect.bottom );
/* Apparently the clip region is only for output, so use hVisRgn here */
GetRgnBox32( dcSrc->w.hVisRgn, &clipRect );
if (!IntersectRect32( visRectSrc, &rect, &clipRect )) return FALSE;
/* Apparently the clipping and visible regions are only for output,
so just check against totalExtent here to avoid BadMatch errors */
if (!IntersectRect32( visRectSrc, &rect, &dcSrc->w.totalExtent ))
return FALSE;
/* Intersect the rectangles */

View File

@ -54,6 +54,11 @@ HBITMAP32 X11DRV_BITMAP_SelectObject( DC * dc, HBITMAP32 hbitmap,
if (!(dc->w.flags & DC_MEMORY)) return 0;
dc->w.totalExtent.left = 0;
dc->w.totalExtent.top = 0;
dc->w.totalExtent.right = bmp->bitmap.bmWidth;
dc->w.totalExtent.bottom = bmp->bitmap.bmHeight;
if (dc->w.hVisRgn)
SetRectRgn32( dc->w.hVisRgn, 0, 0,
bmp->bitmap.bmWidth, bmp->bitmap.bmHeight );

View File

@ -178,8 +178,13 @@ static BOOL32 X11DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device,
physDev->drawable = bmp->pixmap;
physDev->gc = TSXCreateGC( display, physDev->drawable, 0, NULL );
dc->w.bitsPerPixel = bmp->bitmap.bmBitsPixel;
dc->w.hVisRgn = CreateRectRgn32( 0, 0, bmp->bitmap.bmWidth,
bmp->bitmap.bmHeight );
dc->w.totalExtent.left = 0;
dc->w.totalExtent.top = 0;
dc->w.totalExtent.right = bmp->bitmap.bmWidth;
dc->w.totalExtent.bottom = bmp->bitmap.bmHeight;
dc->w.hVisRgn = CreateRectRgnIndirect32( &dc->w.totalExtent );
GDI_HEAP_UNLOCK( dc->w.hBitmap );
}
else
@ -187,7 +192,12 @@ static BOOL32 X11DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device,
physDev->drawable = rootWindow;
physDev->gc = TSXCreateGC( display, physDev->drawable, 0, NULL );
dc->w.bitsPerPixel = screenDepth;
dc->w.hVisRgn = CreateRectRgn32( 0, 0, screenWidth, screenHeight);
dc->w.totalExtent.left = 0;
dc->w.totalExtent.top = 0;
dc->w.totalExtent.right = screenWidth;
dc->w.totalExtent.bottom = screenHeight;
dc->w.hVisRgn = CreateRectRgnIndirect32( &dc->w.totalExtent );
}
if (!dc->w.hVisRgn)

View File

@ -122,6 +122,7 @@ typedef struct
short breakExtra; /* breakTotalExtra / breakCount */
short breakRem; /* breakTotalExtra % breakCount */
RECT32 totalExtent;
BYTE bitsPerPixel;
INT32 MapMode;

View File

@ -528,6 +528,7 @@ HDC16 WINAPI GetDCState( HDC16 hdc )
newdc->w.hFirstBitmap = dc->w.hFirstBitmap;
newdc->w.hDevice = dc->w.hDevice;
newdc->w.hPalette = dc->w.hPalette;
newdc->w.totalExtent = dc->w.totalExtent;
newdc->w.bitsPerPixel = dc->w.bitsPerPixel;
newdc->w.ROPmode = dc->w.ROPmode;
newdc->w.polyFillMode = dc->w.polyFillMode;
@ -613,6 +614,7 @@ void WINAPI SetDCState( HDC16 hdc, HDC16 hdcs )
dc->w.devCaps = dcs->w.devCaps;
dc->w.hFirstBitmap = dcs->w.hFirstBitmap;
dc->w.hDevice = dcs->w.hDevice;
dc->w.totalExtent = dcs->w.totalExtent;
dc->w.ROPmode = dcs->w.ROPmode;
dc->w.polyFillMode = dcs->w.polyFillMode;
dc->w.stretchBltMode = dcs->w.stretchBltMode;